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: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

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

This class can be customized by passing in a custom instance of 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 future =
-   *       dataprocMetastoreClient.listServicesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Service element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listServicesPagedCallable() { - return stub.listServicesPagedCallable(); - } - - // 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();
-   *   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 listServicesCallable() { - return stub.listServicesCallable(); - } - - // 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()) {
-   *   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 future = dataprocMetastoreClient.getServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getServiceCallable() { - return stub.getServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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]");
-   *   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 createServiceAsync( - LocationName parent, Service service, String serviceId) { - CreateServiceRequest request = - CreateServiceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setService(service) - .setServiceId(serviceId) - .build(); - return createServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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();
-   *   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 createServiceAsync( - String parent, Service service, String serviceId) { - CreateServiceRequest request = - CreateServiceRequest.newBuilder() - .setParent(parent) - .setService(service) - .setServiceId(serviceId) - .build(); - return createServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   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 createServiceAsync( - CreateServiceRequest request) { - return createServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   CreateServiceRequest request =
-   *       CreateServiceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setServiceId("serviceId-194185552")
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.createServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createServiceOperationCallable() { - return stub.createServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   CreateServiceRequest request =
-   *       CreateServiceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setServiceId("serviceId-194185552")
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.createServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createServiceCallable() { - return stub.createServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   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`. - *

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 updateServiceAsync( - Service service, FieldMask updateMask) { - UpdateServiceRequest request = - UpdateServiceRequest.newBuilder().setService(service).setUpdateMask(updateMask).build(); - return updateServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   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 updateServiceAsync( - UpdateServiceRequest request) { - return updateServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   UpdateServiceRequest request =
-   *       UpdateServiceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.updateServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateServiceOperationCallable() { - return stub.updateServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   UpdateServiceRequest request =
-   *       UpdateServiceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.updateServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateServiceCallable() { - return stub.updateServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   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: - *

`projects/{project_number}/locations/{location_id}/services/{service_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteServiceAsync(ServiceName name) { - DeleteServiceRequest request = - DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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();
-   *   dataprocMetastoreClient.deleteServiceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The relative resource name of the metastore service to delete, 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 OperationFuture deleteServiceAsync(String name) { - DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build(); - return deleteServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   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 deleteServiceAsync( - DeleteServiceRequest request) { - return deleteServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   DeleteServiceRequest request =
-   *       DeleteServiceRequest.newBuilder()
-   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.deleteServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteServiceOperationCallable() { - return stub.deleteServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   DeleteServiceRequest request =
-   *       DeleteServiceRequest.newBuilder()
-   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.deleteServiceCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteServiceCallable() { - return stub.deleteServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists imports in a 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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   ListMetadataImportsRequest request =
-   *       ListMetadataImportsRequest.newBuilder()
-   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.listMetadataImportsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (MetadataImport element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listMetadataImportsPagedCallable() { - return stub.listMetadataImportsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists imports in a 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()) {
-   *   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 - listMetadataImportsCallable() { - return stub.listMetadataImportsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single import. - * - *

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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   GetMetadataImportRequest request =
-   *       GetMetadataImportRequest.newBuilder()
-   *           .setName(
-   *               MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.getMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getMetadataImportCallable() { - return stub.getMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

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

`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 createMetadataImportAsync( - ServiceName parent, MetadataImport metadataImport, String metadataImportId) { - CreateMetadataImportRequest request = - CreateMetadataImportRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMetadataImport(metadataImport) - .setMetadataImportId(metadataImportId) - .build(); - return createMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

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

`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 createMetadataImportAsync( - String parent, MetadataImport metadataImport, String metadataImportId) { - CreateMetadataImportRequest request = - CreateMetadataImportRequest.newBuilder() - .setParent(parent) - .setMetadataImport(metadataImport) - .setMetadataImportId(metadataImportId) - .build(); - return createMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 createMetadataImportAsync( - CreateMetadataImportRequest request) { - return createMetadataImportOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createMetadataImportOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createMetadataImportOperationCallable() { - return stub.createMetadataImportOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createMetadataImportCallable() { - return stub.createMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   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`. - *

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 updateMetadataImportAsync( - MetadataImport metadataImport, FieldMask updateMask) { - UpdateMetadataImportRequest request = - UpdateMetadataImportRequest.newBuilder() - .setMetadataImport(metadataImport) - .setUpdateMask(updateMask) - .build(); - return updateMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   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 updateMetadataImportAsync( - UpdateMetadataImportRequest request) { - return updateMetadataImportOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   UpdateMetadataImportRequest request =
-   *       UpdateMetadataImportRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setMetadataImport(MetadataImport.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.updateMetadataImportOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateMetadataImportOperationCallable() { - return stub.updateMetadataImportOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   UpdateMetadataImportRequest request =
-   *       UpdateMetadataImportRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setMetadataImport(MetadataImport.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.updateMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateMetadataImportCallable() { - return stub.updateMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   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 exportMetadataAsync( - ExportMetadataRequest request) { - return exportMetadataOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   ExportMetadataRequest request =
-   *       ExportMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.exportMetadataOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataExport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - exportMetadataOperationCallable() { - return stub.exportMetadataOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   ExportMetadataRequest request =
-   *       ExportMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.exportMetadataCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable exportMetadataCallable() { - return stub.exportMetadataCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - ServiceName service, BackupName backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service == null ? null : service.toString()) - .setBackup(backup == null ? null : backup.toString()) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - ServiceName service, String backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service == null ? null : service.toString()) - .setBackup(backup) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - String service, BackupName backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service) - .setBackup(backup == null ? null : backup.toString()) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - String service, String backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder().setService(service).setBackup(backup).build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   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 restoreServiceAsync( - RestoreServiceRequest request) { - return restoreServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   RestoreServiceRequest request =
-   *       RestoreServiceRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setBackup(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.restoreServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Restore response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - restoreServiceOperationCallable() { - return stub.restoreServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   RestoreServiceRequest request =
-   *       RestoreServiceRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setBackup(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.restoreServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable restoreServiceCallable() { - return stub.restoreServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists backups in a 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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.listBackupsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Backup element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listBackupsPagedCallable() { - return stub.listBackupsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists backups in a 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()) {
-   *   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 listBackupsCallable() { - return stub.listBackupsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single backup. - * - *

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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   GetBackupRequest request =
-   *       GetBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .build();
-   *   ApiFuture future = dataprocMetastoreClient.getBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getBackupCallable() { - return stub.getBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

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

`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 createBackupAsync( - ServiceName parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

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

`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 createBackupAsync( - String parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 createBackupAsync( - CreateBackupRequest request) { - return createBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createBackupOperationCallable() { - return stub.createBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createBackupCallable() { - return stub.createBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   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: - *

`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 deleteBackupAsync(BackupName name) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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 = 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: - *

`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 deleteBackupAsync(String name) { - DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   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 deleteBackupAsync( - DeleteBackupRequest request) { - return deleteBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.deleteBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteBackupOperationCallable() { - return stub.deleteBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.deleteBackupCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteBackupCallable() { - return stub.deleteBackupCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListServicesPagedResponse - extends AbstractPagedListResponse< - ListServicesRequest, - ListServicesResponse, - Service, - ListServicesPage, - ListServicesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListServicesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListServicesPagedResponse(ListServicesPage page) { - super(page, ListServicesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListServicesPage - extends AbstractPage { - - private ListServicesPage( - PageContext context, - ListServicesResponse response) { - super(context, response); - } - - private static ListServicesPage createEmptyPage() { - return new ListServicesPage(null, null); - } - - @Override - protected ListServicesPage createPage( - PageContext context, - ListServicesResponse response) { - return new ListServicesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListServicesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListServicesRequest, - ListServicesResponse, - Service, - ListServicesPage, - ListServicesFixedSizeCollection> { - - private ListServicesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListServicesFixedSizeCollection createEmptyCollection() { - return new ListServicesFixedSizeCollection(null, 0); - } - - @Override - protected ListServicesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListServicesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListMetadataImportsPagedResponse - extends AbstractPagedListResponse< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage, - ListMetadataImportsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListMetadataImportsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListMetadataImportsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListMetadataImportsPagedResponse(ListMetadataImportsPage page) { - super(page, ListMetadataImportsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListMetadataImportsPage - extends AbstractPage< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage> { - - private ListMetadataImportsPage( - PageContext - context, - ListMetadataImportsResponse response) { - super(context, response); - } - - private static ListMetadataImportsPage createEmptyPage() { - return new ListMetadataImportsPage(null, null); - } - - @Override - protected ListMetadataImportsPage createPage( - PageContext - context, - ListMetadataImportsResponse response) { - return new ListMetadataImportsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListMetadataImportsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage, - ListMetadataImportsFixedSizeCollection> { - - private ListMetadataImportsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListMetadataImportsFixedSizeCollection createEmptyCollection() { - return new ListMetadataImportsFixedSizeCollection(null, 0); - } - - @Override - protected ListMetadataImportsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListMetadataImportsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListBackupsPagedResponse - extends AbstractPagedListResponse< - ListBackupsRequest, - ListBackupsResponse, - Backup, - ListBackupsPage, - ListBackupsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListBackupsPagedResponse(ListBackupsPage page) { - super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListBackupsPage - extends AbstractPage { - - private ListBackupsPage( - PageContext context, - ListBackupsResponse response) { - super(context, response); - } - - private static ListBackupsPage createEmptyPage() { - return new ListBackupsPage(null, null); - } - - @Override - protected ListBackupsPage createPage( - PageContext context, - ListBackupsResponse response) { - return new ListBackupsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListBackupsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListBackupsRequest, - ListBackupsResponse, - Backup, - ListBackupsPage, - ListBackupsFixedSizeCollection> { - - private ListBackupsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListBackupsFixedSizeCollection createEmptyCollection() { - return new ListBackupsFixedSizeCollection(null, 0); - } - - @Override - protected ListBackupsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListBackupsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClient.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClient.java deleted file mode 100644 index 49a018761229..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClient.java +++ /dev/null @@ -1,1110 +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.DataprocMetastoreFederationStub; -import com.google.cloud.metastore.v1.stub.DataprocMetastoreFederationStubSettings; -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 federation services. Dataproc Metastore - * Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex - * Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which - * metadata from the backend metastores are served at query time. - * - *

The Dataproc Metastore Federation API defines the following resource model: - * - *

    - *
  • The service works with a collection of Google Cloud projects. - *
  • Each project has a collection of available locations. - *
  • Each location has a collection of federations. - *
  • Dataproc Metastore Federations are resources with names of the form: - * `projects/{project_number}/locations/{location_id}/federations/{federation_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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create()) {
- *   FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
- *   Federation response = dataprocMetastoreFederationClient.getFederation(name);
- * }
- * }
- * - *

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: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

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

This class can be customized by passing in a custom instance of - * DataprocMetastoreFederationSettings 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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newBuilder().setEndpoint(myEndpoint).build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newHttpJsonBuilder().build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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

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

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 (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 future =
-   *       dataprocMetastoreFederationClient.listFederationsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Federation element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listFederationsPagedCallable() { - return stub.listFederationsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists federations 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 (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 - listFederationsCallable() { - return stub.listFederationsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a single federation. - * - *

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 (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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   GetFederationRequest request =
-   *       GetFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.getFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getFederationCallable() { - return stub.getFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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: - *

`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 createFederationAsync( - LocationName parent, Federation federation, String federationId) { - CreateFederationRequest request = - CreateFederationRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFederation(federation) - .setFederationId(federationId) - .build(); - return createFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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: - *

`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 createFederationAsync( - String parent, Federation federation, String federationId) { - CreateFederationRequest request = - CreateFederationRequest.newBuilder() - .setParent(parent) - .setFederation(federation) - .setFederationId(federationId) - .build(); - return createFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 createFederationAsync( - CreateFederationRequest request) { - return createFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 future =
-   *       dataprocMetastoreFederationClient.createFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createFederationOperationCallable() { - return stub.createFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 future =
-   *       dataprocMetastoreFederationClient.createFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createFederationCallable() { - return stub.createFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (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`. - *

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 updateFederationAsync( - Federation federation, FieldMask updateMask) { - UpdateFederationRequest request = - UpdateFederationRequest.newBuilder() - .setFederation(federation) - .setUpdateMask(updateMask) - .build(); - return updateFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (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 updateFederationAsync( - UpdateFederationRequest request) { - return updateFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   UpdateFederationRequest request =
-   *       UpdateFederationRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setFederation(Federation.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreFederationClient.updateFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateFederationOperationCallable() { - return stub.updateFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   UpdateFederationRequest request =
-   *       UpdateFederationRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setFederation(Federation.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.updateFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateFederationCallable() { - return stub.updateFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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: - *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteFederationAsync( - FederationName name) { - DeleteFederationRequest request = - DeleteFederationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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: - *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteFederationAsync(String name) { - DeleteFederationRequest request = DeleteFederationRequest.newBuilder().setName(name).build(); - return deleteFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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 deleteFederationAsync( - DeleteFederationRequest request) { - return deleteFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   DeleteFederationRequest request =
-   *       DeleteFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreFederationClient.deleteFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteFederationOperationCallable() { - return stub.deleteFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   DeleteFederationRequest request =
-   *       DeleteFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.deleteFederationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteFederationCallable() { - return stub.deleteFederationCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListFederationsPagedResponse - extends AbstractPagedListResponse< - ListFederationsRequest, - ListFederationsResponse, - Federation, - ListFederationsPage, - ListFederationsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListFederationsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListFederationsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListFederationsPagedResponse(ListFederationsPage page) { - super(page, ListFederationsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListFederationsPage - extends AbstractPage< - ListFederationsRequest, ListFederationsResponse, Federation, ListFederationsPage> { - - private ListFederationsPage( - PageContext context, - ListFederationsResponse response) { - super(context, response); - } - - private static ListFederationsPage createEmptyPage() { - return new ListFederationsPage(null, null); - } - - @Override - protected ListFederationsPage createPage( - PageContext context, - ListFederationsResponse response) { - return new ListFederationsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListFederationsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListFederationsRequest, - ListFederationsResponse, - Federation, - ListFederationsPage, - ListFederationsFixedSizeCollection> { - - private ListFederationsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListFederationsFixedSizeCollection createEmptyCollection() { - return new ListFederationsFixedSizeCollection(null, 0); - } - - @Override - protected ListFederationsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListFederationsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationSettings.java deleted file mode 100644 index 35e34942e147..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationSettings.java +++ /dev/null @@ -1,300 +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 static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.metastore.v1.stub.DataprocMetastoreFederationStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreFederationClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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 { - - /** Returns the object with the settings used for calls to listFederations. */ - public PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listFederationsSettings(); - } - - /** Returns the object with the settings used for calls to getFederation. */ - public UnaryCallSettings getFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getFederationSettings(); - } - - /** Returns the object with the settings used for calls to createFederation. */ - public UnaryCallSettings createFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).createFederationSettings(); - } - - /** Returns the object with the settings used for calls to createFederation. */ - public OperationCallSettings - createFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .createFederationOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public UnaryCallSettings updateFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).updateFederationSettings(); - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public OperationCallSettings - updateFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .updateFederationOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public UnaryCallSettings deleteFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).deleteFederationSettings(); - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public OperationCallSettings - deleteFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .deleteFederationOperationSettings(); - } - - public static final DataprocMetastoreFederationSettings create( - DataprocMetastoreFederationStubSettings stub) throws IOException { - return new DataprocMetastoreFederationSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return DataprocMetastoreFederationStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DataprocMetastoreFederationStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return DataprocMetastoreFederationStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreFederationSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for DataprocMetastoreFederationSettings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(DataprocMetastoreFederationStubSettings.newBuilder(clientContext)); - } - - protected Builder(DataprocMetastoreFederationSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(DataprocMetastoreFederationStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(DataprocMetastoreFederationStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(DataprocMetastoreFederationStubSettings.newHttpJsonBuilder()); - } - - public DataprocMetastoreFederationStubSettings.Builder getStubSettingsBuilder() { - return ((DataprocMetastoreFederationStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listFederations. */ - public PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return getStubSettingsBuilder().listFederationsSettings(); - } - - /** Returns the builder for the settings used for calls to getFederation. */ - public UnaryCallSettings.Builder getFederationSettings() { - return getStubSettingsBuilder().getFederationSettings(); - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public UnaryCallSettings.Builder - createFederationSettings() { - return getStubSettingsBuilder().createFederationSettings(); - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public OperationCallSettings.Builder - createFederationOperationSettings() { - return getStubSettingsBuilder().createFederationOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public UnaryCallSettings.Builder - updateFederationSettings() { - return getStubSettingsBuilder().updateFederationSettings(); - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public OperationCallSettings.Builder - updateFederationOperationSettings() { - return getStubSettingsBuilder().updateFederationOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public UnaryCallSettings.Builder - deleteFederationSettings() { - return getStubSettingsBuilder().deleteFederationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public OperationCallSettings.Builder - deleteFederationOperationSettings() { - return getStubSettingsBuilder().deleteFederationOperationSettings(); - } - - @Override - public DataprocMetastoreFederationSettings build() throws IOException { - return new DataprocMetastoreFederationSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreSettings.java deleted file mode 100644 index 506516a0fe14..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreSettings.java +++ /dev/null @@ -1,480 +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 static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.metastore.v1.stub.DataprocMetastoreStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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 { - - /** Returns the object with the settings used for calls to listServices. */ - public PagedCallSettings - listServicesSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listServicesSettings(); - } - - /** Returns the object with the settings used for calls to getService. */ - public UnaryCallSettings getServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getServiceSettings(); - } - - /** Returns the object with the settings used for calls to createService. */ - public UnaryCallSettings createServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceSettings(); - } - - /** Returns the object with the settings used for calls to createService. */ - public OperationCallSettings - createServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateService. */ - public UnaryCallSettings updateServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceSettings(); - } - - /** Returns the object with the settings used for calls to updateService. */ - public OperationCallSettings - updateServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteService. */ - public UnaryCallSettings deleteServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceSettings(); - } - - /** Returns the object with the settings used for calls to deleteService. */ - public OperationCallSettings - deleteServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to listMetadataImports. */ - public PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listMetadataImportsSettings(); - } - - /** Returns the object with the settings used for calls to getMetadataImport. */ - public UnaryCallSettings getMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public UnaryCallSettings createMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public OperationCallSettings - createMetadataImportOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .createMetadataImportOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings updateMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public OperationCallSettings - updateMetadataImportOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .updateMetadataImportOperationSettings(); - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public UnaryCallSettings exportMetadataSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataSettings(); - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public OperationCallSettings - exportMetadataOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataOperationSettings(); - } - - /** Returns the object with the settings used for calls to restoreService. */ - public UnaryCallSettings restoreServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceSettings(); - } - - /** Returns the object with the settings used for calls to restoreService. */ - public OperationCallSettings - restoreServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listBackupsSettings(); - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupOperationSettings(); - } - - public static final DataprocMetastoreSettings create(DataprocMetastoreStubSettings stub) - throws IOException { - return new DataprocMetastoreSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return DataprocMetastoreStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return DataprocMetastoreStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DataprocMetastoreStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return DataprocMetastoreStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return DataprocMetastoreStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return DataprocMetastoreStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return DataprocMetastoreStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for DataprocMetastoreSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(DataprocMetastoreStubSettings.newBuilder(clientContext)); - } - - protected Builder(DataprocMetastoreSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(DataprocMetastoreStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(DataprocMetastoreStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(DataprocMetastoreStubSettings.newHttpJsonBuilder()); - } - - public DataprocMetastoreStubSettings.Builder getStubSettingsBuilder() { - return ((DataprocMetastoreStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listServices. */ - public PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings() { - return getStubSettingsBuilder().listServicesSettings(); - } - - /** Returns the builder for the settings used for calls to getService. */ - public UnaryCallSettings.Builder getServiceSettings() { - return getStubSettingsBuilder().getServiceSettings(); - } - - /** Returns the builder for the settings used for calls to createService. */ - public UnaryCallSettings.Builder createServiceSettings() { - return getStubSettingsBuilder().createServiceSettings(); - } - - /** Returns the builder for the settings used for calls to createService. */ - public OperationCallSettings.Builder - createServiceOperationSettings() { - return getStubSettingsBuilder().createServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateService. */ - public UnaryCallSettings.Builder updateServiceSettings() { - return getStubSettingsBuilder().updateServiceSettings(); - } - - /** Returns the builder for the settings used for calls to updateService. */ - public OperationCallSettings.Builder - updateServiceOperationSettings() { - return getStubSettingsBuilder().updateServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public UnaryCallSettings.Builder deleteServiceSettings() { - return getStubSettingsBuilder().deleteServiceSettings(); - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public OperationCallSettings.Builder - deleteServiceOperationSettings() { - return getStubSettingsBuilder().deleteServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listMetadataImports. */ - public PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return getStubSettingsBuilder().listMetadataImportsSettings(); - } - - /** Returns the builder for the settings used for calls to getMetadataImport. */ - public UnaryCallSettings.Builder - getMetadataImportSettings() { - return getStubSettingsBuilder().getMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public UnaryCallSettings.Builder - createMetadataImportSettings() { - return getStubSettingsBuilder().createMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings() { - return getStubSettingsBuilder().createMetadataImportOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings.Builder - updateMetadataImportSettings() { - return getStubSettingsBuilder().updateMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings() { - return getStubSettingsBuilder().updateMetadataImportOperationSettings(); - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public UnaryCallSettings.Builder exportMetadataSettings() { - return getStubSettingsBuilder().exportMetadataSettings(); - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public OperationCallSettings.Builder - exportMetadataOperationSettings() { - return getStubSettingsBuilder().exportMetadataOperationSettings(); - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public UnaryCallSettings.Builder restoreServiceSettings() { - return getStubSettingsBuilder().restoreServiceSettings(); - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public OperationCallSettings.Builder - restoreServiceOperationSettings() { - return getStubSettingsBuilder().restoreServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return getStubSettingsBuilder().listBackupsSettings(); - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getStubSettingsBuilder().getBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return getStubSettingsBuilder().createBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public OperationCallSettings.Builder - createBackupOperationSettings() { - return getStubSettingsBuilder().createBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return getStubSettingsBuilder().deleteBackupSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return getStubSettingsBuilder().deleteBackupOperationSettings(); - } - - @Override - public DataprocMetastoreSettings build() throws IOException { - return new DataprocMetastoreSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/gapic_metadata.json b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/gapic_metadata.json deleted file mode 100644 index 2c38a49d4d49..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/gapic_metadata.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.metastore.v1", - "libraryPackage": "com.google.cloud.metastore.v1", - "services": { - "DataprocMetastore": { - "clients": { - "grpc": { - "libraryClient": "DataprocMetastoreClient", - "rpcs": { - "CreateBackup": { - "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] - }, - "CreateMetadataImport": { - "methods": ["createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportOperationCallable", "createMetadataImportCallable"] - }, - "CreateService": { - "methods": ["createServiceAsync", "createServiceAsync", "createServiceAsync", "createServiceOperationCallable", "createServiceCallable"] - }, - "DeleteBackup": { - "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] - }, - "DeleteService": { - "methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] - }, - "ExportMetadata": { - "methods": ["exportMetadataAsync", "exportMetadataOperationCallable", "exportMetadataCallable"] - }, - "GetBackup": { - "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] - }, - "GetMetadataImport": { - "methods": ["getMetadataImport", "getMetadataImport", "getMetadataImport", "getMetadataImportCallable"] - }, - "GetService": { - "methods": ["getService", "getService", "getService", "getServiceCallable"] - }, - "ListBackups": { - "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] - }, - "ListMetadataImports": { - "methods": ["listMetadataImports", "listMetadataImports", "listMetadataImports", "listMetadataImportsPagedCallable", "listMetadataImportsCallable"] - }, - "ListServices": { - "methods": ["listServices", "listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] - }, - "RestoreService": { - "methods": ["restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceOperationCallable", "restoreServiceCallable"] - }, - "UpdateMetadataImport": { - "methods": ["updateMetadataImportAsync", "updateMetadataImportAsync", "updateMetadataImportOperationCallable", "updateMetadataImportCallable"] - }, - "UpdateService": { - "methods": ["updateServiceAsync", "updateServiceAsync", "updateServiceOperationCallable", "updateServiceCallable"] - } - } - } - } - }, - "DataprocMetastoreFederation": { - "clients": { - "grpc": { - "libraryClient": "DataprocMetastoreFederationClient", - "rpcs": { - "CreateFederation": { - "methods": ["createFederationAsync", "createFederationAsync", "createFederationAsync", "createFederationOperationCallable", "createFederationCallable"] - }, - "DeleteFederation": { - "methods": ["deleteFederationAsync", "deleteFederationAsync", "deleteFederationAsync", "deleteFederationOperationCallable", "deleteFederationCallable"] - }, - "GetFederation": { - "methods": ["getFederation", "getFederation", "getFederation", "getFederationCallable"] - }, - "ListFederations": { - "methods": ["listFederations", "listFederations", "listFederations", "listFederationsPagedCallable", "listFederationsCallable"] - }, - "UpdateFederation": { - "methods": ["updateFederationAsync", "updateFederationAsync", "updateFederationOperationCallable", "updateFederationCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStub.java deleted file mode 100644 index db13624d9ece..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStub.java +++ /dev/null @@ -1,96 +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.stub; - -import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.CreateFederationRequest; -import com.google.cloud.metastore.v1.DeleteFederationRequest; -import com.google.cloud.metastore.v1.Federation; -import com.google.cloud.metastore.v1.GetFederationRequest; -import com.google.cloud.metastore.v1.ListFederationsRequest; -import com.google.cloud.metastore.v1.ListFederationsResponse; -import com.google.cloud.metastore.v1.OperationMetadata; -import com.google.cloud.metastore.v1.UpdateFederationRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the DataprocMetastoreFederation service API. - * - *

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 - listFederationsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listFederationsPagedCallable()"); - } - - public UnaryCallable listFederationsCallable() { - throw new UnsupportedOperationException("Not implemented: listFederationsCallable()"); - } - - public UnaryCallable getFederationCallable() { - throw new UnsupportedOperationException("Not implemented: getFederationCallable()"); - } - - public OperationCallable - createFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createFederationOperationCallable()"); - } - - public UnaryCallable createFederationCallable() { - throw new UnsupportedOperationException("Not implemented: createFederationCallable()"); - } - - public OperationCallable - updateFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateFederationOperationCallable()"); - } - - public UnaryCallable updateFederationCallable() { - throw new UnsupportedOperationException("Not implemented: updateFederationCallable()"); - } - - public OperationCallable - deleteFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFederationOperationCallable()"); - } - - public UnaryCallable deleteFederationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFederationCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStubSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStubSettings.java deleted file mode 100644 index 2ae816f374e4..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStubSettings.java +++ /dev/null @@ -1,635 +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.stub; - -import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.CreateFederationRequest; -import com.google.cloud.metastore.v1.DeleteFederationRequest; -import com.google.cloud.metastore.v1.Federation; -import com.google.cloud.metastore.v1.GetFederationRequest; -import com.google.cloud.metastore.v1.ListFederationsRequest; -import com.google.cloud.metastore.v1.ListFederationsResponse; -import com.google.cloud.metastore.v1.OperationMetadata; -import com.google.cloud.metastore.v1.UpdateFederationRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreFederationStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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 { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings; - private final UnaryCallSettings getFederationSettings; - private final UnaryCallSettings createFederationSettings; - private final OperationCallSettings - createFederationOperationSettings; - private final UnaryCallSettings updateFederationSettings; - private final OperationCallSettings - updateFederationOperationSettings; - private final UnaryCallSettings deleteFederationSettings; - private final OperationCallSettings - deleteFederationOperationSettings; - - private static final PagedListDescriptor< - ListFederationsRequest, ListFederationsResponse, Federation> - LIST_FEDERATIONS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListFederationsRequest injectToken( - ListFederationsRequest payload, String token) { - return ListFederationsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListFederationsRequest injectPageSize( - ListFederationsRequest payload, int pageSize) { - return ListFederationsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListFederationsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListFederationsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListFederationsResponse payload) { - return payload.getFederationsList() == null - ? ImmutableList.of() - : payload.getFederationsList(); - } - }; - - private static final PagedListResponseFactory< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - LIST_FEDERATIONS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListFederationsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_FEDERATIONS_PAGE_STR_DESC, request, context); - return ListFederationsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listFederations. */ - public PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return listFederationsSettings; - } - - /** Returns the object with the settings used for calls to getFederation. */ - public UnaryCallSettings getFederationSettings() { - return getFederationSettings; - } - - /** Returns the object with the settings used for calls to createFederation. */ - public UnaryCallSettings createFederationSettings() { - return createFederationSettings; - } - - /** Returns the object with the settings used for calls to createFederation. */ - public OperationCallSettings - createFederationOperationSettings() { - return createFederationOperationSettings; - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public UnaryCallSettings updateFederationSettings() { - return updateFederationSettings; - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public OperationCallSettings - updateFederationOperationSettings() { - return updateFederationOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public UnaryCallSettings deleteFederationSettings() { - return deleteFederationSettings; - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public OperationCallSettings - deleteFederationOperationSettings() { - return deleteFederationOperationSettings; - } - - public DataprocMetastoreFederationStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcDataprocMetastoreFederationStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonDataprocMetastoreFederationStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "metastore.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "metastore.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreFederationStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listFederationsSettings = settingsBuilder.listFederationsSettings().build(); - getFederationSettings = settingsBuilder.getFederationSettings().build(); - createFederationSettings = settingsBuilder.createFederationSettings().build(); - createFederationOperationSettings = settingsBuilder.createFederationOperationSettings().build(); - updateFederationSettings = settingsBuilder.updateFederationSettings().build(); - updateFederationOperationSettings = settingsBuilder.updateFederationOperationSettings().build(); - deleteFederationSettings = settingsBuilder.deleteFederationSettings().build(); - deleteFederationOperationSettings = settingsBuilder.deleteFederationOperationSettings().build(); - } - - /** Builder for DataprocMetastoreFederationStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings; - private final UnaryCallSettings.Builder getFederationSettings; - private final UnaryCallSettings.Builder - createFederationSettings; - private final OperationCallSettings.Builder< - CreateFederationRequest, Federation, OperationMetadata> - createFederationOperationSettings; - private final UnaryCallSettings.Builder - updateFederationSettings; - private final OperationCallSettings.Builder< - UpdateFederationRequest, Federation, OperationMetadata> - updateFederationOperationSettings; - private final UnaryCallSettings.Builder - deleteFederationSettings; - private final OperationCallSettings.Builder - deleteFederationOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listFederationsSettings = PagedCallSettings.newBuilder(LIST_FEDERATIONS_PAGE_STR_FACT); - getFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFederationOperationSettings = OperationCallSettings.newBuilder(); - updateFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateFederationOperationSettings = OperationCallSettings.newBuilder(); - deleteFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteFederationOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listFederationsSettings, - getFederationSettings, - createFederationSettings, - updateFederationSettings, - deleteFederationSettings); - initDefaults(this); - } - - protected Builder(DataprocMetastoreFederationStubSettings settings) { - super(settings); - - listFederationsSettings = settings.listFederationsSettings.toBuilder(); - getFederationSettings = settings.getFederationSettings.toBuilder(); - createFederationSettings = settings.createFederationSettings.toBuilder(); - createFederationOperationSettings = settings.createFederationOperationSettings.toBuilder(); - updateFederationSettings = settings.updateFederationSettings.toBuilder(); - updateFederationOperationSettings = settings.updateFederationOperationSettings.toBuilder(); - deleteFederationSettings = settings.deleteFederationSettings.toBuilder(); - deleteFederationOperationSettings = settings.deleteFederationOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listFederationsSettings, - getFederationSettings, - createFederationSettings, - updateFederationSettings, - deleteFederationSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listFederationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .updateFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .deleteFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listFederations. */ - public PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return listFederationsSettings; - } - - /** Returns the builder for the settings used for calls to getFederation. */ - public UnaryCallSettings.Builder getFederationSettings() { - return getFederationSettings; - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public UnaryCallSettings.Builder - createFederationSettings() { - return createFederationSettings; - } - - /** Returns the builder for the settings used for calls to createFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createFederationOperationSettings() { - return createFederationOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public UnaryCallSettings.Builder - updateFederationSettings() { - return updateFederationSettings; - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateFederationOperationSettings() { - return updateFederationOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public UnaryCallSettings.Builder - deleteFederationSettings() { - return deleteFederationSettings; - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteFederationOperationSettings() { - return deleteFederationOperationSettings; - } - - @Override - public DataprocMetastoreFederationStubSettings build() throws IOException { - return new DataprocMetastoreFederationStubSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java deleted file mode 100644 index 4002a94cde78..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java +++ /dev/null @@ -1,195 +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.stub; - -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.Backup; -import com.google.cloud.metastore.v1.CreateBackupRequest; -import com.google.cloud.metastore.v1.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1.CreateServiceRequest; -import com.google.cloud.metastore.v1.DeleteBackupRequest; -import com.google.cloud.metastore.v1.DeleteServiceRequest; -import com.google.cloud.metastore.v1.ExportMetadataRequest; -import com.google.cloud.metastore.v1.GetBackupRequest; -import com.google.cloud.metastore.v1.GetMetadataImportRequest; -import com.google.cloud.metastore.v1.GetServiceRequest; -import com.google.cloud.metastore.v1.ListBackupsRequest; -import com.google.cloud.metastore.v1.ListBackupsResponse; -import com.google.cloud.metastore.v1.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1.ListServicesRequest; -import com.google.cloud.metastore.v1.ListServicesResponse; -import com.google.cloud.metastore.v1.MetadataExport; -import com.google.cloud.metastore.v1.MetadataImport; -import com.google.cloud.metastore.v1.OperationMetadata; -import com.google.cloud.metastore.v1.Restore; -import com.google.cloud.metastore.v1.RestoreServiceRequest; -import com.google.cloud.metastore.v1.Service; -import com.google.cloud.metastore.v1.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1.UpdateServiceRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class DataprocMetastoreStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable listServicesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); - } - - public UnaryCallable listServicesCallable() { - throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); - } - - public UnaryCallable getServiceCallable() { - throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); - } - - public OperationCallable - createServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createServiceOperationCallable()"); - } - - public UnaryCallable createServiceCallable() { - throw new UnsupportedOperationException("Not implemented: createServiceCallable()"); - } - - public OperationCallable - updateServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateServiceOperationCallable()"); - } - - public UnaryCallable updateServiceCallable() { - throw new UnsupportedOperationException("Not implemented: updateServiceCallable()"); - } - - public OperationCallable - deleteServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); - } - - public UnaryCallable deleteServiceCallable() { - throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); - } - - public UnaryCallable - listMetadataImportsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listMetadataImportsPagedCallable()"); - } - - public UnaryCallable - listMetadataImportsCallable() { - throw new UnsupportedOperationException("Not implemented: listMetadataImportsCallable()"); - } - - public UnaryCallable getMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: getMetadataImportCallable()"); - } - - public OperationCallable - createMetadataImportOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: createMetadataImportOperationCallable()"); - } - - public UnaryCallable createMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: createMetadataImportCallable()"); - } - - public OperationCallable - updateMetadataImportOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: updateMetadataImportOperationCallable()"); - } - - public UnaryCallable updateMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: updateMetadataImportCallable()"); - } - - public OperationCallable - exportMetadataOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportMetadataOperationCallable()"); - } - - public UnaryCallable exportMetadataCallable() { - throw new UnsupportedOperationException("Not implemented: exportMetadataCallable()"); - } - - public OperationCallable - restoreServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: restoreServiceOperationCallable()"); - } - - public UnaryCallable restoreServiceCallable() { - throw new UnsupportedOperationException("Not implemented: restoreServiceCallable()"); - } - - public UnaryCallable listBackupsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); - } - - public UnaryCallable listBackupsCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); - } - - public UnaryCallable getBackupCallable() { - throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); - } - - public OperationCallable - createBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); - } - - public UnaryCallable createBackupCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); - } - - public OperationCallable - deleteBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); - } - - public UnaryCallable deleteBackupCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStubSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStubSettings.java deleted file mode 100644 index e26b2f179809..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStubSettings.java +++ /dev/null @@ -1,1305 +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.stub; - -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.Backup; -import com.google.cloud.metastore.v1.CreateBackupRequest; -import com.google.cloud.metastore.v1.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1.CreateServiceRequest; -import com.google.cloud.metastore.v1.DeleteBackupRequest; -import com.google.cloud.metastore.v1.DeleteServiceRequest; -import com.google.cloud.metastore.v1.ExportMetadataRequest; -import com.google.cloud.metastore.v1.GetBackupRequest; -import com.google.cloud.metastore.v1.GetMetadataImportRequest; -import com.google.cloud.metastore.v1.GetServiceRequest; -import com.google.cloud.metastore.v1.ListBackupsRequest; -import com.google.cloud.metastore.v1.ListBackupsResponse; -import com.google.cloud.metastore.v1.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1.ListServicesRequest; -import com.google.cloud.metastore.v1.ListServicesResponse; -import com.google.cloud.metastore.v1.MetadataExport; -import com.google.cloud.metastore.v1.MetadataImport; -import com.google.cloud.metastore.v1.OperationMetadata; -import com.google.cloud.metastore.v1.Restore; -import com.google.cloud.metastore.v1.RestoreServiceRequest; -import com.google.cloud.metastore.v1.Service; -import com.google.cloud.metastore.v1.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1.UpdateServiceRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataprocMetastoreStubSettings.Builder dataprocMetastoreSettingsBuilder =
- *     DataprocMetastoreStubSettings.newBuilder();
- * dataprocMetastoreSettingsBuilder
- *     .getServiceSettings()
- *     .setRetrySettings(
- *         dataprocMetastoreSettingsBuilder
- *             .getServiceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * DataprocMetastoreStubSettings dataprocMetastoreSettings =
- *     dataprocMetastoreSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class DataprocMetastoreStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings; - private final UnaryCallSettings getServiceSettings; - private final UnaryCallSettings createServiceSettings; - private final OperationCallSettings - createServiceOperationSettings; - private final UnaryCallSettings updateServiceSettings; - private final OperationCallSettings - updateServiceOperationSettings; - private final UnaryCallSettings deleteServiceSettings; - private final OperationCallSettings - deleteServiceOperationSettings; - private final PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings; - private final UnaryCallSettings - getMetadataImportSettings; - private final UnaryCallSettings - createMetadataImportSettings; - private final OperationCallSettings< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings; - private final UnaryCallSettings - updateMetadataImportSettings; - private final OperationCallSettings< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings; - private final UnaryCallSettings exportMetadataSettings; - private final OperationCallSettings - exportMetadataOperationSettings; - private final UnaryCallSettings restoreServiceSettings; - private final OperationCallSettings - restoreServiceOperationSettings; - private final PagedCallSettings - listBackupsSettings; - private final UnaryCallSettings getBackupSettings; - private final UnaryCallSettings createBackupSettings; - private final OperationCallSettings - createBackupOperationSettings; - private final UnaryCallSettings deleteBackupSettings; - private final OperationCallSettings - deleteBackupOperationSettings; - - private static final PagedListDescriptor - LIST_SERVICES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListServicesRequest injectToken(ListServicesRequest payload, String token) { - return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { - return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListServicesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListServicesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListServicesResponse payload) { - return payload.getServicesList() == null - ? ImmutableList.of() - : payload.getServicesList(); - } - }; - - private static final PagedListDescriptor< - ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport> - LIST_METADATA_IMPORTS_PAGE_STR_DESC = - new PagedListDescriptor< - ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListMetadataImportsRequest injectToken( - ListMetadataImportsRequest payload, String token) { - return ListMetadataImportsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListMetadataImportsRequest injectPageSize( - ListMetadataImportsRequest payload, int pageSize) { - return ListMetadataImportsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListMetadataImportsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListMetadataImportsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListMetadataImportsResponse payload) { - return payload.getMetadataImportsList() == null - ? ImmutableList.of() - : payload.getMetadataImportsList(); - } - }; - - private static final PagedListDescriptor - LIST_BACKUPS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { - return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { - return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListBackupsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListBackupsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListBackupsResponse payload) { - return payload.getBackupsList() == null - ? ImmutableList.of() - : payload.getBackupsList(); - } - }; - - private static final PagedListResponseFactory< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - LIST_SERVICES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListServicesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); - return ListServicesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - LIST_METADATA_IMPORTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListMetadataImportsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_METADATA_IMPORTS_PAGE_STR_DESC, request, context); - return ListMetadataImportsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - LIST_BACKUPS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListBackupsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); - return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listServices. */ - public PagedCallSettings - listServicesSettings() { - return listServicesSettings; - } - - /** Returns the object with the settings used for calls to getService. */ - public UnaryCallSettings getServiceSettings() { - return getServiceSettings; - } - - /** Returns the object with the settings used for calls to createService. */ - public UnaryCallSettings createServiceSettings() { - return createServiceSettings; - } - - /** Returns the object with the settings used for calls to createService. */ - public OperationCallSettings - createServiceOperationSettings() { - return createServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to updateService. */ - public UnaryCallSettings updateServiceSettings() { - return updateServiceSettings; - } - - /** Returns the object with the settings used for calls to updateService. */ - public OperationCallSettings - updateServiceOperationSettings() { - return updateServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteService. */ - public UnaryCallSettings deleteServiceSettings() { - return deleteServiceSettings; - } - - /** Returns the object with the settings used for calls to deleteService. */ - public OperationCallSettings - deleteServiceOperationSettings() { - return deleteServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to listMetadataImports. */ - public PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return listMetadataImportsSettings; - } - - /** Returns the object with the settings used for calls to getMetadataImport. */ - public UnaryCallSettings getMetadataImportSettings() { - return getMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public UnaryCallSettings createMetadataImportSettings() { - return createMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public OperationCallSettings - createMetadataImportOperationSettings() { - return createMetadataImportOperationSettings; - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings updateMetadataImportSettings() { - return updateMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public OperationCallSettings - updateMetadataImportOperationSettings() { - return updateMetadataImportOperationSettings; - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public UnaryCallSettings exportMetadataSettings() { - return exportMetadataSettings; - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public OperationCallSettings - exportMetadataOperationSettings() { - return exportMetadataOperationSettings; - } - - /** Returns the object with the settings used for calls to restoreService. */ - public UnaryCallSettings restoreServiceSettings() { - return restoreServiceSettings; - } - - /** Returns the object with the settings used for calls to restoreService. */ - public OperationCallSettings - restoreServiceOperationSettings() { - return restoreServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return getBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return createBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - public DataprocMetastoreStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcDataprocMetastoreStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonDataprocMetastoreStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "metastore.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "metastore.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listServicesSettings = settingsBuilder.listServicesSettings().build(); - getServiceSettings = settingsBuilder.getServiceSettings().build(); - createServiceSettings = settingsBuilder.createServiceSettings().build(); - createServiceOperationSettings = settingsBuilder.createServiceOperationSettings().build(); - updateServiceSettings = settingsBuilder.updateServiceSettings().build(); - updateServiceOperationSettings = settingsBuilder.updateServiceOperationSettings().build(); - deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); - deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); - listMetadataImportsSettings = settingsBuilder.listMetadataImportsSettings().build(); - getMetadataImportSettings = settingsBuilder.getMetadataImportSettings().build(); - createMetadataImportSettings = settingsBuilder.createMetadataImportSettings().build(); - createMetadataImportOperationSettings = - settingsBuilder.createMetadataImportOperationSettings().build(); - updateMetadataImportSettings = settingsBuilder.updateMetadataImportSettings().build(); - updateMetadataImportOperationSettings = - settingsBuilder.updateMetadataImportOperationSettings().build(); - exportMetadataSettings = settingsBuilder.exportMetadataSettings().build(); - exportMetadataOperationSettings = settingsBuilder.exportMetadataOperationSettings().build(); - restoreServiceSettings = settingsBuilder.restoreServiceSettings().build(); - restoreServiceOperationSettings = settingsBuilder.restoreServiceOperationSettings().build(); - listBackupsSettings = settingsBuilder.listBackupsSettings().build(); - getBackupSettings = settingsBuilder.getBackupSettings().build(); - createBackupSettings = settingsBuilder.createBackupSettings().build(); - createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); - deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); - deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); - } - - /** Builder for DataprocMetastoreStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings; - private final UnaryCallSettings.Builder getServiceSettings; - private final UnaryCallSettings.Builder createServiceSettings; - private final OperationCallSettings.Builder - createServiceOperationSettings; - private final UnaryCallSettings.Builder updateServiceSettings; - private final OperationCallSettings.Builder - updateServiceOperationSettings; - private final UnaryCallSettings.Builder deleteServiceSettings; - private final OperationCallSettings.Builder - deleteServiceOperationSettings; - private final PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings; - private final UnaryCallSettings.Builder - getMetadataImportSettings; - private final UnaryCallSettings.Builder - createMetadataImportSettings; - private final OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings; - private final UnaryCallSettings.Builder - updateMetadataImportSettings; - private final OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings; - private final UnaryCallSettings.Builder - exportMetadataSettings; - private final OperationCallSettings.Builder< - ExportMetadataRequest, MetadataExport, OperationMetadata> - exportMetadataOperationSettings; - private final UnaryCallSettings.Builder - restoreServiceSettings; - private final OperationCallSettings.Builder - restoreServiceOperationSettings; - private final PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings; - private final UnaryCallSettings.Builder getBackupSettings; - private final UnaryCallSettings.Builder createBackupSettings; - private final OperationCallSettings.Builder - createBackupOperationSettings; - private final UnaryCallSettings.Builder deleteBackupSettings; - private final OperationCallSettings.Builder - deleteBackupOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); - getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createServiceOperationSettings = OperationCallSettings.newBuilder(); - updateServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateServiceOperationSettings = OperationCallSettings.newBuilder(); - deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteServiceOperationSettings = OperationCallSettings.newBuilder(); - listMetadataImportsSettings = - PagedCallSettings.newBuilder(LIST_METADATA_IMPORTS_PAGE_STR_FACT); - getMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createMetadataImportOperationSettings = OperationCallSettings.newBuilder(); - updateMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateMetadataImportOperationSettings = OperationCallSettings.newBuilder(); - exportMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - exportMetadataOperationSettings = OperationCallSettings.newBuilder(); - restoreServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - restoreServiceOperationSettings = OperationCallSettings.newBuilder(); - listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); - getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupOperationSettings = OperationCallSettings.newBuilder(); - deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteBackupOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listServicesSettings, - getServiceSettings, - createServiceSettings, - updateServiceSettings, - deleteServiceSettings, - listMetadataImportsSettings, - getMetadataImportSettings, - createMetadataImportSettings, - updateMetadataImportSettings, - exportMetadataSettings, - restoreServiceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings); - initDefaults(this); - } - - protected Builder(DataprocMetastoreStubSettings settings) { - super(settings); - - listServicesSettings = settings.listServicesSettings.toBuilder(); - getServiceSettings = settings.getServiceSettings.toBuilder(); - createServiceSettings = settings.createServiceSettings.toBuilder(); - createServiceOperationSettings = settings.createServiceOperationSettings.toBuilder(); - updateServiceSettings = settings.updateServiceSettings.toBuilder(); - updateServiceOperationSettings = settings.updateServiceOperationSettings.toBuilder(); - deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); - deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); - listMetadataImportsSettings = settings.listMetadataImportsSettings.toBuilder(); - getMetadataImportSettings = settings.getMetadataImportSettings.toBuilder(); - createMetadataImportSettings = settings.createMetadataImportSettings.toBuilder(); - createMetadataImportOperationSettings = - settings.createMetadataImportOperationSettings.toBuilder(); - updateMetadataImportSettings = settings.updateMetadataImportSettings.toBuilder(); - updateMetadataImportOperationSettings = - settings.updateMetadataImportOperationSettings.toBuilder(); - exportMetadataSettings = settings.exportMetadataSettings.toBuilder(); - exportMetadataOperationSettings = settings.exportMetadataOperationSettings.toBuilder(); - restoreServiceSettings = settings.restoreServiceSettings.toBuilder(); - restoreServiceOperationSettings = settings.restoreServiceOperationSettings.toBuilder(); - listBackupsSettings = settings.listBackupsSettings.toBuilder(); - getBackupSettings = settings.getBackupSettings.toBuilder(); - createBackupSettings = settings.createBackupSettings.toBuilder(); - createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); - deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); - deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listServicesSettings, - getServiceSettings, - createServiceSettings, - updateServiceSettings, - deleteServiceSettings, - listMetadataImportsSettings, - getMetadataImportSettings, - createMetadataImportSettings, - updateMetadataImportSettings, - exportMetadataSettings, - restoreServiceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listServicesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listMetadataImportsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .exportMetadataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .restoreServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listBackupsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .createServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Service.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .updateServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Service.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(3000000L)) - .build())); - - builder - .deleteServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1500000L)) - .build())); - - builder - .createMetadataImportOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .updateMetadataImportOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1200000L)) - .build())); - - builder - .exportMetadataOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataExport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .restoreServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Restore.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .createBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .deleteBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1500000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listServices. */ - public PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings() { - return listServicesSettings; - } - - /** Returns the builder for the settings used for calls to getService. */ - public UnaryCallSettings.Builder getServiceSettings() { - return getServiceSettings; - } - - /** Returns the builder for the settings used for calls to createService. */ - public UnaryCallSettings.Builder createServiceSettings() { - return createServiceSettings; - } - - /** Returns the builder for the settings used for calls to createService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createServiceOperationSettings() { - return createServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateService. */ - public UnaryCallSettings.Builder updateServiceSettings() { - return updateServiceSettings; - } - - /** Returns the builder for the settings used for calls to updateService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateServiceOperationSettings() { - return updateServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public UnaryCallSettings.Builder deleteServiceSettings() { - return deleteServiceSettings; - } - - /** Returns the builder for the settings used for calls to deleteService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteServiceOperationSettings() { - return deleteServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to listMetadataImports. */ - public PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return listMetadataImportsSettings; - } - - /** Returns the builder for the settings used for calls to getMetadataImport. */ - public UnaryCallSettings.Builder - getMetadataImportSettings() { - return getMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public UnaryCallSettings.Builder - createMetadataImportSettings() { - return createMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings() { - return createMetadataImportOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings.Builder - updateMetadataImportSettings() { - return updateMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings() { - return updateMetadataImportOperationSettings; - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public UnaryCallSettings.Builder exportMetadataSettings() { - return exportMetadataSettings; - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportMetadataOperationSettings() { - return exportMetadataOperationSettings; - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public UnaryCallSettings.Builder restoreServiceSettings() { - return restoreServiceSettings; - } - - /** Returns the builder for the settings used for calls to restoreService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - restoreServiceOperationSettings() { - return restoreServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return createBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - @Override - public DataprocMetastoreStubSettings build() throws IOException { - return new DataprocMetastoreStubSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationStub.java deleted file mode 100644 index 7ff8d6e5fc06..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationStub.java +++ /dev/null @@ -1,353 +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.stub; - -import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.CreateFederationRequest; -import com.google.cloud.metastore.v1.DeleteFederationRequest; -import com.google.cloud.metastore.v1.Federation; -import com.google.cloud.metastore.v1.GetFederationRequest; -import com.google.cloud.metastore.v1.ListFederationsRequest; -import com.google.cloud.metastore.v1.ListFederationsResponse; -import com.google.cloud.metastore.v1.OperationMetadata; -import com.google.cloud.metastore.v1.UpdateFederationRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the DataprocMetastoreFederation service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { - private static final MethodDescriptor - listFederationsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/ListFederations") - .setRequestMarshaller( - ProtoUtils.marshaller(ListFederationsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListFederationsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/GetFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(GetFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Federation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/CreateFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/UpdateFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/DeleteFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable - listFederationsCallable; - private final UnaryCallable - listFederationsPagedCallable; - private final UnaryCallable getFederationCallable; - private final UnaryCallable createFederationCallable; - private final OperationCallable - createFederationOperationCallable; - private final UnaryCallable updateFederationCallable; - private final OperationCallable - updateFederationOperationCallable; - private final UnaryCallable deleteFederationCallable; - private final OperationCallable - deleteFederationOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcDataprocMetastoreFederationStub create( - DataprocMetastoreFederationStubSettings settings) throws IOException { - return new GrpcDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); - } - - public static final GrpcDataprocMetastoreFederationStub create(ClientContext clientContext) - throws IOException { - return new GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcDataprocMetastoreFederationStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcDataprocMetastoreFederationCallableFactory()); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - listFederationsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listFederationsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("federation.name", String.valueOf(request.getFederation().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.listFederationsCallable = - callableFactory.createUnaryCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.listFederationsPagedCallable = - callableFactory.createPagedCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.getFederationCallable = - callableFactory.createUnaryCallable( - getFederationTransportSettings, settings.getFederationSettings(), clientContext); - this.createFederationCallable = - callableFactory.createUnaryCallable( - createFederationTransportSettings, settings.createFederationSettings(), clientContext); - this.createFederationOperationCallable = - callableFactory.createOperationCallable( - createFederationTransportSettings, - settings.createFederationOperationSettings(), - clientContext, - operationsStub); - this.updateFederationCallable = - callableFactory.createUnaryCallable( - updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); - this.updateFederationOperationCallable = - callableFactory.createOperationCallable( - updateFederationTransportSettings, - settings.updateFederationOperationSettings(), - clientContext, - operationsStub); - this.deleteFederationCallable = - callableFactory.createUnaryCallable( - deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); - this.deleteFederationOperationCallable = - callableFactory.createOperationCallable( - deleteFederationTransportSettings, - settings.deleteFederationOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listFederationsCallable() { - return listFederationsCallable; - } - - @Override - public UnaryCallable - listFederationsPagedCallable() { - return listFederationsPagedCallable; - } - - @Override - public UnaryCallable getFederationCallable() { - return getFederationCallable; - } - - @Override - public UnaryCallable createFederationCallable() { - return createFederationCallable; - } - - @Override - public OperationCallable - createFederationOperationCallable() { - return createFederationOperationCallable; - } - - @Override - public UnaryCallable updateFederationCallable() { - return updateFederationCallable; - } - - @Override - public OperationCallable - updateFederationOperationCallable() { - return updateFederationOperationCallable; - } - - @Override - public UnaryCallable deleteFederationCallable() { - return deleteFederationCallable; - } - - @Override - public OperationCallable - deleteFederationOperationCallable() { - return deleteFederationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreStub.java deleted file mode 100644 index 4d3c82851d91..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreStub.java +++ /dev/null @@ -1,764 +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.stub; - -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.Backup; -import com.google.cloud.metastore.v1.CreateBackupRequest; -import com.google.cloud.metastore.v1.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1.CreateServiceRequest; -import com.google.cloud.metastore.v1.DeleteBackupRequest; -import com.google.cloud.metastore.v1.DeleteServiceRequest; -import com.google.cloud.metastore.v1.ExportMetadataRequest; -import com.google.cloud.metastore.v1.GetBackupRequest; -import com.google.cloud.metastore.v1.GetMetadataImportRequest; -import com.google.cloud.metastore.v1.GetServiceRequest; -import com.google.cloud.metastore.v1.ListBackupsRequest; -import com.google.cloud.metastore.v1.ListBackupsResponse; -import com.google.cloud.metastore.v1.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1.ListServicesRequest; -import com.google.cloud.metastore.v1.ListServicesResponse; -import com.google.cloud.metastore.v1.MetadataExport; -import com.google.cloud.metastore.v1.MetadataImport; -import com.google.cloud.metastore.v1.OperationMetadata; -import com.google.cloud.metastore.v1.Restore; -import com.google.cloud.metastore.v1.RestoreServiceRequest; -import com.google.cloud.metastore.v1.Service; -import com.google.cloud.metastore.v1.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1.UpdateServiceRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcDataprocMetastoreStub extends DataprocMetastoreStub { - private static final MethodDescriptor - listServicesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListServices") - .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetService") - .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateService") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/UpdateService") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/DeleteService") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listMetadataImportsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListMetadataImports") - .setRequestMarshaller( - ProtoUtils.marshaller(ListMetadataImportsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListMetadataImportsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(GetMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(MetadataImport.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/UpdateMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - exportMetadataMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ExportMetadata") - .setRequestMarshaller( - ProtoUtils.marshaller(ExportMetadataRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - restoreServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/RestoreService") - .setRequestMarshaller( - ProtoUtils.marshaller(RestoreServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listBackupsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListBackups") - .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetBackup") - .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateBackup") - .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/DeleteBackup") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable listServicesCallable; - private final UnaryCallable - listServicesPagedCallable; - private final UnaryCallable getServiceCallable; - private final UnaryCallable createServiceCallable; - private final OperationCallable - createServiceOperationCallable; - private final UnaryCallable updateServiceCallable; - private final OperationCallable - updateServiceOperationCallable; - private final UnaryCallable deleteServiceCallable; - private final OperationCallable - deleteServiceOperationCallable; - private final UnaryCallable - listMetadataImportsCallable; - private final UnaryCallable - listMetadataImportsPagedCallable; - private final UnaryCallable getMetadataImportCallable; - private final UnaryCallable createMetadataImportCallable; - private final OperationCallable - createMetadataImportOperationCallable; - private final UnaryCallable updateMetadataImportCallable; - private final OperationCallable - updateMetadataImportOperationCallable; - private final UnaryCallable exportMetadataCallable; - private final OperationCallable - exportMetadataOperationCallable; - private final UnaryCallable restoreServiceCallable; - private final OperationCallable - restoreServiceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) - throws IOException { - return new GrpcDataprocMetastoreStub(settings, ClientContext.create(settings)); - } - - public static final GrpcDataprocMetastoreStub create(ClientContext clientContext) - throws IOException { - return new GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcDataprocMetastoreStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcDataprocMetastoreCallableFactory()); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listServicesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listServicesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service.name", String.valueOf(request.getService().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listMetadataImportsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listMetadataImportsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "metadata_import.name", - String.valueOf(request.getMetadataImport().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings exportMetadataTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(exportMetadataMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings restoreServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(restoreServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings listBackupsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.listServicesCallable = - callableFactory.createUnaryCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.listServicesPagedCallable = - callableFactory.createPagedCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.getServiceCallable = - callableFactory.createUnaryCallable( - getServiceTransportSettings, settings.getServiceSettings(), clientContext); - this.createServiceCallable = - callableFactory.createUnaryCallable( - createServiceTransportSettings, settings.createServiceSettings(), clientContext); - this.createServiceOperationCallable = - callableFactory.createOperationCallable( - createServiceTransportSettings, - settings.createServiceOperationSettings(), - clientContext, - operationsStub); - this.updateServiceCallable = - callableFactory.createUnaryCallable( - updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); - this.updateServiceOperationCallable = - callableFactory.createOperationCallable( - updateServiceTransportSettings, - settings.updateServiceOperationSettings(), - clientContext, - operationsStub); - this.deleteServiceCallable = - callableFactory.createUnaryCallable( - deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); - this.deleteServiceOperationCallable = - callableFactory.createOperationCallable( - deleteServiceTransportSettings, - settings.deleteServiceOperationSettings(), - clientContext, - operationsStub); - this.listMetadataImportsCallable = - callableFactory.createUnaryCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.listMetadataImportsPagedCallable = - callableFactory.createPagedCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.getMetadataImportCallable = - callableFactory.createUnaryCallable( - getMetadataImportTransportSettings, - settings.getMetadataImportSettings(), - clientContext); - this.createMetadataImportCallable = - callableFactory.createUnaryCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportSettings(), - clientContext); - this.createMetadataImportOperationCallable = - callableFactory.createOperationCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportOperationSettings(), - clientContext, - operationsStub); - this.updateMetadataImportCallable = - callableFactory.createUnaryCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportSettings(), - clientContext); - this.updateMetadataImportOperationCallable = - callableFactory.createOperationCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportOperationSettings(), - clientContext, - operationsStub); - this.exportMetadataCallable = - callableFactory.createUnaryCallable( - exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); - this.exportMetadataOperationCallable = - callableFactory.createOperationCallable( - exportMetadataTransportSettings, - settings.exportMetadataOperationSettings(), - clientContext, - operationsStub); - this.restoreServiceCallable = - callableFactory.createUnaryCallable( - restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); - this.restoreServiceOperationCallable = - callableFactory.createOperationCallable( - restoreServiceTransportSettings, - settings.restoreServiceOperationSettings(), - clientContext, - operationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - operationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listServicesCallable() { - return listServicesCallable; - } - - @Override - public UnaryCallable listServicesPagedCallable() { - return listServicesPagedCallable; - } - - @Override - public UnaryCallable getServiceCallable() { - return getServiceCallable; - } - - @Override - public UnaryCallable createServiceCallable() { - return createServiceCallable; - } - - @Override - public OperationCallable - createServiceOperationCallable() { - return createServiceOperationCallable; - } - - @Override - public UnaryCallable updateServiceCallable() { - return updateServiceCallable; - } - - @Override - public OperationCallable - updateServiceOperationCallable() { - return updateServiceOperationCallable; - } - - @Override - public UnaryCallable deleteServiceCallable() { - return deleteServiceCallable; - } - - @Override - public OperationCallable - deleteServiceOperationCallable() { - return deleteServiceOperationCallable; - } - - @Override - public UnaryCallable - listMetadataImportsCallable() { - return listMetadataImportsCallable; - } - - @Override - public UnaryCallable - listMetadataImportsPagedCallable() { - return listMetadataImportsPagedCallable; - } - - @Override - public UnaryCallable getMetadataImportCallable() { - return getMetadataImportCallable; - } - - @Override - public UnaryCallable createMetadataImportCallable() { - return createMetadataImportCallable; - } - - @Override - public OperationCallable - createMetadataImportOperationCallable() { - return createMetadataImportOperationCallable; - } - - @Override - public UnaryCallable updateMetadataImportCallable() { - return updateMetadataImportCallable; - } - - @Override - public OperationCallable - updateMetadataImportOperationCallable() { - return updateMetadataImportOperationCallable; - } - - @Override - public UnaryCallable exportMetadataCallable() { - return exportMetadataCallable; - } - - @Override - public OperationCallable - exportMetadataOperationCallable() { - return exportMetadataOperationCallable; - } - - @Override - public UnaryCallable restoreServiceCallable() { - return restoreServiceCallable; - } - - @Override - public OperationCallable - restoreServiceOperationCallable() { - return restoreServiceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationStub.java deleted file mode 100644 index 3f808c44e001..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationStub.java +++ /dev/null @@ -1,524 +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.stub; - -import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.HttpRule; -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.CreateFederationRequest; -import com.google.cloud.metastore.v1.DeleteFederationRequest; -import com.google.cloud.metastore.v1.Federation; -import com.google.cloud.metastore.v1.GetFederationRequest; -import com.google.cloud.metastore.v1.ListFederationsRequest; -import com.google.cloud.metastore.v1.ListFederationsResponse; -import com.google.cloud.metastore.v1.OperationMetadata; -import com.google.cloud.metastore.v1.UpdateFederationRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the DataprocMetastoreFederation service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .add(Federation.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listFederationsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/ListFederations") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/federations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListFederationsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/GetFederation") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Federation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/CreateFederation") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/federations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "federationId", request.getFederationId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("federation", request.getFederation(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/UpdateFederation") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{federation.name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "federation.name", request.getFederation().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("federation", request.getFederation(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1.DataprocMetastoreFederation/DeleteFederation") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable - listFederationsCallable; - private final UnaryCallable - listFederationsPagedCallable; - private final UnaryCallable getFederationCallable; - private final UnaryCallable createFederationCallable; - private final OperationCallable - createFederationOperationCallable; - private final UnaryCallable updateFederationCallable; - private final OperationCallable - updateFederationOperationCallable; - private final UnaryCallable deleteFederationCallable; - private final OperationCallable - deleteFederationOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonDataprocMetastoreFederationStub create( - DataprocMetastoreFederationStubSettings settings) throws IOException { - return new HttpJsonDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonDataprocMetastoreFederationStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonDataprocMetastoreFederationStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonDataprocMetastoreFederationCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create( - clientContext, - callableFactory, - typeRegistry, - ImmutableMap.builder() - .put( - "google.longrunning.Operations.DeleteOperation", - HttpRule.newBuilder() - .setDelete("/v1/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.GetOperation", - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.ListOperations", - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*}/operations") - .build()) - .build()); - - HttpJsonCallSettings - listFederationsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listFederationsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listFederationsCallable = - callableFactory.createUnaryCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.listFederationsPagedCallable = - callableFactory.createPagedCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.getFederationCallable = - callableFactory.createUnaryCallable( - getFederationTransportSettings, settings.getFederationSettings(), clientContext); - this.createFederationCallable = - callableFactory.createUnaryCallable( - createFederationTransportSettings, settings.createFederationSettings(), clientContext); - this.createFederationOperationCallable = - callableFactory.createOperationCallable( - createFederationTransportSettings, - settings.createFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateFederationCallable = - callableFactory.createUnaryCallable( - updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); - this.updateFederationOperationCallable = - callableFactory.createOperationCallable( - updateFederationTransportSettings, - settings.updateFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteFederationCallable = - callableFactory.createUnaryCallable( - deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); - this.deleteFederationOperationCallable = - callableFactory.createOperationCallable( - deleteFederationTransportSettings, - settings.deleteFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listFederationsMethodDescriptor); - methodDescriptors.add(getFederationMethodDescriptor); - methodDescriptors.add(createFederationMethodDescriptor); - methodDescriptors.add(updateFederationMethodDescriptor); - methodDescriptors.add(deleteFederationMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable listFederationsCallable() { - return listFederationsCallable; - } - - @Override - public UnaryCallable - listFederationsPagedCallable() { - return listFederationsPagedCallable; - } - - @Override - public UnaryCallable getFederationCallable() { - return getFederationCallable; - } - - @Override - public UnaryCallable createFederationCallable() { - return createFederationCallable; - } - - @Override - public OperationCallable - createFederationOperationCallable() { - return createFederationOperationCallable; - } - - @Override - public UnaryCallable updateFederationCallable() { - return updateFederationCallable; - } - - @Override - public OperationCallable - updateFederationOperationCallable() { - return updateFederationOperationCallable; - } - - @Override - public UnaryCallable deleteFederationCallable() { - return deleteFederationCallable; - } - - @Override - public OperationCallable - deleteFederationOperationCallable() { - return deleteFederationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreStub.java deleted file mode 100644 index ef50a26cf8e0..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreStub.java +++ /dev/null @@ -1,1196 +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.stub; - -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.HttpRule; -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.Backup; -import com.google.cloud.metastore.v1.CreateBackupRequest; -import com.google.cloud.metastore.v1.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1.CreateServiceRequest; -import com.google.cloud.metastore.v1.DeleteBackupRequest; -import com.google.cloud.metastore.v1.DeleteServiceRequest; -import com.google.cloud.metastore.v1.ExportMetadataRequest; -import com.google.cloud.metastore.v1.GetBackupRequest; -import com.google.cloud.metastore.v1.GetMetadataImportRequest; -import com.google.cloud.metastore.v1.GetServiceRequest; -import com.google.cloud.metastore.v1.ListBackupsRequest; -import com.google.cloud.metastore.v1.ListBackupsResponse; -import com.google.cloud.metastore.v1.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1.ListServicesRequest; -import com.google.cloud.metastore.v1.ListServicesResponse; -import com.google.cloud.metastore.v1.MetadataExport; -import com.google.cloud.metastore.v1.MetadataImport; -import com.google.cloud.metastore.v1.OperationMetadata; -import com.google.cloud.metastore.v1.Restore; -import com.google.cloud.metastore.v1.RestoreServiceRequest; -import com.google.cloud.metastore.v1.Service; -import com.google.cloud.metastore.v1.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1.UpdateServiceRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(MetadataImport.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .add(Service.getDescriptor()) - .add(MetadataExport.getDescriptor()) - .add(Backup.getDescriptor()) - .add(Restore.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listServicesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListServices") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/services", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListServicesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetService") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Service.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateService") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/services", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "serviceId", request.getServiceId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("service", request.getService(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/UpdateService") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{service.name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "service.name", request.getService().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("service", request.getService(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/DeleteService") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listMetadataImportsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListMetadataImports") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/services/*}/metadataImports", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListMetadataImportsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetMetadataImport") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/services/*/metadataImports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MetadataImport.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateMetadataImport") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/services/*}/metadataImports", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "metadataImportId", request.getMetadataImportId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("metadataImport", request.getMetadataImport(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateMetadataImportRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/UpdateMetadataImport") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{metadataImport.name=projects/*/locations/*/services/*/metadataImports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "metadataImport.name", - request.getMetadataImport().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("metadataImport", request.getMetadataImport(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateMetadataImportRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - exportMetadataMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ExportMetadata") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{service=projects/*/locations/*/services/*}:exportMetadata", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (ExportMetadataRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - restoreServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/RestoreService") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{service=projects/*/locations/*/services/*}:restore", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (RestoreServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listBackupsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListBackups") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/services/*}/backups", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetBackup") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/services/*/backups/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Backup.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateBackup") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/services/*}/backups", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "backupId", request.getBackupId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("backup", request.getBackup(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/DeleteBackup") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/services/*/backups/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable listServicesCallable; - private final UnaryCallable - listServicesPagedCallable; - private final UnaryCallable getServiceCallable; - private final UnaryCallable createServiceCallable; - private final OperationCallable - createServiceOperationCallable; - private final UnaryCallable updateServiceCallable; - private final OperationCallable - updateServiceOperationCallable; - private final UnaryCallable deleteServiceCallable; - private final OperationCallable - deleteServiceOperationCallable; - private final UnaryCallable - listMetadataImportsCallable; - private final UnaryCallable - listMetadataImportsPagedCallable; - private final UnaryCallable getMetadataImportCallable; - private final UnaryCallable createMetadataImportCallable; - private final OperationCallable - createMetadataImportOperationCallable; - private final UnaryCallable updateMetadataImportCallable; - private final OperationCallable - updateMetadataImportOperationCallable; - private final UnaryCallable exportMetadataCallable; - private final OperationCallable - exportMetadataOperationCallable; - private final UnaryCallable restoreServiceCallable; - private final OperationCallable - restoreServiceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) - throws IOException { - return new HttpJsonDataprocMetastoreStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonDataprocMetastoreStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonDataprocMetastoreStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonDataprocMetastoreCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create( - clientContext, - callableFactory, - typeRegistry, - ImmutableMap.builder() - .put( - "google.longrunning.Operations.DeleteOperation", - HttpRule.newBuilder() - .setDelete("/v1/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.GetOperation", - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.ListOperations", - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*}/operations") - .build()) - .build()); - - HttpJsonCallSettings listServicesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listServicesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listMetadataImportsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listMetadataImportsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings exportMetadataTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(exportMetadataMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings restoreServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(restoreServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listBackupsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listServicesCallable = - callableFactory.createUnaryCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.listServicesPagedCallable = - callableFactory.createPagedCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.getServiceCallable = - callableFactory.createUnaryCallable( - getServiceTransportSettings, settings.getServiceSettings(), clientContext); - this.createServiceCallable = - callableFactory.createUnaryCallable( - createServiceTransportSettings, settings.createServiceSettings(), clientContext); - this.createServiceOperationCallable = - callableFactory.createOperationCallable( - createServiceTransportSettings, - settings.createServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateServiceCallable = - callableFactory.createUnaryCallable( - updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); - this.updateServiceOperationCallable = - callableFactory.createOperationCallable( - updateServiceTransportSettings, - settings.updateServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteServiceCallable = - callableFactory.createUnaryCallable( - deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); - this.deleteServiceOperationCallable = - callableFactory.createOperationCallable( - deleteServiceTransportSettings, - settings.deleteServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listMetadataImportsCallable = - callableFactory.createUnaryCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.listMetadataImportsPagedCallable = - callableFactory.createPagedCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.getMetadataImportCallable = - callableFactory.createUnaryCallable( - getMetadataImportTransportSettings, - settings.getMetadataImportSettings(), - clientContext); - this.createMetadataImportCallable = - callableFactory.createUnaryCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportSettings(), - clientContext); - this.createMetadataImportOperationCallable = - callableFactory.createOperationCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateMetadataImportCallable = - callableFactory.createUnaryCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportSettings(), - clientContext); - this.updateMetadataImportOperationCallable = - callableFactory.createOperationCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.exportMetadataCallable = - callableFactory.createUnaryCallable( - exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); - this.exportMetadataOperationCallable = - callableFactory.createOperationCallable( - exportMetadataTransportSettings, - settings.exportMetadataOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.restoreServiceCallable = - callableFactory.createUnaryCallable( - restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); - this.restoreServiceOperationCallable = - callableFactory.createOperationCallable( - restoreServiceTransportSettings, - settings.restoreServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listServicesMethodDescriptor); - methodDescriptors.add(getServiceMethodDescriptor); - methodDescriptors.add(createServiceMethodDescriptor); - methodDescriptors.add(updateServiceMethodDescriptor); - methodDescriptors.add(deleteServiceMethodDescriptor); - methodDescriptors.add(listMetadataImportsMethodDescriptor); - methodDescriptors.add(getMetadataImportMethodDescriptor); - methodDescriptors.add(createMetadataImportMethodDescriptor); - methodDescriptors.add(updateMetadataImportMethodDescriptor); - methodDescriptors.add(exportMetadataMethodDescriptor); - methodDescriptors.add(restoreServiceMethodDescriptor); - methodDescriptors.add(listBackupsMethodDescriptor); - methodDescriptors.add(getBackupMethodDescriptor); - methodDescriptors.add(createBackupMethodDescriptor); - methodDescriptors.add(deleteBackupMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable listServicesCallable() { - return listServicesCallable; - } - - @Override - public UnaryCallable listServicesPagedCallable() { - return listServicesPagedCallable; - } - - @Override - public UnaryCallable getServiceCallable() { - return getServiceCallable; - } - - @Override - public UnaryCallable createServiceCallable() { - return createServiceCallable; - } - - @Override - public OperationCallable - createServiceOperationCallable() { - return createServiceOperationCallable; - } - - @Override - public UnaryCallable updateServiceCallable() { - return updateServiceCallable; - } - - @Override - public OperationCallable - updateServiceOperationCallable() { - return updateServiceOperationCallable; - } - - @Override - public UnaryCallable deleteServiceCallable() { - return deleteServiceCallable; - } - - @Override - public OperationCallable - deleteServiceOperationCallable() { - return deleteServiceOperationCallable; - } - - @Override - public UnaryCallable - listMetadataImportsCallable() { - return listMetadataImportsCallable; - } - - @Override - public UnaryCallable - listMetadataImportsPagedCallable() { - return listMetadataImportsPagedCallable; - } - - @Override - public UnaryCallable getMetadataImportCallable() { - return getMetadataImportCallable; - } - - @Override - public UnaryCallable createMetadataImportCallable() { - return createMetadataImportCallable; - } - - @Override - public OperationCallable - createMetadataImportOperationCallable() { - return createMetadataImportOperationCallable; - } - - @Override - public UnaryCallable updateMetadataImportCallable() { - return updateMetadataImportCallable; - } - - @Override - public OperationCallable - updateMetadataImportOperationCallable() { - return updateMetadataImportOperationCallable; - } - - @Override - public UnaryCallable exportMetadataCallable() { - return exportMetadataCallable; - } - - @Override - public OperationCallable - exportMetadataOperationCallable() { - return exportMetadataOperationCallable; - } - - @Override - public UnaryCallable restoreServiceCallable() { - return restoreServiceCallable; - } - - @Override - public OperationCallable - restoreServiceOperationCallable() { - return restoreServiceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClient.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClient.java deleted file mode 100644 index bd5c481d2eb2..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClient.java +++ /dev/null @@ -1,3143 +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.v1alpha; - -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.v1alpha.stub.DataprocMetastoreStub; -import com.google.cloud.metastore.v1alpha.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: - * - *

    - *
  • The service works with a collection of Google Cloud projects, named: `/projects/*` - *
  • Each project has a collection of available locations, named: `/locations/*` (a location - * must refer to a Google Cloud `region`) - *
  • Each location has a collection of services, named: `/services/*` - *
  • Dataproc Metastore services are resources with names of the form: - *
- * - *

`/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: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

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

This class can be customized by passing in a custom instance of 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. - */ -@BetaApi -@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 future =
-   *       dataprocMetastoreClient.listServicesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Service element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listServicesPagedCallable() { - return stub.listServicesPagedCallable(); - } - - // 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();
-   *   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 listServicesCallable() { - return stub.listServicesCallable(); - } - - // 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()) {
-   *   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 future = dataprocMetastoreClient.getServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getServiceCallable() { - return stub.getServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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]");
-   *   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 createServiceAsync( - LocationName parent, Service service, String serviceId) { - CreateServiceRequest request = - CreateServiceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setService(service) - .setServiceId(serviceId) - .build(); - return createServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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();
-   *   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 createServiceAsync( - String parent, Service service, String serviceId) { - CreateServiceRequest request = - CreateServiceRequest.newBuilder() - .setParent(parent) - .setService(service) - .setServiceId(serviceId) - .build(); - return createServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   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 createServiceAsync( - CreateServiceRequest request) { - return createServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   CreateServiceRequest request =
-   *       CreateServiceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setServiceId("serviceId-194185552")
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.createServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createServiceOperationCallable() { - return stub.createServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   CreateServiceRequest request =
-   *       CreateServiceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setServiceId("serviceId-194185552")
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.createServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createServiceCallable() { - return stub.createServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   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`. - *

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 updateServiceAsync( - Service service, FieldMask updateMask) { - UpdateServiceRequest request = - UpdateServiceRequest.newBuilder().setService(service).setUpdateMask(updateMask).build(); - return updateServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   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 updateServiceAsync( - UpdateServiceRequest request) { - return updateServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   UpdateServiceRequest request =
-   *       UpdateServiceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.updateServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateServiceOperationCallable() { - return stub.updateServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   UpdateServiceRequest request =
-   *       UpdateServiceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.updateServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateServiceCallable() { - return stub.updateServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   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: - *

`projects/{project_number}/locations/{location_id}/services/{service_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteServiceAsync(ServiceName name) { - DeleteServiceRequest request = - DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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();
-   *   dataprocMetastoreClient.deleteServiceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The relative resource name of the metastore service to delete, 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 OperationFuture deleteServiceAsync(String name) { - DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build(); - return deleteServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   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 deleteServiceAsync( - DeleteServiceRequest request) { - return deleteServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   DeleteServiceRequest request =
-   *       DeleteServiceRequest.newBuilder()
-   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.deleteServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteServiceOperationCallable() { - return stub.deleteServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   DeleteServiceRequest request =
-   *       DeleteServiceRequest.newBuilder()
-   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.deleteServiceCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteServiceCallable() { - return stub.deleteServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists imports in a 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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   ListMetadataImportsRequest request =
-   *       ListMetadataImportsRequest.newBuilder()
-   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.listMetadataImportsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (MetadataImport element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listMetadataImportsPagedCallable() { - return stub.listMetadataImportsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists imports in a 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()) {
-   *   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 - listMetadataImportsCallable() { - return stub.listMetadataImportsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single import. - * - *

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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   GetMetadataImportRequest request =
-   *       GetMetadataImportRequest.newBuilder()
-   *           .setName(
-   *               MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.getMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getMetadataImportCallable() { - return stub.getMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

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

`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 createMetadataImportAsync( - ServiceName parent, MetadataImport metadataImport, String metadataImportId) { - CreateMetadataImportRequest request = - CreateMetadataImportRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMetadataImport(metadataImport) - .setMetadataImportId(metadataImportId) - .build(); - return createMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

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

`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 createMetadataImportAsync( - String parent, MetadataImport metadataImport, String metadataImportId) { - CreateMetadataImportRequest request = - CreateMetadataImportRequest.newBuilder() - .setParent(parent) - .setMetadataImport(metadataImport) - .setMetadataImportId(metadataImportId) - .build(); - return createMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 createMetadataImportAsync( - CreateMetadataImportRequest request) { - return createMetadataImportOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createMetadataImportOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createMetadataImportOperationCallable() { - return stub.createMetadataImportOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createMetadataImportCallable() { - return stub.createMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   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`. - *

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 updateMetadataImportAsync( - MetadataImport metadataImport, FieldMask updateMask) { - UpdateMetadataImportRequest request = - UpdateMetadataImportRequest.newBuilder() - .setMetadataImport(metadataImport) - .setUpdateMask(updateMask) - .build(); - return updateMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   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 updateMetadataImportAsync( - UpdateMetadataImportRequest request) { - return updateMetadataImportOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   UpdateMetadataImportRequest request =
-   *       UpdateMetadataImportRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setMetadataImport(MetadataImport.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.updateMetadataImportOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateMetadataImportOperationCallable() { - return stub.updateMetadataImportOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   UpdateMetadataImportRequest request =
-   *       UpdateMetadataImportRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setMetadataImport(MetadataImport.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.updateMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateMetadataImportCallable() { - return stub.updateMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   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 exportMetadataAsync( - ExportMetadataRequest request) { - return exportMetadataOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   ExportMetadataRequest request =
-   *       ExportMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.exportMetadataOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataExport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - exportMetadataOperationCallable() { - return stub.exportMetadataOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   ExportMetadataRequest request =
-   *       ExportMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.exportMetadataCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable exportMetadataCallable() { - return stub.exportMetadataCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - ServiceName service, BackupName backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service == null ? null : service.toString()) - .setBackup(backup == null ? null : backup.toString()) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - ServiceName service, String backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service == null ? null : service.toString()) - .setBackup(backup) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - String service, BackupName backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service) - .setBackup(backup == null ? null : backup.toString()) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - String service, String backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder().setService(service).setBackup(backup).build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   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 restoreServiceAsync( - RestoreServiceRequest request) { - return restoreServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   RestoreServiceRequest request =
-   *       RestoreServiceRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setBackup(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.restoreServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Restore response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - restoreServiceOperationCallable() { - return stub.restoreServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   RestoreServiceRequest request =
-   *       RestoreServiceRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setBackup(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.restoreServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable restoreServiceCallable() { - return stub.restoreServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists backups in a 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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.listBackupsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Backup element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listBackupsPagedCallable() { - return stub.listBackupsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists backups in a 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()) {
-   *   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 listBackupsCallable() { - return stub.listBackupsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single backup. - * - *

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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   GetBackupRequest request =
-   *       GetBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .build();
-   *   ApiFuture future = dataprocMetastoreClient.getBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getBackupCallable() { - return stub.getBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

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

`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 createBackupAsync( - ServiceName parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

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

`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 createBackupAsync( - String parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 createBackupAsync( - CreateBackupRequest request) { - return createBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createBackupOperationCallable() { - return stub.createBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createBackupCallable() { - return stub.createBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   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: - *

`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 deleteBackupAsync(BackupName name) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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 = 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: - *

`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 deleteBackupAsync(String name) { - DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   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 deleteBackupAsync( - DeleteBackupRequest request) { - return deleteBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.deleteBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteBackupOperationCallable() { - return stub.deleteBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.deleteBackupCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteBackupCallable() { - return stub.deleteBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes the attached IAM policies for a resource - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
-   *   RemoveIamPolicyRequest request =
-   *       RemoveIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setAsynchronous(true)
-   *           .build();
-   *   RemoveIamPolicyResponse response = dataprocMetastoreClient.removeIamPolicy(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 RemoveIamPolicyResponse removeIamPolicy(RemoveIamPolicyRequest request) { - return removeIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes the attached IAM policies for a resource - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
-   *   RemoveIamPolicyRequest request =
-   *       RemoveIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setAsynchronous(true)
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.removeIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   RemoveIamPolicyResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - removeIamPolicyCallable() { - return stub.removeIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Query DPMS metadata. - * - *

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()) {
-   *   QueryMetadataRequest request =
-   *       QueryMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setQuery("query107944136")
-   *           .build();
-   *   QueryMetadataResponse response = dataprocMetastoreClient.queryMetadataAsync(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 queryMetadataAsync( - QueryMetadataRequest request) { - return queryMetadataOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Query DPMS metadata. - * - *

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()) {
-   *   QueryMetadataRequest request =
-   *       QueryMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setQuery("query107944136")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.queryMetadataOperationCallable().futureCall(request);
-   *   // Do something.
-   *   QueryMetadataResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - queryMetadataOperationCallable() { - return stub.queryMetadataOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Query DPMS metadata. - * - *

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()) {
-   *   QueryMetadataRequest request =
-   *       QueryMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setQuery("query107944136")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.queryMetadataCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable queryMetadataCallable() { - return stub.queryMetadataCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Move a table to another database. - * - *

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()) {
-   *   MoveTableToDatabaseRequest request =
-   *       MoveTableToDatabaseRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setTableName("tableName-1988717703")
-   *           .setDbName("dbName-1339126743")
-   *           .setDestinationDbName("destinationDbName-2077361705")
-   *           .build();
-   *   MoveTableToDatabaseResponse response =
-   *       dataprocMetastoreClient.moveTableToDatabaseAsync(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 - moveTableToDatabaseAsync(MoveTableToDatabaseRequest request) { - return moveTableToDatabaseOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Move a table to another database. - * - *

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()) {
-   *   MoveTableToDatabaseRequest request =
-   *       MoveTableToDatabaseRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setTableName("tableName-1988717703")
-   *           .setDbName("dbName-1339126743")
-   *           .setDestinationDbName("destinationDbName-2077361705")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.moveTableToDatabaseOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MoveTableToDatabaseResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable() { - return stub.moveTableToDatabaseOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Move a table to another database. - * - *

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()) {
-   *   MoveTableToDatabaseRequest request =
-   *       MoveTableToDatabaseRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setTableName("tableName-1988717703")
-   *           .setDbName("dbName-1339126743")
-   *           .setDestinationDbName("destinationDbName-2077361705")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.moveTableToDatabaseCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable moveTableToDatabaseCallable() { - return stub.moveTableToDatabaseCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Alter metadata resource location. The metadata resource can be a database, table, or partition. - * This functionality only updates the parent directory for the respective metadata resource and - * does not transfer any existing data to the new 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()) {
-   *   AlterMetadataResourceLocationRequest request =
-   *       AlterMetadataResourceLocationRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setResourceName("resourceName-384566343")
-   *           .setLocationUri("locationUri552310135")
-   *           .build();
-   *   AlterMetadataResourceLocationResponse response =
-   *       dataprocMetastoreClient.alterMetadataResourceLocationAsync(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 - alterMetadataResourceLocationAsync(AlterMetadataResourceLocationRequest request) { - return alterMetadataResourceLocationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Alter metadata resource location. The metadata resource can be a database, table, or partition. - * This functionality only updates the parent directory for the respective metadata resource and - * does not transfer any existing data to the new 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()) {
-   *   AlterMetadataResourceLocationRequest request =
-   *       AlterMetadataResourceLocationRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setResourceName("resourceName-384566343")
-   *           .setLocationUri("locationUri552310135")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient
-   *           .alterMetadataResourceLocationOperationCallable()
-   *           .futureCall(request);
-   *   // Do something.
-   *   AlterMetadataResourceLocationResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable() { - return stub.alterMetadataResourceLocationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Alter metadata resource location. The metadata resource can be a database, table, or partition. - * This functionality only updates the parent directory for the respective metadata resource and - * does not transfer any existing data to the new 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()) {
-   *   AlterMetadataResourceLocationRequest request =
-   *       AlterMetadataResourceLocationRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setResourceName("resourceName-384566343")
-   *           .setLocationUri("locationUri552310135")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.alterMetadataResourceLocationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - alterMetadataResourceLocationCallable() { - return stub.alterMetadataResourceLocationCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListServicesPagedResponse - extends AbstractPagedListResponse< - ListServicesRequest, - ListServicesResponse, - Service, - ListServicesPage, - ListServicesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListServicesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListServicesPagedResponse(ListServicesPage page) { - super(page, ListServicesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListServicesPage - extends AbstractPage { - - private ListServicesPage( - PageContext context, - ListServicesResponse response) { - super(context, response); - } - - private static ListServicesPage createEmptyPage() { - return new ListServicesPage(null, null); - } - - @Override - protected ListServicesPage createPage( - PageContext context, - ListServicesResponse response) { - return new ListServicesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListServicesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListServicesRequest, - ListServicesResponse, - Service, - ListServicesPage, - ListServicesFixedSizeCollection> { - - private ListServicesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListServicesFixedSizeCollection createEmptyCollection() { - return new ListServicesFixedSizeCollection(null, 0); - } - - @Override - protected ListServicesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListServicesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListMetadataImportsPagedResponse - extends AbstractPagedListResponse< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage, - ListMetadataImportsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListMetadataImportsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListMetadataImportsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListMetadataImportsPagedResponse(ListMetadataImportsPage page) { - super(page, ListMetadataImportsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListMetadataImportsPage - extends AbstractPage< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage> { - - private ListMetadataImportsPage( - PageContext - context, - ListMetadataImportsResponse response) { - super(context, response); - } - - private static ListMetadataImportsPage createEmptyPage() { - return new ListMetadataImportsPage(null, null); - } - - @Override - protected ListMetadataImportsPage createPage( - PageContext - context, - ListMetadataImportsResponse response) { - return new ListMetadataImportsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListMetadataImportsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage, - ListMetadataImportsFixedSizeCollection> { - - private ListMetadataImportsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListMetadataImportsFixedSizeCollection createEmptyCollection() { - return new ListMetadataImportsFixedSizeCollection(null, 0); - } - - @Override - protected ListMetadataImportsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListMetadataImportsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListBackupsPagedResponse - extends AbstractPagedListResponse< - ListBackupsRequest, - ListBackupsResponse, - Backup, - ListBackupsPage, - ListBackupsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListBackupsPagedResponse(ListBackupsPage page) { - super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListBackupsPage - extends AbstractPage { - - private ListBackupsPage( - PageContext context, - ListBackupsResponse response) { - super(context, response); - } - - private static ListBackupsPage createEmptyPage() { - return new ListBackupsPage(null, null); - } - - @Override - protected ListBackupsPage createPage( - PageContext context, - ListBackupsResponse response) { - return new ListBackupsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListBackupsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListBackupsRequest, - ListBackupsResponse, - Backup, - ListBackupsPage, - ListBackupsFixedSizeCollection> { - - private ListBackupsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListBackupsFixedSizeCollection createEmptyCollection() { - return new ListBackupsFixedSizeCollection(null, 0); - } - - @Override - protected ListBackupsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListBackupsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClient.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClient.java deleted file mode 100644 index 1009d46611d8..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClient.java +++ /dev/null @@ -1,1111 +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.v1alpha; - -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.v1alpha.stub.DataprocMetastoreFederationStub; -import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreFederationStubSettings; -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 federation services. Dataproc Metastore - * Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex - * Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which - * metadata from the backend metastores are served at query time. - * - *

The Dataproc Metastore Federation API defines the following resource model: - * - *

    - *
  • The service works with a collection of Google Cloud projects. - *
  • Each project has a collection of available locations. - *
  • Each location has a collection of federations. - *
  • Dataproc Metastore Federations are resources with names of the form: - * `projects/{project_number}/locations/{location_id}/federations/{federation_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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create()) {
- *   FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
- *   Federation response = dataprocMetastoreFederationClient.getFederation(name);
- * }
- * }
- * - *

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: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

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

This class can be customized by passing in a custom instance of - * DataprocMetastoreFederationSettings 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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newBuilder().setEndpoint(myEndpoint).build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newHttpJsonBuilder().build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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

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

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 (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 future =
-   *       dataprocMetastoreFederationClient.listFederationsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Federation element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listFederationsPagedCallable() { - return stub.listFederationsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists federations 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 (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 - listFederationsCallable() { - return stub.listFederationsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a single federation. - * - *

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 (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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   GetFederationRequest request =
-   *       GetFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.getFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getFederationCallable() { - return stub.getFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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: - *

`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 createFederationAsync( - LocationName parent, Federation federation, String federationId) { - CreateFederationRequest request = - CreateFederationRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFederation(federation) - .setFederationId(federationId) - .build(); - return createFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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: - *

`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 createFederationAsync( - String parent, Federation federation, String federationId) { - CreateFederationRequest request = - CreateFederationRequest.newBuilder() - .setParent(parent) - .setFederation(federation) - .setFederationId(federationId) - .build(); - return createFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 createFederationAsync( - CreateFederationRequest request) { - return createFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 future =
-   *       dataprocMetastoreFederationClient.createFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createFederationOperationCallable() { - return stub.createFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 future =
-   *       dataprocMetastoreFederationClient.createFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createFederationCallable() { - return stub.createFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (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`. - *

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 updateFederationAsync( - Federation federation, FieldMask updateMask) { - UpdateFederationRequest request = - UpdateFederationRequest.newBuilder() - .setFederation(federation) - .setUpdateMask(updateMask) - .build(); - return updateFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (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 updateFederationAsync( - UpdateFederationRequest request) { - return updateFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   UpdateFederationRequest request =
-   *       UpdateFederationRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setFederation(Federation.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreFederationClient.updateFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateFederationOperationCallable() { - return stub.updateFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   UpdateFederationRequest request =
-   *       UpdateFederationRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setFederation(Federation.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.updateFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateFederationCallable() { - return stub.updateFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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: - *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteFederationAsync( - FederationName name) { - DeleteFederationRequest request = - DeleteFederationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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: - *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteFederationAsync(String name) { - DeleteFederationRequest request = DeleteFederationRequest.newBuilder().setName(name).build(); - return deleteFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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 deleteFederationAsync( - DeleteFederationRequest request) { - return deleteFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   DeleteFederationRequest request =
-   *       DeleteFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreFederationClient.deleteFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteFederationOperationCallable() { - return stub.deleteFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   DeleteFederationRequest request =
-   *       DeleteFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.deleteFederationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteFederationCallable() { - return stub.deleteFederationCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListFederationsPagedResponse - extends AbstractPagedListResponse< - ListFederationsRequest, - ListFederationsResponse, - Federation, - ListFederationsPage, - ListFederationsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListFederationsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListFederationsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListFederationsPagedResponse(ListFederationsPage page) { - super(page, ListFederationsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListFederationsPage - extends AbstractPage< - ListFederationsRequest, ListFederationsResponse, Federation, ListFederationsPage> { - - private ListFederationsPage( - PageContext context, - ListFederationsResponse response) { - super(context, response); - } - - private static ListFederationsPage createEmptyPage() { - return new ListFederationsPage(null, null); - } - - @Override - protected ListFederationsPage createPage( - PageContext context, - ListFederationsResponse response) { - return new ListFederationsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListFederationsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListFederationsRequest, - ListFederationsResponse, - Federation, - ListFederationsPage, - ListFederationsFixedSizeCollection> { - - private ListFederationsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListFederationsFixedSizeCollection createEmptyCollection() { - return new ListFederationsFixedSizeCollection(null, 0); - } - - @Override - protected ListFederationsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListFederationsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationSettings.java deleted file mode 100644 index cbcb094454a5..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationSettings.java +++ /dev/null @@ -1,301 +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.v1alpha; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreFederationStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreFederationClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationSettings - extends ClientSettings { - - /** Returns the object with the settings used for calls to listFederations. */ - public PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listFederationsSettings(); - } - - /** Returns the object with the settings used for calls to getFederation. */ - public UnaryCallSettings getFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getFederationSettings(); - } - - /** Returns the object with the settings used for calls to createFederation. */ - public UnaryCallSettings createFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).createFederationSettings(); - } - - /** Returns the object with the settings used for calls to createFederation. */ - public OperationCallSettings - createFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .createFederationOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public UnaryCallSettings updateFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).updateFederationSettings(); - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public OperationCallSettings - updateFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .updateFederationOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public UnaryCallSettings deleteFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).deleteFederationSettings(); - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public OperationCallSettings - deleteFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .deleteFederationOperationSettings(); - } - - public static final DataprocMetastoreFederationSettings create( - DataprocMetastoreFederationStubSettings stub) throws IOException { - return new DataprocMetastoreFederationSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return DataprocMetastoreFederationStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DataprocMetastoreFederationStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return DataprocMetastoreFederationStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreFederationSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for DataprocMetastoreFederationSettings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(DataprocMetastoreFederationStubSettings.newBuilder(clientContext)); - } - - protected Builder(DataprocMetastoreFederationSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(DataprocMetastoreFederationStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(DataprocMetastoreFederationStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(DataprocMetastoreFederationStubSettings.newHttpJsonBuilder()); - } - - public DataprocMetastoreFederationStubSettings.Builder getStubSettingsBuilder() { - return ((DataprocMetastoreFederationStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listFederations. */ - public PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return getStubSettingsBuilder().listFederationsSettings(); - } - - /** Returns the builder for the settings used for calls to getFederation. */ - public UnaryCallSettings.Builder getFederationSettings() { - return getStubSettingsBuilder().getFederationSettings(); - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public UnaryCallSettings.Builder - createFederationSettings() { - return getStubSettingsBuilder().createFederationSettings(); - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public OperationCallSettings.Builder - createFederationOperationSettings() { - return getStubSettingsBuilder().createFederationOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public UnaryCallSettings.Builder - updateFederationSettings() { - return getStubSettingsBuilder().updateFederationSettings(); - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public OperationCallSettings.Builder - updateFederationOperationSettings() { - return getStubSettingsBuilder().updateFederationOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public UnaryCallSettings.Builder - deleteFederationSettings() { - return getStubSettingsBuilder().deleteFederationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public OperationCallSettings.Builder - deleteFederationOperationSettings() { - return getStubSettingsBuilder().deleteFederationOperationSettings(); - } - - @Override - public DataprocMetastoreFederationSettings build() throws IOException { - return new DataprocMetastoreFederationSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreSettings.java deleted file mode 100644 index ede2f932a3a1..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreSettings.java +++ /dev/null @@ -1,574 +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.v1alpha; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataprocMetastoreSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listServices. */ - public PagedCallSettings - listServicesSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listServicesSettings(); - } - - /** Returns the object with the settings used for calls to getService. */ - public UnaryCallSettings getServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getServiceSettings(); - } - - /** Returns the object with the settings used for calls to createService. */ - public UnaryCallSettings createServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceSettings(); - } - - /** Returns the object with the settings used for calls to createService. */ - public OperationCallSettings - createServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateService. */ - public UnaryCallSettings updateServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceSettings(); - } - - /** Returns the object with the settings used for calls to updateService. */ - public OperationCallSettings - updateServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteService. */ - public UnaryCallSettings deleteServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceSettings(); - } - - /** Returns the object with the settings used for calls to deleteService. */ - public OperationCallSettings - deleteServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to listMetadataImports. */ - public PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listMetadataImportsSettings(); - } - - /** Returns the object with the settings used for calls to getMetadataImport. */ - public UnaryCallSettings getMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public UnaryCallSettings createMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public OperationCallSettings - createMetadataImportOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .createMetadataImportOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings updateMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public OperationCallSettings - updateMetadataImportOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .updateMetadataImportOperationSettings(); - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public UnaryCallSettings exportMetadataSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataSettings(); - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public OperationCallSettings - exportMetadataOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataOperationSettings(); - } - - /** Returns the object with the settings used for calls to restoreService. */ - public UnaryCallSettings restoreServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceSettings(); - } - - /** Returns the object with the settings used for calls to restoreService. */ - public OperationCallSettings - restoreServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listBackupsSettings(); - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to removeIamPolicy. */ - public UnaryCallSettings - removeIamPolicySettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).removeIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to queryMetadata. */ - public UnaryCallSettings queryMetadataSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).queryMetadataSettings(); - } - - /** Returns the object with the settings used for calls to queryMetadata. */ - public OperationCallSettings - queryMetadataOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).queryMetadataOperationSettings(); - } - - /** Returns the object with the settings used for calls to moveTableToDatabase. */ - public UnaryCallSettings moveTableToDatabaseSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).moveTableToDatabaseSettings(); - } - - /** Returns the object with the settings used for calls to moveTableToDatabase. */ - public OperationCallSettings< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .moveTableToDatabaseOperationSettings(); - } - - /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ - public UnaryCallSettings - alterMetadataResourceLocationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .alterMetadataResourceLocationSettings(); - } - - /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ - public OperationCallSettings< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .alterMetadataResourceLocationOperationSettings(); - } - - public static final DataprocMetastoreSettings create(DataprocMetastoreStubSettings stub) - throws IOException { - return new DataprocMetastoreSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return DataprocMetastoreStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return DataprocMetastoreStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DataprocMetastoreStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return DataprocMetastoreStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return DataprocMetastoreStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return DataprocMetastoreStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return DataprocMetastoreStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for DataprocMetastoreSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(DataprocMetastoreStubSettings.newBuilder(clientContext)); - } - - protected Builder(DataprocMetastoreSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(DataprocMetastoreStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(DataprocMetastoreStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(DataprocMetastoreStubSettings.newHttpJsonBuilder()); - } - - public DataprocMetastoreStubSettings.Builder getStubSettingsBuilder() { - return ((DataprocMetastoreStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listServices. */ - public PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings() { - return getStubSettingsBuilder().listServicesSettings(); - } - - /** Returns the builder for the settings used for calls to getService. */ - public UnaryCallSettings.Builder getServiceSettings() { - return getStubSettingsBuilder().getServiceSettings(); - } - - /** Returns the builder for the settings used for calls to createService. */ - public UnaryCallSettings.Builder createServiceSettings() { - return getStubSettingsBuilder().createServiceSettings(); - } - - /** Returns the builder for the settings used for calls to createService. */ - public OperationCallSettings.Builder - createServiceOperationSettings() { - return getStubSettingsBuilder().createServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateService. */ - public UnaryCallSettings.Builder updateServiceSettings() { - return getStubSettingsBuilder().updateServiceSettings(); - } - - /** Returns the builder for the settings used for calls to updateService. */ - public OperationCallSettings.Builder - updateServiceOperationSettings() { - return getStubSettingsBuilder().updateServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public UnaryCallSettings.Builder deleteServiceSettings() { - return getStubSettingsBuilder().deleteServiceSettings(); - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public OperationCallSettings.Builder - deleteServiceOperationSettings() { - return getStubSettingsBuilder().deleteServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listMetadataImports. */ - public PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return getStubSettingsBuilder().listMetadataImportsSettings(); - } - - /** Returns the builder for the settings used for calls to getMetadataImport. */ - public UnaryCallSettings.Builder - getMetadataImportSettings() { - return getStubSettingsBuilder().getMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public UnaryCallSettings.Builder - createMetadataImportSettings() { - return getStubSettingsBuilder().createMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings() { - return getStubSettingsBuilder().createMetadataImportOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings.Builder - updateMetadataImportSettings() { - return getStubSettingsBuilder().updateMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings() { - return getStubSettingsBuilder().updateMetadataImportOperationSettings(); - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public UnaryCallSettings.Builder exportMetadataSettings() { - return getStubSettingsBuilder().exportMetadataSettings(); - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public OperationCallSettings.Builder - exportMetadataOperationSettings() { - return getStubSettingsBuilder().exportMetadataOperationSettings(); - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public UnaryCallSettings.Builder restoreServiceSettings() { - return getStubSettingsBuilder().restoreServiceSettings(); - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public OperationCallSettings.Builder - restoreServiceOperationSettings() { - return getStubSettingsBuilder().restoreServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return getStubSettingsBuilder().listBackupsSettings(); - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getStubSettingsBuilder().getBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return getStubSettingsBuilder().createBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public OperationCallSettings.Builder - createBackupOperationSettings() { - return getStubSettingsBuilder().createBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return getStubSettingsBuilder().deleteBackupSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return getStubSettingsBuilder().deleteBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to removeIamPolicy. */ - public UnaryCallSettings.Builder - removeIamPolicySettings() { - return getStubSettingsBuilder().removeIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to queryMetadata. */ - public UnaryCallSettings.Builder queryMetadataSettings() { - return getStubSettingsBuilder().queryMetadataSettings(); - } - - /** Returns the builder for the settings used for calls to queryMetadata. */ - public OperationCallSettings.Builder< - QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> - queryMetadataOperationSettings() { - return getStubSettingsBuilder().queryMetadataOperationSettings(); - } - - /** Returns the builder for the settings used for calls to moveTableToDatabase. */ - public UnaryCallSettings.Builder - moveTableToDatabaseSettings() { - return getStubSettingsBuilder().moveTableToDatabaseSettings(); - } - - /** Returns the builder for the settings used for calls to moveTableToDatabase. */ - public OperationCallSettings.Builder< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings() { - return getStubSettingsBuilder().moveTableToDatabaseOperationSettings(); - } - - /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ - public UnaryCallSettings.Builder - alterMetadataResourceLocationSettings() { - return getStubSettingsBuilder().alterMetadataResourceLocationSettings(); - } - - /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ - public OperationCallSettings.Builder< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings() { - return getStubSettingsBuilder().alterMetadataResourceLocationOperationSettings(); - } - - @Override - public DataprocMetastoreSettings build() throws IOException { - return new DataprocMetastoreSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/gapic_metadata.json b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/gapic_metadata.json deleted file mode 100644 index c3ba4c266caf..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/gapic_metadata.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.metastore.v1alpha", - "libraryPackage": "com.google.cloud.metastore.v1alpha", - "services": { - "DataprocMetastore": { - "clients": { - "grpc": { - "libraryClient": "DataprocMetastoreClient", - "rpcs": { - "AlterMetadataResourceLocation": { - "methods": ["alterMetadataResourceLocationAsync", "alterMetadataResourceLocationOperationCallable", "alterMetadataResourceLocationCallable"] - }, - "CreateBackup": { - "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] - }, - "CreateMetadataImport": { - "methods": ["createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportOperationCallable", "createMetadataImportCallable"] - }, - "CreateService": { - "methods": ["createServiceAsync", "createServiceAsync", "createServiceAsync", "createServiceOperationCallable", "createServiceCallable"] - }, - "DeleteBackup": { - "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] - }, - "DeleteService": { - "methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] - }, - "ExportMetadata": { - "methods": ["exportMetadataAsync", "exportMetadataOperationCallable", "exportMetadataCallable"] - }, - "GetBackup": { - "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] - }, - "GetMetadataImport": { - "methods": ["getMetadataImport", "getMetadataImport", "getMetadataImport", "getMetadataImportCallable"] - }, - "GetService": { - "methods": ["getService", "getService", "getService", "getServiceCallable"] - }, - "ListBackups": { - "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] - }, - "ListMetadataImports": { - "methods": ["listMetadataImports", "listMetadataImports", "listMetadataImports", "listMetadataImportsPagedCallable", "listMetadataImportsCallable"] - }, - "ListServices": { - "methods": ["listServices", "listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] - }, - "MoveTableToDatabase": { - "methods": ["moveTableToDatabaseAsync", "moveTableToDatabaseOperationCallable", "moveTableToDatabaseCallable"] - }, - "QueryMetadata": { - "methods": ["queryMetadataAsync", "queryMetadataOperationCallable", "queryMetadataCallable"] - }, - "RemoveIamPolicy": { - "methods": ["removeIamPolicy", "removeIamPolicyCallable"] - }, - "RestoreService": { - "methods": ["restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceOperationCallable", "restoreServiceCallable"] - }, - "UpdateMetadataImport": { - "methods": ["updateMetadataImportAsync", "updateMetadataImportAsync", "updateMetadataImportOperationCallable", "updateMetadataImportCallable"] - }, - "UpdateService": { - "methods": ["updateServiceAsync", "updateServiceAsync", "updateServiceOperationCallable", "updateServiceCallable"] - } - } - } - } - }, - "DataprocMetastoreFederation": { - "clients": { - "grpc": { - "libraryClient": "DataprocMetastoreFederationClient", - "rpcs": { - "CreateFederation": { - "methods": ["createFederationAsync", "createFederationAsync", "createFederationAsync", "createFederationOperationCallable", "createFederationCallable"] - }, - "DeleteFederation": { - "methods": ["deleteFederationAsync", "deleteFederationAsync", "deleteFederationAsync", "deleteFederationOperationCallable", "deleteFederationCallable"] - }, - "GetFederation": { - "methods": ["getFederation", "getFederation", "getFederation", "getFederationCallable"] - }, - "ListFederations": { - "methods": ["listFederations", "listFederations", "listFederations", "listFederationsPagedCallable", "listFederationsCallable"] - }, - "UpdateFederation": { - "methods": ["updateFederationAsync", "updateFederationAsync", "updateFederationOperationCallable", "updateFederationCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStub.java deleted file mode 100644 index 83d7708a961b..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStub.java +++ /dev/null @@ -1,98 +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.v1alpha.stub; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1alpha.CreateFederationRequest; -import com.google.cloud.metastore.v1alpha.DeleteFederationRequest; -import com.google.cloud.metastore.v1alpha.Federation; -import com.google.cloud.metastore.v1alpha.GetFederationRequest; -import com.google.cloud.metastore.v1alpha.ListFederationsRequest; -import com.google.cloud.metastore.v1alpha.ListFederationsResponse; -import com.google.cloud.metastore.v1alpha.OperationMetadata; -import com.google.cloud.metastore.v1alpha.UpdateFederationRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the DataprocMetastoreFederation service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@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 - listFederationsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listFederationsPagedCallable()"); - } - - public UnaryCallable listFederationsCallable() { - throw new UnsupportedOperationException("Not implemented: listFederationsCallable()"); - } - - public UnaryCallable getFederationCallable() { - throw new UnsupportedOperationException("Not implemented: getFederationCallable()"); - } - - public OperationCallable - createFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createFederationOperationCallable()"); - } - - public UnaryCallable createFederationCallable() { - throw new UnsupportedOperationException("Not implemented: createFederationCallable()"); - } - - public OperationCallable - updateFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateFederationOperationCallable()"); - } - - public UnaryCallable updateFederationCallable() { - throw new UnsupportedOperationException("Not implemented: updateFederationCallable()"); - } - - public OperationCallable - deleteFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFederationOperationCallable()"); - } - - public UnaryCallable deleteFederationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFederationCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStubSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStubSettings.java deleted file mode 100644 index 6ac66c4fd58d..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStubSettings.java +++ /dev/null @@ -1,636 +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.v1alpha.stub; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1alpha.CreateFederationRequest; -import com.google.cloud.metastore.v1alpha.DeleteFederationRequest; -import com.google.cloud.metastore.v1alpha.Federation; -import com.google.cloud.metastore.v1alpha.GetFederationRequest; -import com.google.cloud.metastore.v1alpha.ListFederationsRequest; -import com.google.cloud.metastore.v1alpha.ListFederationsResponse; -import com.google.cloud.metastore.v1alpha.OperationMetadata; -import com.google.cloud.metastore.v1alpha.UpdateFederationRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreFederationStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationStubSettings - extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings; - private final UnaryCallSettings getFederationSettings; - private final UnaryCallSettings createFederationSettings; - private final OperationCallSettings - createFederationOperationSettings; - private final UnaryCallSettings updateFederationSettings; - private final OperationCallSettings - updateFederationOperationSettings; - private final UnaryCallSettings deleteFederationSettings; - private final OperationCallSettings - deleteFederationOperationSettings; - - private static final PagedListDescriptor< - ListFederationsRequest, ListFederationsResponse, Federation> - LIST_FEDERATIONS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListFederationsRequest injectToken( - ListFederationsRequest payload, String token) { - return ListFederationsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListFederationsRequest injectPageSize( - ListFederationsRequest payload, int pageSize) { - return ListFederationsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListFederationsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListFederationsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListFederationsResponse payload) { - return payload.getFederationsList() == null - ? ImmutableList.of() - : payload.getFederationsList(); - } - }; - - private static final PagedListResponseFactory< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - LIST_FEDERATIONS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListFederationsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_FEDERATIONS_PAGE_STR_DESC, request, context); - return ListFederationsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listFederations. */ - public PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return listFederationsSettings; - } - - /** Returns the object with the settings used for calls to getFederation. */ - public UnaryCallSettings getFederationSettings() { - return getFederationSettings; - } - - /** Returns the object with the settings used for calls to createFederation. */ - public UnaryCallSettings createFederationSettings() { - return createFederationSettings; - } - - /** Returns the object with the settings used for calls to createFederation. */ - public OperationCallSettings - createFederationOperationSettings() { - return createFederationOperationSettings; - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public UnaryCallSettings updateFederationSettings() { - return updateFederationSettings; - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public OperationCallSettings - updateFederationOperationSettings() { - return updateFederationOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public UnaryCallSettings deleteFederationSettings() { - return deleteFederationSettings; - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public OperationCallSettings - deleteFederationOperationSettings() { - return deleteFederationOperationSettings; - } - - public DataprocMetastoreFederationStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcDataprocMetastoreFederationStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonDataprocMetastoreFederationStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "metastore.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "metastore.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreFederationStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listFederationsSettings = settingsBuilder.listFederationsSettings().build(); - getFederationSettings = settingsBuilder.getFederationSettings().build(); - createFederationSettings = settingsBuilder.createFederationSettings().build(); - createFederationOperationSettings = settingsBuilder.createFederationOperationSettings().build(); - updateFederationSettings = settingsBuilder.updateFederationSettings().build(); - updateFederationOperationSettings = settingsBuilder.updateFederationOperationSettings().build(); - deleteFederationSettings = settingsBuilder.deleteFederationSettings().build(); - deleteFederationOperationSettings = settingsBuilder.deleteFederationOperationSettings().build(); - } - - /** Builder for DataprocMetastoreFederationStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings; - private final UnaryCallSettings.Builder getFederationSettings; - private final UnaryCallSettings.Builder - createFederationSettings; - private final OperationCallSettings.Builder< - CreateFederationRequest, Federation, OperationMetadata> - createFederationOperationSettings; - private final UnaryCallSettings.Builder - updateFederationSettings; - private final OperationCallSettings.Builder< - UpdateFederationRequest, Federation, OperationMetadata> - updateFederationOperationSettings; - private final UnaryCallSettings.Builder - deleteFederationSettings; - private final OperationCallSettings.Builder - deleteFederationOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listFederationsSettings = PagedCallSettings.newBuilder(LIST_FEDERATIONS_PAGE_STR_FACT); - getFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFederationOperationSettings = OperationCallSettings.newBuilder(); - updateFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateFederationOperationSettings = OperationCallSettings.newBuilder(); - deleteFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteFederationOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listFederationsSettings, - getFederationSettings, - createFederationSettings, - updateFederationSettings, - deleteFederationSettings); - initDefaults(this); - } - - protected Builder(DataprocMetastoreFederationStubSettings settings) { - super(settings); - - listFederationsSettings = settings.listFederationsSettings.toBuilder(); - getFederationSettings = settings.getFederationSettings.toBuilder(); - createFederationSettings = settings.createFederationSettings.toBuilder(); - createFederationOperationSettings = settings.createFederationOperationSettings.toBuilder(); - updateFederationSettings = settings.updateFederationSettings.toBuilder(); - updateFederationOperationSettings = settings.updateFederationOperationSettings.toBuilder(); - deleteFederationSettings = settings.deleteFederationSettings.toBuilder(); - deleteFederationOperationSettings = settings.deleteFederationOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listFederationsSettings, - getFederationSettings, - createFederationSettings, - updateFederationSettings, - deleteFederationSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listFederationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .updateFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .deleteFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listFederations. */ - public PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return listFederationsSettings; - } - - /** Returns the builder for the settings used for calls to getFederation. */ - public UnaryCallSettings.Builder getFederationSettings() { - return getFederationSettings; - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public UnaryCallSettings.Builder - createFederationSettings() { - return createFederationSettings; - } - - /** Returns the builder for the settings used for calls to createFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createFederationOperationSettings() { - return createFederationOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public UnaryCallSettings.Builder - updateFederationSettings() { - return updateFederationSettings; - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateFederationOperationSettings() { - return updateFederationOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public UnaryCallSettings.Builder - deleteFederationSettings() { - return deleteFederationSettings; - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteFederationOperationSettings() { - return deleteFederationOperationSettings; - } - - @Override - public DataprocMetastoreFederationStubSettings build() throws IOException { - return new DataprocMetastoreFederationStubSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java deleted file mode 100644 index 12466e0c0935..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java +++ /dev/null @@ -1,244 +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.v1alpha.stub; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest; -import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse; -import com.google.cloud.metastore.v1alpha.Backup; -import com.google.cloud.metastore.v1alpha.CreateBackupRequest; -import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.CreateServiceRequest; -import com.google.cloud.metastore.v1alpha.DeleteBackupRequest; -import com.google.cloud.metastore.v1alpha.DeleteServiceRequest; -import com.google.cloud.metastore.v1alpha.ExportMetadataRequest; -import com.google.cloud.metastore.v1alpha.GetBackupRequest; -import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.GetServiceRequest; -import com.google.cloud.metastore.v1alpha.ListBackupsRequest; -import com.google.cloud.metastore.v1alpha.ListBackupsResponse; -import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1alpha.ListServicesRequest; -import com.google.cloud.metastore.v1alpha.ListServicesResponse; -import com.google.cloud.metastore.v1alpha.MetadataExport; -import com.google.cloud.metastore.v1alpha.MetadataImport; -import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest; -import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse; -import com.google.cloud.metastore.v1alpha.OperationMetadata; -import com.google.cloud.metastore.v1alpha.QueryMetadataRequest; -import com.google.cloud.metastore.v1alpha.QueryMetadataResponse; -import com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest; -import com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse; -import com.google.cloud.metastore.v1alpha.Restore; -import com.google.cloud.metastore.v1alpha.RestoreServiceRequest; -import com.google.cloud.metastore.v1alpha.Service; -import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.UpdateServiceRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class DataprocMetastoreStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable listServicesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); - } - - public UnaryCallable listServicesCallable() { - throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); - } - - public UnaryCallable getServiceCallable() { - throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); - } - - public OperationCallable - createServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createServiceOperationCallable()"); - } - - public UnaryCallable createServiceCallable() { - throw new UnsupportedOperationException("Not implemented: createServiceCallable()"); - } - - public OperationCallable - updateServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateServiceOperationCallable()"); - } - - public UnaryCallable updateServiceCallable() { - throw new UnsupportedOperationException("Not implemented: updateServiceCallable()"); - } - - public OperationCallable - deleteServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); - } - - public UnaryCallable deleteServiceCallable() { - throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); - } - - public UnaryCallable - listMetadataImportsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listMetadataImportsPagedCallable()"); - } - - public UnaryCallable - listMetadataImportsCallable() { - throw new UnsupportedOperationException("Not implemented: listMetadataImportsCallable()"); - } - - public UnaryCallable getMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: getMetadataImportCallable()"); - } - - public OperationCallable - createMetadataImportOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: createMetadataImportOperationCallable()"); - } - - public UnaryCallable createMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: createMetadataImportCallable()"); - } - - public OperationCallable - updateMetadataImportOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: updateMetadataImportOperationCallable()"); - } - - public UnaryCallable updateMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: updateMetadataImportCallable()"); - } - - public OperationCallable - exportMetadataOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportMetadataOperationCallable()"); - } - - public UnaryCallable exportMetadataCallable() { - throw new UnsupportedOperationException("Not implemented: exportMetadataCallable()"); - } - - public OperationCallable - restoreServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: restoreServiceOperationCallable()"); - } - - public UnaryCallable restoreServiceCallable() { - throw new UnsupportedOperationException("Not implemented: restoreServiceCallable()"); - } - - public UnaryCallable listBackupsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); - } - - public UnaryCallable listBackupsCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); - } - - public UnaryCallable getBackupCallable() { - throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); - } - - public OperationCallable - createBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); - } - - public UnaryCallable createBackupCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); - } - - public OperationCallable - deleteBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); - } - - public UnaryCallable deleteBackupCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); - } - - public UnaryCallable removeIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: removeIamPolicyCallable()"); - } - - public OperationCallable - queryMetadataOperationCallable() { - throw new UnsupportedOperationException("Not implemented: queryMetadataOperationCallable()"); - } - - public UnaryCallable queryMetadataCallable() { - throw new UnsupportedOperationException("Not implemented: queryMetadataCallable()"); - } - - public OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: moveTableToDatabaseOperationCallable()"); - } - - public UnaryCallable moveTableToDatabaseCallable() { - throw new UnsupportedOperationException("Not implemented: moveTableToDatabaseCallable()"); - } - - public OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: alterMetadataResourceLocationOperationCallable()"); - } - - public UnaryCallable - alterMetadataResourceLocationCallable() { - throw new UnsupportedOperationException( - "Not implemented: alterMetadataResourceLocationCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStubSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStubSettings.java deleted file mode 100644 index 189d873f5957..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStubSettings.java +++ /dev/null @@ -1,1576 +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.v1alpha.stub; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest; -import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse; -import com.google.cloud.metastore.v1alpha.Backup; -import com.google.cloud.metastore.v1alpha.CreateBackupRequest; -import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.CreateServiceRequest; -import com.google.cloud.metastore.v1alpha.DeleteBackupRequest; -import com.google.cloud.metastore.v1alpha.DeleteServiceRequest; -import com.google.cloud.metastore.v1alpha.ExportMetadataRequest; -import com.google.cloud.metastore.v1alpha.GetBackupRequest; -import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.GetServiceRequest; -import com.google.cloud.metastore.v1alpha.ListBackupsRequest; -import com.google.cloud.metastore.v1alpha.ListBackupsResponse; -import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1alpha.ListServicesRequest; -import com.google.cloud.metastore.v1alpha.ListServicesResponse; -import com.google.cloud.metastore.v1alpha.MetadataExport; -import com.google.cloud.metastore.v1alpha.MetadataImport; -import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest; -import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse; -import com.google.cloud.metastore.v1alpha.OperationMetadata; -import com.google.cloud.metastore.v1alpha.QueryMetadataRequest; -import com.google.cloud.metastore.v1alpha.QueryMetadataResponse; -import com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest; -import com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse; -import com.google.cloud.metastore.v1alpha.Restore; -import com.google.cloud.metastore.v1alpha.RestoreServiceRequest; -import com.google.cloud.metastore.v1alpha.Service; -import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.UpdateServiceRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataprocMetastoreStubSettings.Builder dataprocMetastoreSettingsBuilder =
- *     DataprocMetastoreStubSettings.newBuilder();
- * dataprocMetastoreSettingsBuilder
- *     .getServiceSettings()
- *     .setRetrySettings(
- *         dataprocMetastoreSettingsBuilder
- *             .getServiceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * DataprocMetastoreStubSettings dataprocMetastoreSettings =
- *     dataprocMetastoreSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataprocMetastoreStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings; - private final UnaryCallSettings getServiceSettings; - private final UnaryCallSettings createServiceSettings; - private final OperationCallSettings - createServiceOperationSettings; - private final UnaryCallSettings updateServiceSettings; - private final OperationCallSettings - updateServiceOperationSettings; - private final UnaryCallSettings deleteServiceSettings; - private final OperationCallSettings - deleteServiceOperationSettings; - private final PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings; - private final UnaryCallSettings - getMetadataImportSettings; - private final UnaryCallSettings - createMetadataImportSettings; - private final OperationCallSettings< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings; - private final UnaryCallSettings - updateMetadataImportSettings; - private final OperationCallSettings< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings; - private final UnaryCallSettings exportMetadataSettings; - private final OperationCallSettings - exportMetadataOperationSettings; - private final UnaryCallSettings restoreServiceSettings; - private final OperationCallSettings - restoreServiceOperationSettings; - private final PagedCallSettings - listBackupsSettings; - private final UnaryCallSettings getBackupSettings; - private final UnaryCallSettings createBackupSettings; - private final OperationCallSettings - createBackupOperationSettings; - private final UnaryCallSettings deleteBackupSettings; - private final OperationCallSettings - deleteBackupOperationSettings; - private final UnaryCallSettings - removeIamPolicySettings; - private final UnaryCallSettings queryMetadataSettings; - private final OperationCallSettings< - QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> - queryMetadataOperationSettings; - private final UnaryCallSettings - moveTableToDatabaseSettings; - private final OperationCallSettings< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings; - private final UnaryCallSettings - alterMetadataResourceLocationSettings; - private final OperationCallSettings< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings; - - private static final PagedListDescriptor - LIST_SERVICES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListServicesRequest injectToken(ListServicesRequest payload, String token) { - return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { - return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListServicesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListServicesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListServicesResponse payload) { - return payload.getServicesList() == null - ? ImmutableList.of() - : payload.getServicesList(); - } - }; - - private static final PagedListDescriptor< - ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport> - LIST_METADATA_IMPORTS_PAGE_STR_DESC = - new PagedListDescriptor< - ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListMetadataImportsRequest injectToken( - ListMetadataImportsRequest payload, String token) { - return ListMetadataImportsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListMetadataImportsRequest injectPageSize( - ListMetadataImportsRequest payload, int pageSize) { - return ListMetadataImportsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListMetadataImportsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListMetadataImportsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListMetadataImportsResponse payload) { - return payload.getMetadataImportsList() == null - ? ImmutableList.of() - : payload.getMetadataImportsList(); - } - }; - - private static final PagedListDescriptor - LIST_BACKUPS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { - return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { - return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListBackupsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListBackupsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListBackupsResponse payload) { - return payload.getBackupsList() == null - ? ImmutableList.of() - : payload.getBackupsList(); - } - }; - - private static final PagedListResponseFactory< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - LIST_SERVICES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListServicesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); - return ListServicesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - LIST_METADATA_IMPORTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListMetadataImportsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_METADATA_IMPORTS_PAGE_STR_DESC, request, context); - return ListMetadataImportsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - LIST_BACKUPS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListBackupsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); - return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listServices. */ - public PagedCallSettings - listServicesSettings() { - return listServicesSettings; - } - - /** Returns the object with the settings used for calls to getService. */ - public UnaryCallSettings getServiceSettings() { - return getServiceSettings; - } - - /** Returns the object with the settings used for calls to createService. */ - public UnaryCallSettings createServiceSettings() { - return createServiceSettings; - } - - /** Returns the object with the settings used for calls to createService. */ - public OperationCallSettings - createServiceOperationSettings() { - return createServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to updateService. */ - public UnaryCallSettings updateServiceSettings() { - return updateServiceSettings; - } - - /** Returns the object with the settings used for calls to updateService. */ - public OperationCallSettings - updateServiceOperationSettings() { - return updateServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteService. */ - public UnaryCallSettings deleteServiceSettings() { - return deleteServiceSettings; - } - - /** Returns the object with the settings used for calls to deleteService. */ - public OperationCallSettings - deleteServiceOperationSettings() { - return deleteServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to listMetadataImports. */ - public PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return listMetadataImportsSettings; - } - - /** Returns the object with the settings used for calls to getMetadataImport. */ - public UnaryCallSettings getMetadataImportSettings() { - return getMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public UnaryCallSettings createMetadataImportSettings() { - return createMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public OperationCallSettings - createMetadataImportOperationSettings() { - return createMetadataImportOperationSettings; - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings updateMetadataImportSettings() { - return updateMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public OperationCallSettings - updateMetadataImportOperationSettings() { - return updateMetadataImportOperationSettings; - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public UnaryCallSettings exportMetadataSettings() { - return exportMetadataSettings; - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public OperationCallSettings - exportMetadataOperationSettings() { - return exportMetadataOperationSettings; - } - - /** Returns the object with the settings used for calls to restoreService. */ - public UnaryCallSettings restoreServiceSettings() { - return restoreServiceSettings; - } - - /** Returns the object with the settings used for calls to restoreService. */ - public OperationCallSettings - restoreServiceOperationSettings() { - return restoreServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return getBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return createBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to removeIamPolicy. */ - public UnaryCallSettings - removeIamPolicySettings() { - return removeIamPolicySettings; - } - - /** Returns the object with the settings used for calls to queryMetadata. */ - public UnaryCallSettings queryMetadataSettings() { - return queryMetadataSettings; - } - - /** Returns the object with the settings used for calls to queryMetadata. */ - public OperationCallSettings - queryMetadataOperationSettings() { - return queryMetadataOperationSettings; - } - - /** Returns the object with the settings used for calls to moveTableToDatabase. */ - public UnaryCallSettings moveTableToDatabaseSettings() { - return moveTableToDatabaseSettings; - } - - /** Returns the object with the settings used for calls to moveTableToDatabase. */ - public OperationCallSettings< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings() { - return moveTableToDatabaseOperationSettings; - } - - /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ - public UnaryCallSettings - alterMetadataResourceLocationSettings() { - return alterMetadataResourceLocationSettings; - } - - /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ - public OperationCallSettings< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings() { - return alterMetadataResourceLocationOperationSettings; - } - - public DataprocMetastoreStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcDataprocMetastoreStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonDataprocMetastoreStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "metastore.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "metastore.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listServicesSettings = settingsBuilder.listServicesSettings().build(); - getServiceSettings = settingsBuilder.getServiceSettings().build(); - createServiceSettings = settingsBuilder.createServiceSettings().build(); - createServiceOperationSettings = settingsBuilder.createServiceOperationSettings().build(); - updateServiceSettings = settingsBuilder.updateServiceSettings().build(); - updateServiceOperationSettings = settingsBuilder.updateServiceOperationSettings().build(); - deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); - deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); - listMetadataImportsSettings = settingsBuilder.listMetadataImportsSettings().build(); - getMetadataImportSettings = settingsBuilder.getMetadataImportSettings().build(); - createMetadataImportSettings = settingsBuilder.createMetadataImportSettings().build(); - createMetadataImportOperationSettings = - settingsBuilder.createMetadataImportOperationSettings().build(); - updateMetadataImportSettings = settingsBuilder.updateMetadataImportSettings().build(); - updateMetadataImportOperationSettings = - settingsBuilder.updateMetadataImportOperationSettings().build(); - exportMetadataSettings = settingsBuilder.exportMetadataSettings().build(); - exportMetadataOperationSettings = settingsBuilder.exportMetadataOperationSettings().build(); - restoreServiceSettings = settingsBuilder.restoreServiceSettings().build(); - restoreServiceOperationSettings = settingsBuilder.restoreServiceOperationSettings().build(); - listBackupsSettings = settingsBuilder.listBackupsSettings().build(); - getBackupSettings = settingsBuilder.getBackupSettings().build(); - createBackupSettings = settingsBuilder.createBackupSettings().build(); - createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); - deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); - deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); - removeIamPolicySettings = settingsBuilder.removeIamPolicySettings().build(); - queryMetadataSettings = settingsBuilder.queryMetadataSettings().build(); - queryMetadataOperationSettings = settingsBuilder.queryMetadataOperationSettings().build(); - moveTableToDatabaseSettings = settingsBuilder.moveTableToDatabaseSettings().build(); - moveTableToDatabaseOperationSettings = - settingsBuilder.moveTableToDatabaseOperationSettings().build(); - alterMetadataResourceLocationSettings = - settingsBuilder.alterMetadataResourceLocationSettings().build(); - alterMetadataResourceLocationOperationSettings = - settingsBuilder.alterMetadataResourceLocationOperationSettings().build(); - } - - /** Builder for DataprocMetastoreStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings; - private final UnaryCallSettings.Builder getServiceSettings; - private final UnaryCallSettings.Builder createServiceSettings; - private final OperationCallSettings.Builder - createServiceOperationSettings; - private final UnaryCallSettings.Builder updateServiceSettings; - private final OperationCallSettings.Builder - updateServiceOperationSettings; - private final UnaryCallSettings.Builder deleteServiceSettings; - private final OperationCallSettings.Builder - deleteServiceOperationSettings; - private final PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings; - private final UnaryCallSettings.Builder - getMetadataImportSettings; - private final UnaryCallSettings.Builder - createMetadataImportSettings; - private final OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings; - private final UnaryCallSettings.Builder - updateMetadataImportSettings; - private final OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings; - private final UnaryCallSettings.Builder - exportMetadataSettings; - private final OperationCallSettings.Builder< - ExportMetadataRequest, MetadataExport, OperationMetadata> - exportMetadataOperationSettings; - private final UnaryCallSettings.Builder - restoreServiceSettings; - private final OperationCallSettings.Builder - restoreServiceOperationSettings; - private final PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings; - private final UnaryCallSettings.Builder getBackupSettings; - private final UnaryCallSettings.Builder createBackupSettings; - private final OperationCallSettings.Builder - createBackupOperationSettings; - private final UnaryCallSettings.Builder deleteBackupSettings; - private final OperationCallSettings.Builder - deleteBackupOperationSettings; - private final UnaryCallSettings.Builder - removeIamPolicySettings; - private final UnaryCallSettings.Builder queryMetadataSettings; - private final OperationCallSettings.Builder< - QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> - queryMetadataOperationSettings; - private final UnaryCallSettings.Builder - moveTableToDatabaseSettings; - private final OperationCallSettings.Builder< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings; - private final UnaryCallSettings.Builder - alterMetadataResourceLocationSettings; - private final OperationCallSettings.Builder< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); - getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createServiceOperationSettings = OperationCallSettings.newBuilder(); - updateServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateServiceOperationSettings = OperationCallSettings.newBuilder(); - deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteServiceOperationSettings = OperationCallSettings.newBuilder(); - listMetadataImportsSettings = - PagedCallSettings.newBuilder(LIST_METADATA_IMPORTS_PAGE_STR_FACT); - getMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createMetadataImportOperationSettings = OperationCallSettings.newBuilder(); - updateMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateMetadataImportOperationSettings = OperationCallSettings.newBuilder(); - exportMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - exportMetadataOperationSettings = OperationCallSettings.newBuilder(); - restoreServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - restoreServiceOperationSettings = OperationCallSettings.newBuilder(); - listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); - getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupOperationSettings = OperationCallSettings.newBuilder(); - deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteBackupOperationSettings = OperationCallSettings.newBuilder(); - removeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - queryMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - queryMetadataOperationSettings = OperationCallSettings.newBuilder(); - moveTableToDatabaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - moveTableToDatabaseOperationSettings = OperationCallSettings.newBuilder(); - alterMetadataResourceLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - alterMetadataResourceLocationOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listServicesSettings, - getServiceSettings, - createServiceSettings, - updateServiceSettings, - deleteServiceSettings, - listMetadataImportsSettings, - getMetadataImportSettings, - createMetadataImportSettings, - updateMetadataImportSettings, - exportMetadataSettings, - restoreServiceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings, - removeIamPolicySettings, - queryMetadataSettings, - moveTableToDatabaseSettings, - alterMetadataResourceLocationSettings); - initDefaults(this); - } - - protected Builder(DataprocMetastoreStubSettings settings) { - super(settings); - - listServicesSettings = settings.listServicesSettings.toBuilder(); - getServiceSettings = settings.getServiceSettings.toBuilder(); - createServiceSettings = settings.createServiceSettings.toBuilder(); - createServiceOperationSettings = settings.createServiceOperationSettings.toBuilder(); - updateServiceSettings = settings.updateServiceSettings.toBuilder(); - updateServiceOperationSettings = settings.updateServiceOperationSettings.toBuilder(); - deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); - deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); - listMetadataImportsSettings = settings.listMetadataImportsSettings.toBuilder(); - getMetadataImportSettings = settings.getMetadataImportSettings.toBuilder(); - createMetadataImportSettings = settings.createMetadataImportSettings.toBuilder(); - createMetadataImportOperationSettings = - settings.createMetadataImportOperationSettings.toBuilder(); - updateMetadataImportSettings = settings.updateMetadataImportSettings.toBuilder(); - updateMetadataImportOperationSettings = - settings.updateMetadataImportOperationSettings.toBuilder(); - exportMetadataSettings = settings.exportMetadataSettings.toBuilder(); - exportMetadataOperationSettings = settings.exportMetadataOperationSettings.toBuilder(); - restoreServiceSettings = settings.restoreServiceSettings.toBuilder(); - restoreServiceOperationSettings = settings.restoreServiceOperationSettings.toBuilder(); - listBackupsSettings = settings.listBackupsSettings.toBuilder(); - getBackupSettings = settings.getBackupSettings.toBuilder(); - createBackupSettings = settings.createBackupSettings.toBuilder(); - createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); - deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); - deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); - removeIamPolicySettings = settings.removeIamPolicySettings.toBuilder(); - queryMetadataSettings = settings.queryMetadataSettings.toBuilder(); - queryMetadataOperationSettings = settings.queryMetadataOperationSettings.toBuilder(); - moveTableToDatabaseSettings = settings.moveTableToDatabaseSettings.toBuilder(); - moveTableToDatabaseOperationSettings = - settings.moveTableToDatabaseOperationSettings.toBuilder(); - alterMetadataResourceLocationSettings = - settings.alterMetadataResourceLocationSettings.toBuilder(); - alterMetadataResourceLocationOperationSettings = - settings.alterMetadataResourceLocationOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listServicesSettings, - getServiceSettings, - createServiceSettings, - updateServiceSettings, - deleteServiceSettings, - listMetadataImportsSettings, - getMetadataImportSettings, - createMetadataImportSettings, - updateMetadataImportSettings, - exportMetadataSettings, - restoreServiceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings, - removeIamPolicySettings, - queryMetadataSettings, - moveTableToDatabaseSettings, - alterMetadataResourceLocationSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listServicesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listMetadataImportsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .exportMetadataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .restoreServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listBackupsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .removeIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .queryMetadataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .moveTableToDatabaseSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .alterMetadataResourceLocationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Service.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .updateServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Service.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(3000000L)) - .build())); - - builder - .deleteServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1500000L)) - .build())); - - builder - .createMetadataImportOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .updateMetadataImportOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1200000L)) - .build())); - - builder - .exportMetadataOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataExport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .restoreServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Restore.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .createBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .deleteBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1500000L)) - .build())); - - builder - .queryMetadataOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(QueryMetadataResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .moveTableToDatabaseOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - MoveTableToDatabaseResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .alterMetadataResourceLocationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - . - newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AlterMetadataResourceLocationResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listServices. */ - public PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings() { - return listServicesSettings; - } - - /** Returns the builder for the settings used for calls to getService. */ - public UnaryCallSettings.Builder getServiceSettings() { - return getServiceSettings; - } - - /** Returns the builder for the settings used for calls to createService. */ - public UnaryCallSettings.Builder createServiceSettings() { - return createServiceSettings; - } - - /** Returns the builder for the settings used for calls to createService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createServiceOperationSettings() { - return createServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateService. */ - public UnaryCallSettings.Builder updateServiceSettings() { - return updateServiceSettings; - } - - /** Returns the builder for the settings used for calls to updateService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateServiceOperationSettings() { - return updateServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public UnaryCallSettings.Builder deleteServiceSettings() { - return deleteServiceSettings; - } - - /** Returns the builder for the settings used for calls to deleteService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteServiceOperationSettings() { - return deleteServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to listMetadataImports. */ - public PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return listMetadataImportsSettings; - } - - /** Returns the builder for the settings used for calls to getMetadataImport. */ - public UnaryCallSettings.Builder - getMetadataImportSettings() { - return getMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public UnaryCallSettings.Builder - createMetadataImportSettings() { - return createMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings() { - return createMetadataImportOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings.Builder - updateMetadataImportSettings() { - return updateMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings() { - return updateMetadataImportOperationSettings; - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public UnaryCallSettings.Builder exportMetadataSettings() { - return exportMetadataSettings; - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportMetadataOperationSettings() { - return exportMetadataOperationSettings; - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public UnaryCallSettings.Builder restoreServiceSettings() { - return restoreServiceSettings; - } - - /** Returns the builder for the settings used for calls to restoreService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - restoreServiceOperationSettings() { - return restoreServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return createBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to removeIamPolicy. */ - public UnaryCallSettings.Builder - removeIamPolicySettings() { - return removeIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to queryMetadata. */ - public UnaryCallSettings.Builder queryMetadataSettings() { - return queryMetadataSettings; - } - - /** Returns the builder for the settings used for calls to queryMetadata. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> - queryMetadataOperationSettings() { - return queryMetadataOperationSettings; - } - - /** Returns the builder for the settings used for calls to moveTableToDatabase. */ - public UnaryCallSettings.Builder - moveTableToDatabaseSettings() { - return moveTableToDatabaseSettings; - } - - /** Returns the builder for the settings used for calls to moveTableToDatabase. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings() { - return moveTableToDatabaseOperationSettings; - } - - /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ - public UnaryCallSettings.Builder - alterMetadataResourceLocationSettings() { - return alterMetadataResourceLocationSettings; - } - - /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings() { - return alterMetadataResourceLocationOperationSettings; - } - - @Override - public DataprocMetastoreStubSettings build() throws IOException { - return new DataprocMetastoreStubSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationStub.java deleted file mode 100644 index 57e1bd6053ea..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationStub.java +++ /dev/null @@ -1,355 +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.v1alpha.stub; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1alpha.CreateFederationRequest; -import com.google.cloud.metastore.v1alpha.DeleteFederationRequest; -import com.google.cloud.metastore.v1alpha.Federation; -import com.google.cloud.metastore.v1alpha.GetFederationRequest; -import com.google.cloud.metastore.v1alpha.ListFederationsRequest; -import com.google.cloud.metastore.v1alpha.ListFederationsResponse; -import com.google.cloud.metastore.v1alpha.OperationMetadata; -import com.google.cloud.metastore.v1alpha.UpdateFederationRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the DataprocMetastoreFederation service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { - private static final MethodDescriptor - listFederationsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/ListFederations") - .setRequestMarshaller( - ProtoUtils.marshaller(ListFederationsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListFederationsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/GetFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(GetFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Federation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/CreateFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/UpdateFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/DeleteFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable - listFederationsCallable; - private final UnaryCallable - listFederationsPagedCallable; - private final UnaryCallable getFederationCallable; - private final UnaryCallable createFederationCallable; - private final OperationCallable - createFederationOperationCallable; - private final UnaryCallable updateFederationCallable; - private final OperationCallable - updateFederationOperationCallable; - private final UnaryCallable deleteFederationCallable; - private final OperationCallable - deleteFederationOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcDataprocMetastoreFederationStub create( - DataprocMetastoreFederationStubSettings settings) throws IOException { - return new GrpcDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); - } - - public static final GrpcDataprocMetastoreFederationStub create(ClientContext clientContext) - throws IOException { - return new GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcDataprocMetastoreFederationStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcDataprocMetastoreFederationCallableFactory()); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - listFederationsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listFederationsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("federation.name", String.valueOf(request.getFederation().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.listFederationsCallable = - callableFactory.createUnaryCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.listFederationsPagedCallable = - callableFactory.createPagedCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.getFederationCallable = - callableFactory.createUnaryCallable( - getFederationTransportSettings, settings.getFederationSettings(), clientContext); - this.createFederationCallable = - callableFactory.createUnaryCallable( - createFederationTransportSettings, settings.createFederationSettings(), clientContext); - this.createFederationOperationCallable = - callableFactory.createOperationCallable( - createFederationTransportSettings, - settings.createFederationOperationSettings(), - clientContext, - operationsStub); - this.updateFederationCallable = - callableFactory.createUnaryCallable( - updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); - this.updateFederationOperationCallable = - callableFactory.createOperationCallable( - updateFederationTransportSettings, - settings.updateFederationOperationSettings(), - clientContext, - operationsStub); - this.deleteFederationCallable = - callableFactory.createUnaryCallable( - deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); - this.deleteFederationOperationCallable = - callableFactory.createOperationCallable( - deleteFederationTransportSettings, - settings.deleteFederationOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listFederationsCallable() { - return listFederationsCallable; - } - - @Override - public UnaryCallable - listFederationsPagedCallable() { - return listFederationsPagedCallable; - } - - @Override - public UnaryCallable getFederationCallable() { - return getFederationCallable; - } - - @Override - public UnaryCallable createFederationCallable() { - return createFederationCallable; - } - - @Override - public OperationCallable - createFederationOperationCallable() { - return createFederationOperationCallable; - } - - @Override - public UnaryCallable updateFederationCallable() { - return updateFederationCallable; - } - - @Override - public OperationCallable - updateFederationOperationCallable() { - return updateFederationOperationCallable; - } - - @Override - public UnaryCallable deleteFederationCallable() { - return deleteFederationCallable; - } - - @Override - public OperationCallable - deleteFederationOperationCallable() { - return deleteFederationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreStub.java deleted file mode 100644 index 51cef1e023d0..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreStub.java +++ /dev/null @@ -1,956 +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.v1alpha.stub; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest; -import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse; -import com.google.cloud.metastore.v1alpha.Backup; -import com.google.cloud.metastore.v1alpha.CreateBackupRequest; -import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.CreateServiceRequest; -import com.google.cloud.metastore.v1alpha.DeleteBackupRequest; -import com.google.cloud.metastore.v1alpha.DeleteServiceRequest; -import com.google.cloud.metastore.v1alpha.ExportMetadataRequest; -import com.google.cloud.metastore.v1alpha.GetBackupRequest; -import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.GetServiceRequest; -import com.google.cloud.metastore.v1alpha.ListBackupsRequest; -import com.google.cloud.metastore.v1alpha.ListBackupsResponse; -import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1alpha.ListServicesRequest; -import com.google.cloud.metastore.v1alpha.ListServicesResponse; -import com.google.cloud.metastore.v1alpha.MetadataExport; -import com.google.cloud.metastore.v1alpha.MetadataImport; -import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest; -import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse; -import com.google.cloud.metastore.v1alpha.OperationMetadata; -import com.google.cloud.metastore.v1alpha.QueryMetadataRequest; -import com.google.cloud.metastore.v1alpha.QueryMetadataResponse; -import com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest; -import com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse; -import com.google.cloud.metastore.v1alpha.Restore; -import com.google.cloud.metastore.v1alpha.RestoreServiceRequest; -import com.google.cloud.metastore.v1alpha.Service; -import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.UpdateServiceRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcDataprocMetastoreStub extends DataprocMetastoreStub { - private static final MethodDescriptor - listServicesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ListServices") - .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/GetService") - .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/CreateService") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/UpdateService") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/DeleteService") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listMetadataImportsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/ListMetadataImports") - .setRequestMarshaller( - ProtoUtils.marshaller(ListMetadataImportsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListMetadataImportsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/GetMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(GetMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(MetadataImport.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/CreateMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/UpdateMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - exportMetadataMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ExportMetadata") - .setRequestMarshaller( - ProtoUtils.marshaller(ExportMetadataRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - restoreServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/RestoreService") - .setRequestMarshaller( - ProtoUtils.marshaller(RestoreServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listBackupsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ListBackups") - .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/GetBackup") - .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/CreateBackup") - .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/DeleteBackup") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - removeIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/RemoveIamPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(RemoveIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(RemoveIamPolicyResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - queryMetadataMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/QueryMetadata") - .setRequestMarshaller( - ProtoUtils.marshaller(QueryMetadataRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - moveTableToDatabaseMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/MoveTableToDatabase") - .setRequestMarshaller( - ProtoUtils.marshaller(MoveTableToDatabaseRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - alterMetadataResourceLocationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/AlterMetadataResourceLocation") - .setRequestMarshaller( - ProtoUtils.marshaller(AlterMetadataResourceLocationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable listServicesCallable; - private final UnaryCallable - listServicesPagedCallable; - private final UnaryCallable getServiceCallable; - private final UnaryCallable createServiceCallable; - private final OperationCallable - createServiceOperationCallable; - private final UnaryCallable updateServiceCallable; - private final OperationCallable - updateServiceOperationCallable; - private final UnaryCallable deleteServiceCallable; - private final OperationCallable - deleteServiceOperationCallable; - private final UnaryCallable - listMetadataImportsCallable; - private final UnaryCallable - listMetadataImportsPagedCallable; - private final UnaryCallable getMetadataImportCallable; - private final UnaryCallable createMetadataImportCallable; - private final OperationCallable - createMetadataImportOperationCallable; - private final UnaryCallable updateMetadataImportCallable; - private final OperationCallable - updateMetadataImportOperationCallable; - private final UnaryCallable exportMetadataCallable; - private final OperationCallable - exportMetadataOperationCallable; - private final UnaryCallable restoreServiceCallable; - private final OperationCallable - restoreServiceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - private final UnaryCallable - removeIamPolicyCallable; - private final UnaryCallable queryMetadataCallable; - private final OperationCallable - queryMetadataOperationCallable; - private final UnaryCallable moveTableToDatabaseCallable; - private final OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable; - private final UnaryCallable - alterMetadataResourceLocationCallable; - private final OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) - throws IOException { - return new GrpcDataprocMetastoreStub(settings, ClientContext.create(settings)); - } - - public static final GrpcDataprocMetastoreStub create(ClientContext clientContext) - throws IOException { - return new GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcDataprocMetastoreStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcDataprocMetastoreCallableFactory()); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listServicesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listServicesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service.name", String.valueOf(request.getService().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listMetadataImportsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listMetadataImportsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "metadata_import.name", - String.valueOf(request.getMetadataImport().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings exportMetadataTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(exportMetadataMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings restoreServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(restoreServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings listBackupsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - removeIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(removeIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings queryMetadataTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(queryMetadataMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings moveTableToDatabaseTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings - alterMetadataResourceLocationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - - this.listServicesCallable = - callableFactory.createUnaryCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.listServicesPagedCallable = - callableFactory.createPagedCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.getServiceCallable = - callableFactory.createUnaryCallable( - getServiceTransportSettings, settings.getServiceSettings(), clientContext); - this.createServiceCallable = - callableFactory.createUnaryCallable( - createServiceTransportSettings, settings.createServiceSettings(), clientContext); - this.createServiceOperationCallable = - callableFactory.createOperationCallable( - createServiceTransportSettings, - settings.createServiceOperationSettings(), - clientContext, - operationsStub); - this.updateServiceCallable = - callableFactory.createUnaryCallable( - updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); - this.updateServiceOperationCallable = - callableFactory.createOperationCallable( - updateServiceTransportSettings, - settings.updateServiceOperationSettings(), - clientContext, - operationsStub); - this.deleteServiceCallable = - callableFactory.createUnaryCallable( - deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); - this.deleteServiceOperationCallable = - callableFactory.createOperationCallable( - deleteServiceTransportSettings, - settings.deleteServiceOperationSettings(), - clientContext, - operationsStub); - this.listMetadataImportsCallable = - callableFactory.createUnaryCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.listMetadataImportsPagedCallable = - callableFactory.createPagedCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.getMetadataImportCallable = - callableFactory.createUnaryCallable( - getMetadataImportTransportSettings, - settings.getMetadataImportSettings(), - clientContext); - this.createMetadataImportCallable = - callableFactory.createUnaryCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportSettings(), - clientContext); - this.createMetadataImportOperationCallable = - callableFactory.createOperationCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportOperationSettings(), - clientContext, - operationsStub); - this.updateMetadataImportCallable = - callableFactory.createUnaryCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportSettings(), - clientContext); - this.updateMetadataImportOperationCallable = - callableFactory.createOperationCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportOperationSettings(), - clientContext, - operationsStub); - this.exportMetadataCallable = - callableFactory.createUnaryCallable( - exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); - this.exportMetadataOperationCallable = - callableFactory.createOperationCallable( - exportMetadataTransportSettings, - settings.exportMetadataOperationSettings(), - clientContext, - operationsStub); - this.restoreServiceCallable = - callableFactory.createUnaryCallable( - restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); - this.restoreServiceOperationCallable = - callableFactory.createOperationCallable( - restoreServiceTransportSettings, - settings.restoreServiceOperationSettings(), - clientContext, - operationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - operationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - operationsStub); - this.removeIamPolicyCallable = - callableFactory.createUnaryCallable( - removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); - this.queryMetadataCallable = - callableFactory.createUnaryCallable( - queryMetadataTransportSettings, settings.queryMetadataSettings(), clientContext); - this.queryMetadataOperationCallable = - callableFactory.createOperationCallable( - queryMetadataTransportSettings, - settings.queryMetadataOperationSettings(), - clientContext, - operationsStub); - this.moveTableToDatabaseCallable = - callableFactory.createUnaryCallable( - moveTableToDatabaseTransportSettings, - settings.moveTableToDatabaseSettings(), - clientContext); - this.moveTableToDatabaseOperationCallable = - callableFactory.createOperationCallable( - moveTableToDatabaseTransportSettings, - settings.moveTableToDatabaseOperationSettings(), - clientContext, - operationsStub); - this.alterMetadataResourceLocationCallable = - callableFactory.createUnaryCallable( - alterMetadataResourceLocationTransportSettings, - settings.alterMetadataResourceLocationSettings(), - clientContext); - this.alterMetadataResourceLocationOperationCallable = - callableFactory.createOperationCallable( - alterMetadataResourceLocationTransportSettings, - settings.alterMetadataResourceLocationOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listServicesCallable() { - return listServicesCallable; - } - - @Override - public UnaryCallable listServicesPagedCallable() { - return listServicesPagedCallable; - } - - @Override - public UnaryCallable getServiceCallable() { - return getServiceCallable; - } - - @Override - public UnaryCallable createServiceCallable() { - return createServiceCallable; - } - - @Override - public OperationCallable - createServiceOperationCallable() { - return createServiceOperationCallable; - } - - @Override - public UnaryCallable updateServiceCallable() { - return updateServiceCallable; - } - - @Override - public OperationCallable - updateServiceOperationCallable() { - return updateServiceOperationCallable; - } - - @Override - public UnaryCallable deleteServiceCallable() { - return deleteServiceCallable; - } - - @Override - public OperationCallable - deleteServiceOperationCallable() { - return deleteServiceOperationCallable; - } - - @Override - public UnaryCallable - listMetadataImportsCallable() { - return listMetadataImportsCallable; - } - - @Override - public UnaryCallable - listMetadataImportsPagedCallable() { - return listMetadataImportsPagedCallable; - } - - @Override - public UnaryCallable getMetadataImportCallable() { - return getMetadataImportCallable; - } - - @Override - public UnaryCallable createMetadataImportCallable() { - return createMetadataImportCallable; - } - - @Override - public OperationCallable - createMetadataImportOperationCallable() { - return createMetadataImportOperationCallable; - } - - @Override - public UnaryCallable updateMetadataImportCallable() { - return updateMetadataImportCallable; - } - - @Override - public OperationCallable - updateMetadataImportOperationCallable() { - return updateMetadataImportOperationCallable; - } - - @Override - public UnaryCallable exportMetadataCallable() { - return exportMetadataCallable; - } - - @Override - public OperationCallable - exportMetadataOperationCallable() { - return exportMetadataOperationCallable; - } - - @Override - public UnaryCallable restoreServiceCallable() { - return restoreServiceCallable; - } - - @Override - public OperationCallable - restoreServiceOperationCallable() { - return restoreServiceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public UnaryCallable removeIamPolicyCallable() { - return removeIamPolicyCallable; - } - - @Override - public UnaryCallable queryMetadataCallable() { - return queryMetadataCallable; - } - - @Override - public OperationCallable - queryMetadataOperationCallable() { - return queryMetadataOperationCallable; - } - - @Override - public UnaryCallable moveTableToDatabaseCallable() { - return moveTableToDatabaseCallable; - } - - @Override - public OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable() { - return moveTableToDatabaseOperationCallable; - } - - @Override - public UnaryCallable - alterMetadataResourceLocationCallable() { - return alterMetadataResourceLocationCallable; - } - - @Override - public OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable() { - return alterMetadataResourceLocationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationStub.java deleted file mode 100644 index 602e0b953e44..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationStub.java +++ /dev/null @@ -1,524 +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.v1alpha.stub; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.HttpRule; -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1alpha.CreateFederationRequest; -import com.google.cloud.metastore.v1alpha.DeleteFederationRequest; -import com.google.cloud.metastore.v1alpha.Federation; -import com.google.cloud.metastore.v1alpha.GetFederationRequest; -import com.google.cloud.metastore.v1alpha.ListFederationsRequest; -import com.google.cloud.metastore.v1alpha.ListFederationsResponse; -import com.google.cloud.metastore.v1alpha.OperationMetadata; -import com.google.cloud.metastore.v1alpha.UpdateFederationRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the DataprocMetastoreFederation service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .add(Federation.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listFederationsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/ListFederations") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{parent=projects/*/locations/*}/federations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListFederationsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/GetFederation") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Federation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/CreateFederation") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{parent=projects/*/locations/*}/federations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "federationId", request.getFederationId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("federation", request.getFederation(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/UpdateFederation") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{federation.name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "federation.name", request.getFederation().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("federation", request.getFederation(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/DeleteFederation") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable - listFederationsCallable; - private final UnaryCallable - listFederationsPagedCallable; - private final UnaryCallable getFederationCallable; - private final UnaryCallable createFederationCallable; - private final OperationCallable - createFederationOperationCallable; - private final UnaryCallable updateFederationCallable; - private final OperationCallable - updateFederationOperationCallable; - private final UnaryCallable deleteFederationCallable; - private final OperationCallable - deleteFederationOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonDataprocMetastoreFederationStub create( - DataprocMetastoreFederationStubSettings settings) throws IOException { - return new HttpJsonDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonDataprocMetastoreFederationStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonDataprocMetastoreFederationStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonDataprocMetastoreFederationCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create( - clientContext, - callableFactory, - typeRegistry, - ImmutableMap.builder() - .put( - "google.longrunning.Operations.DeleteOperation", - HttpRule.newBuilder() - .setDelete("/v1alpha/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.GetOperation", - HttpRule.newBuilder() - .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.ListOperations", - HttpRule.newBuilder() - .setGet("/v1alpha/{name=projects/*/locations/*}/operations") - .build()) - .build()); - - HttpJsonCallSettings - listFederationsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listFederationsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listFederationsCallable = - callableFactory.createUnaryCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.listFederationsPagedCallable = - callableFactory.createPagedCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.getFederationCallable = - callableFactory.createUnaryCallable( - getFederationTransportSettings, settings.getFederationSettings(), clientContext); - this.createFederationCallable = - callableFactory.createUnaryCallable( - createFederationTransportSettings, settings.createFederationSettings(), clientContext); - this.createFederationOperationCallable = - callableFactory.createOperationCallable( - createFederationTransportSettings, - settings.createFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateFederationCallable = - callableFactory.createUnaryCallable( - updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); - this.updateFederationOperationCallable = - callableFactory.createOperationCallable( - updateFederationTransportSettings, - settings.updateFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteFederationCallable = - callableFactory.createUnaryCallable( - deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); - this.deleteFederationOperationCallable = - callableFactory.createOperationCallable( - deleteFederationTransportSettings, - settings.deleteFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listFederationsMethodDescriptor); - methodDescriptors.add(getFederationMethodDescriptor); - methodDescriptors.add(createFederationMethodDescriptor); - methodDescriptors.add(updateFederationMethodDescriptor); - methodDescriptors.add(deleteFederationMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable listFederationsCallable() { - return listFederationsCallable; - } - - @Override - public UnaryCallable - listFederationsPagedCallable() { - return listFederationsPagedCallable; - } - - @Override - public UnaryCallable getFederationCallable() { - return getFederationCallable; - } - - @Override - public UnaryCallable createFederationCallable() { - return createFederationCallable; - } - - @Override - public OperationCallable - createFederationOperationCallable() { - return createFederationOperationCallable; - } - - @Override - public UnaryCallable updateFederationCallable() { - return updateFederationCallable; - } - - @Override - public OperationCallable - updateFederationOperationCallable() { - return updateFederationOperationCallable; - } - - @Override - public UnaryCallable deleteFederationCallable() { - return deleteFederationCallable; - } - - @Override - public OperationCallable - deleteFederationOperationCallable() { - return deleteFederationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreStub.java deleted file mode 100644 index bc5ad2c549b5..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreStub.java +++ /dev/null @@ -1,1490 +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.v1alpha.stub; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.HttpRule; -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest; -import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse; -import com.google.cloud.metastore.v1alpha.Backup; -import com.google.cloud.metastore.v1alpha.CreateBackupRequest; -import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.CreateServiceRequest; -import com.google.cloud.metastore.v1alpha.DeleteBackupRequest; -import com.google.cloud.metastore.v1alpha.DeleteServiceRequest; -import com.google.cloud.metastore.v1alpha.ExportMetadataRequest; -import com.google.cloud.metastore.v1alpha.GetBackupRequest; -import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.GetServiceRequest; -import com.google.cloud.metastore.v1alpha.ListBackupsRequest; -import com.google.cloud.metastore.v1alpha.ListBackupsResponse; -import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1alpha.ListServicesRequest; -import com.google.cloud.metastore.v1alpha.ListServicesResponse; -import com.google.cloud.metastore.v1alpha.MetadataExport; -import com.google.cloud.metastore.v1alpha.MetadataImport; -import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest; -import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse; -import com.google.cloud.metastore.v1alpha.OperationMetadata; -import com.google.cloud.metastore.v1alpha.QueryMetadataRequest; -import com.google.cloud.metastore.v1alpha.QueryMetadataResponse; -import com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest; -import com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse; -import com.google.cloud.metastore.v1alpha.Restore; -import com.google.cloud.metastore.v1alpha.RestoreServiceRequest; -import com.google.cloud.metastore.v1alpha.Service; -import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1alpha.UpdateServiceRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Service.getDescriptor()) - .add(Empty.getDescriptor()) - .add(AlterMetadataResourceLocationResponse.getDescriptor()) - .add(MetadataImport.getDescriptor()) - .add(MoveTableToDatabaseResponse.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .add(Backup.getDescriptor()) - .add(MetadataExport.getDescriptor()) - .add(Restore.getDescriptor()) - .add(QueryMetadataResponse.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listServicesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ListServices") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{parent=projects/*/locations/*}/services", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListServicesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/GetService") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Service.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/CreateService") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{parent=projects/*/locations/*}/services", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "serviceId", request.getServiceId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("service", request.getService(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/UpdateService") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{service.name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "service.name", request.getService().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("service", request.getService(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/DeleteService") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listMetadataImportsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/ListMetadataImports") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListMetadataImportsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/GetMetadataImport") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MetadataImport.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/CreateMetadataImport") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "metadataImportId", request.getMetadataImportId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("metadataImport", request.getMetadataImport(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateMetadataImportRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/UpdateMetadataImport") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{metadataImport.name=projects/*/locations/*/services/*/metadataImports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "metadataImport.name", - request.getMetadataImport().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("metadataImport", request.getMetadataImport(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateMetadataImportRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - exportMetadataMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ExportMetadata") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (ExportMetadataRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - restoreServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/RestoreService") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{service=projects/*/locations/*/services/*}:restore", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (RestoreServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listBackupsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ListBackups") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{parent=projects/*/locations/*/services/*}/backups", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/GetBackup") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Backup.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/CreateBackup") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{parent=projects/*/locations/*/services/*}/backups", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "backupId", request.getBackupId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("backup", request.getBackup(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/DeleteBackup") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - removeIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/RemoveIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(RemoveIamPolicyResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - queryMetadataMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/QueryMetadata") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{service=projects/*/locations/*/services/*}:queryMetadata", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (QueryMetadataRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - moveTableToDatabaseMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/MoveTableToDatabase") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{service=projects/*/locations/*/services/*}:moveTableToDatabase", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (MoveTableToDatabaseRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - alterMetadataResourceLocationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1alpha.DataprocMetastore/AlterMetadataResourceLocation") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1alpha/{service=projects/*/locations/*/services/*}:alterLocation", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AlterMetadataResourceLocationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable listServicesCallable; - private final UnaryCallable - listServicesPagedCallable; - private final UnaryCallable getServiceCallable; - private final UnaryCallable createServiceCallable; - private final OperationCallable - createServiceOperationCallable; - private final UnaryCallable updateServiceCallable; - private final OperationCallable - updateServiceOperationCallable; - private final UnaryCallable deleteServiceCallable; - private final OperationCallable - deleteServiceOperationCallable; - private final UnaryCallable - listMetadataImportsCallable; - private final UnaryCallable - listMetadataImportsPagedCallable; - private final UnaryCallable getMetadataImportCallable; - private final UnaryCallable createMetadataImportCallable; - private final OperationCallable - createMetadataImportOperationCallable; - private final UnaryCallable updateMetadataImportCallable; - private final OperationCallable - updateMetadataImportOperationCallable; - private final UnaryCallable exportMetadataCallable; - private final OperationCallable - exportMetadataOperationCallable; - private final UnaryCallable restoreServiceCallable; - private final OperationCallable - restoreServiceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - private final UnaryCallable - removeIamPolicyCallable; - private final UnaryCallable queryMetadataCallable; - private final OperationCallable - queryMetadataOperationCallable; - private final UnaryCallable moveTableToDatabaseCallable; - private final OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable; - private final UnaryCallable - alterMetadataResourceLocationCallable; - private final OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) - throws IOException { - return new HttpJsonDataprocMetastoreStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonDataprocMetastoreStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonDataprocMetastoreStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonDataprocMetastoreCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create( - clientContext, - callableFactory, - typeRegistry, - ImmutableMap.builder() - .put( - "google.longrunning.Operations.DeleteOperation", - HttpRule.newBuilder() - .setDelete("/v1alpha/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.GetOperation", - HttpRule.newBuilder() - .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.ListOperations", - HttpRule.newBuilder() - .setGet("/v1alpha/{name=projects/*/locations/*}/operations") - .build()) - .build()); - - HttpJsonCallSettings listServicesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listServicesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listMetadataImportsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listMetadataImportsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings exportMetadataTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(exportMetadataMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings restoreServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(restoreServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listBackupsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - removeIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(removeIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings queryMetadataTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(queryMetadataMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - moveTableToDatabaseTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - alterMetadataResourceLocationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listServicesCallable = - callableFactory.createUnaryCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.listServicesPagedCallable = - callableFactory.createPagedCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.getServiceCallable = - callableFactory.createUnaryCallable( - getServiceTransportSettings, settings.getServiceSettings(), clientContext); - this.createServiceCallable = - callableFactory.createUnaryCallable( - createServiceTransportSettings, settings.createServiceSettings(), clientContext); - this.createServiceOperationCallable = - callableFactory.createOperationCallable( - createServiceTransportSettings, - settings.createServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateServiceCallable = - callableFactory.createUnaryCallable( - updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); - this.updateServiceOperationCallable = - callableFactory.createOperationCallable( - updateServiceTransportSettings, - settings.updateServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteServiceCallable = - callableFactory.createUnaryCallable( - deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); - this.deleteServiceOperationCallable = - callableFactory.createOperationCallable( - deleteServiceTransportSettings, - settings.deleteServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listMetadataImportsCallable = - callableFactory.createUnaryCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.listMetadataImportsPagedCallable = - callableFactory.createPagedCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.getMetadataImportCallable = - callableFactory.createUnaryCallable( - getMetadataImportTransportSettings, - settings.getMetadataImportSettings(), - clientContext); - this.createMetadataImportCallable = - callableFactory.createUnaryCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportSettings(), - clientContext); - this.createMetadataImportOperationCallable = - callableFactory.createOperationCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateMetadataImportCallable = - callableFactory.createUnaryCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportSettings(), - clientContext); - this.updateMetadataImportOperationCallable = - callableFactory.createOperationCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.exportMetadataCallable = - callableFactory.createUnaryCallable( - exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); - this.exportMetadataOperationCallable = - callableFactory.createOperationCallable( - exportMetadataTransportSettings, - settings.exportMetadataOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.restoreServiceCallable = - callableFactory.createUnaryCallable( - restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); - this.restoreServiceOperationCallable = - callableFactory.createOperationCallable( - restoreServiceTransportSettings, - settings.restoreServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.removeIamPolicyCallable = - callableFactory.createUnaryCallable( - removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); - this.queryMetadataCallable = - callableFactory.createUnaryCallable( - queryMetadataTransportSettings, settings.queryMetadataSettings(), clientContext); - this.queryMetadataOperationCallable = - callableFactory.createOperationCallable( - queryMetadataTransportSettings, - settings.queryMetadataOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.moveTableToDatabaseCallable = - callableFactory.createUnaryCallable( - moveTableToDatabaseTransportSettings, - settings.moveTableToDatabaseSettings(), - clientContext); - this.moveTableToDatabaseOperationCallable = - callableFactory.createOperationCallable( - moveTableToDatabaseTransportSettings, - settings.moveTableToDatabaseOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.alterMetadataResourceLocationCallable = - callableFactory.createUnaryCallable( - alterMetadataResourceLocationTransportSettings, - settings.alterMetadataResourceLocationSettings(), - clientContext); - this.alterMetadataResourceLocationOperationCallable = - callableFactory.createOperationCallable( - alterMetadataResourceLocationTransportSettings, - settings.alterMetadataResourceLocationOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listServicesMethodDescriptor); - methodDescriptors.add(getServiceMethodDescriptor); - methodDescriptors.add(createServiceMethodDescriptor); - methodDescriptors.add(updateServiceMethodDescriptor); - methodDescriptors.add(deleteServiceMethodDescriptor); - methodDescriptors.add(listMetadataImportsMethodDescriptor); - methodDescriptors.add(getMetadataImportMethodDescriptor); - methodDescriptors.add(createMetadataImportMethodDescriptor); - methodDescriptors.add(updateMetadataImportMethodDescriptor); - methodDescriptors.add(exportMetadataMethodDescriptor); - methodDescriptors.add(restoreServiceMethodDescriptor); - methodDescriptors.add(listBackupsMethodDescriptor); - methodDescriptors.add(getBackupMethodDescriptor); - methodDescriptors.add(createBackupMethodDescriptor); - methodDescriptors.add(deleteBackupMethodDescriptor); - methodDescriptors.add(removeIamPolicyMethodDescriptor); - methodDescriptors.add(queryMetadataMethodDescriptor); - methodDescriptors.add(moveTableToDatabaseMethodDescriptor); - methodDescriptors.add(alterMetadataResourceLocationMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable listServicesCallable() { - return listServicesCallable; - } - - @Override - public UnaryCallable listServicesPagedCallable() { - return listServicesPagedCallable; - } - - @Override - public UnaryCallable getServiceCallable() { - return getServiceCallable; - } - - @Override - public UnaryCallable createServiceCallable() { - return createServiceCallable; - } - - @Override - public OperationCallable - createServiceOperationCallable() { - return createServiceOperationCallable; - } - - @Override - public UnaryCallable updateServiceCallable() { - return updateServiceCallable; - } - - @Override - public OperationCallable - updateServiceOperationCallable() { - return updateServiceOperationCallable; - } - - @Override - public UnaryCallable deleteServiceCallable() { - return deleteServiceCallable; - } - - @Override - public OperationCallable - deleteServiceOperationCallable() { - return deleteServiceOperationCallable; - } - - @Override - public UnaryCallable - listMetadataImportsCallable() { - return listMetadataImportsCallable; - } - - @Override - public UnaryCallable - listMetadataImportsPagedCallable() { - return listMetadataImportsPagedCallable; - } - - @Override - public UnaryCallable getMetadataImportCallable() { - return getMetadataImportCallable; - } - - @Override - public UnaryCallable createMetadataImportCallable() { - return createMetadataImportCallable; - } - - @Override - public OperationCallable - createMetadataImportOperationCallable() { - return createMetadataImportOperationCallable; - } - - @Override - public UnaryCallable updateMetadataImportCallable() { - return updateMetadataImportCallable; - } - - @Override - public OperationCallable - updateMetadataImportOperationCallable() { - return updateMetadataImportOperationCallable; - } - - @Override - public UnaryCallable exportMetadataCallable() { - return exportMetadataCallable; - } - - @Override - public OperationCallable - exportMetadataOperationCallable() { - return exportMetadataOperationCallable; - } - - @Override - public UnaryCallable restoreServiceCallable() { - return restoreServiceCallable; - } - - @Override - public OperationCallable - restoreServiceOperationCallable() { - return restoreServiceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public UnaryCallable removeIamPolicyCallable() { - return removeIamPolicyCallable; - } - - @Override - public UnaryCallable queryMetadataCallable() { - return queryMetadataCallable; - } - - @Override - public OperationCallable - queryMetadataOperationCallable() { - return queryMetadataOperationCallable; - } - - @Override - public UnaryCallable moveTableToDatabaseCallable() { - return moveTableToDatabaseCallable; - } - - @Override - public OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable() { - return moveTableToDatabaseOperationCallable; - } - - @Override - public UnaryCallable - alterMetadataResourceLocationCallable() { - return alterMetadataResourceLocationCallable; - } - - @Override - public OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable() { - return alterMetadataResourceLocationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClient.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClient.java deleted file mode 100644 index becf982a4d53..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClient.java +++ /dev/null @@ -1,3143 +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.v1beta; - -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.v1beta.stub.DataprocMetastoreStub; -import com.google.cloud.metastore.v1beta.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: - * - *

    - *
  • The service works with a collection of Google Cloud projects, named: `/projects/*` - *
  • Each project has a collection of available locations, named: `/locations/*` (a location - * must refer to a Google Cloud `region`) - *
  • Each location has a collection of services, named: `/services/*` - *
  • Dataproc Metastore services are resources with names of the form: - *
- * - *

`/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: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

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

This class can be customized by passing in a custom instance of 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. - */ -@BetaApi -@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 future =
-   *       dataprocMetastoreClient.listServicesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Service element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listServicesPagedCallable() { - return stub.listServicesPagedCallable(); - } - - // 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();
-   *   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 listServicesCallable() { - return stub.listServicesCallable(); - } - - // 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()) {
-   *   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 future = dataprocMetastoreClient.getServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getServiceCallable() { - return stub.getServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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]");
-   *   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 createServiceAsync( - LocationName parent, Service service, String serviceId) { - CreateServiceRequest request = - CreateServiceRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setService(service) - .setServiceId(serviceId) - .build(); - return createServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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();
-   *   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 createServiceAsync( - String parent, Service service, String serviceId) { - CreateServiceRequest request = - CreateServiceRequest.newBuilder() - .setParent(parent) - .setService(service) - .setServiceId(serviceId) - .build(); - return createServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   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 createServiceAsync( - CreateServiceRequest request) { - return createServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   CreateServiceRequest request =
-   *       CreateServiceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setServiceId("serviceId-194185552")
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.createServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createServiceOperationCallable() { - return stub.createServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore service 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()) {
-   *   CreateServiceRequest request =
-   *       CreateServiceRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setServiceId("serviceId-194185552")
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.createServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createServiceCallable() { - return stub.createServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   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`. - *

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 updateServiceAsync( - Service service, FieldMask updateMask) { - UpdateServiceRequest request = - UpdateServiceRequest.newBuilder().setService(service).setUpdateMask(updateMask).build(); - return updateServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   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 updateServiceAsync( - UpdateServiceRequest request) { - return updateServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   UpdateServiceRequest request =
-   *       UpdateServiceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.updateServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Service response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateServiceOperationCallable() { - return stub.updateServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the parameters 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()) {
-   *   UpdateServiceRequest request =
-   *       UpdateServiceRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setService(Service.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.updateServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateServiceCallable() { - return stub.updateServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   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: - *

`projects/{project_number}/locations/{location_id}/services/{service_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteServiceAsync(ServiceName name) { - DeleteServiceRequest request = - DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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();
-   *   dataprocMetastoreClient.deleteServiceAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The relative resource name of the metastore service to delete, 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 OperationFuture deleteServiceAsync(String name) { - DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build(); - return deleteServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   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 deleteServiceAsync( - DeleteServiceRequest request) { - return deleteServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   DeleteServiceRequest request =
-   *       DeleteServiceRequest.newBuilder()
-   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.deleteServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteServiceOperationCallable() { - return stub.deleteServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes 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()) {
-   *   DeleteServiceRequest request =
-   *       DeleteServiceRequest.newBuilder()
-   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.deleteServiceCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteServiceCallable() { - return stub.deleteServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists imports in a 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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   ListMetadataImportsRequest request =
-   *       ListMetadataImportsRequest.newBuilder()
-   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.listMetadataImportsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (MetadataImport element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listMetadataImportsPagedCallable() { - return stub.listMetadataImportsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists imports in a 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()) {
-   *   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 - listMetadataImportsCallable() { - return stub.listMetadataImportsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single import. - * - *

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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   GetMetadataImportRequest request =
-   *       GetMetadataImportRequest.newBuilder()
-   *           .setName(
-   *               MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.getMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getMetadataImportCallable() { - return stub.getMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

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

`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 createMetadataImportAsync( - ServiceName parent, MetadataImport metadataImport, String metadataImportId) { - CreateMetadataImportRequest request = - CreateMetadataImportRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMetadataImport(metadataImport) - .setMetadataImportId(metadataImportId) - .build(); - return createMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

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

`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 createMetadataImportAsync( - String parent, MetadataImport metadataImport, String metadataImportId) { - CreateMetadataImportRequest request = - CreateMetadataImportRequest.newBuilder() - .setParent(parent) - .setMetadataImport(metadataImport) - .setMetadataImportId(metadataImportId) - .build(); - return createMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 createMetadataImportAsync( - CreateMetadataImportRequest request) { - return createMetadataImportOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createMetadataImportOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createMetadataImportOperationCallable() { - return stub.createMetadataImportOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new MetadataImport in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createMetadataImportCallable() { - return stub.createMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   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`. - *

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 updateMetadataImportAsync( - MetadataImport metadataImport, FieldMask updateMask) { - UpdateMetadataImportRequest request = - UpdateMetadataImportRequest.newBuilder() - .setMetadataImport(metadataImport) - .setUpdateMask(updateMask) - .build(); - return updateMetadataImportAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   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 updateMetadataImportAsync( - UpdateMetadataImportRequest request) { - return updateMetadataImportOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   UpdateMetadataImportRequest request =
-   *       UpdateMetadataImportRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setMetadataImport(MetadataImport.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.updateMetadataImportOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataImport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateMetadataImportOperationCallable() { - return stub.updateMetadataImportOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a single import. Only the description field of MetadataImport is supported to be - * updated. - * - *

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()) {
-   *   UpdateMetadataImportRequest request =
-   *       UpdateMetadataImportRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setMetadataImport(MetadataImport.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.updateMetadataImportCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateMetadataImportCallable() { - return stub.updateMetadataImportCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   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 exportMetadataAsync( - ExportMetadataRequest request) { - return exportMetadataOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   ExportMetadataRequest request =
-   *       ExportMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.exportMetadataOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MetadataExport response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - exportMetadataOperationCallable() { - return stub.exportMetadataOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Exports metadata from a 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()) {
-   *   ExportMetadataRequest request =
-   *       ExportMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.exportMetadataCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable exportMetadataCallable() { - return stub.exportMetadataCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - ServiceName service, BackupName backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service == null ? null : service.toString()) - .setBackup(backup == null ? null : backup.toString()) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - ServiceName service, String backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service == null ? null : service.toString()) - .setBackup(backup) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - String service, BackupName backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder() - .setService(service) - .setBackup(backup == null ? null : backup.toString()) - .build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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 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: - *

`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 restoreServiceAsync( - String service, String backup) { - RestoreServiceRequest request = - RestoreServiceRequest.newBuilder().setService(service).setBackup(backup).build(); - return restoreServiceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   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 restoreServiceAsync( - RestoreServiceRequest request) { - return restoreServiceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   RestoreServiceRequest request =
-   *       RestoreServiceRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setBackup(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.restoreServiceOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Restore response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - restoreServiceOperationCallable() { - return stub.restoreServiceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Restores a service from a backup. - * - *

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()) {
-   *   RestoreServiceRequest request =
-   *       RestoreServiceRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setBackup(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.restoreServiceCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable restoreServiceCallable() { - return stub.restoreServiceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists backups in a 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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   ListBackupsRequest request =
-   *       ListBackupsRequest.newBuilder()
-   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.listBackupsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Backup element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listBackupsPagedCallable() { - return stub.listBackupsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists backups in a 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()) {
-   *   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 listBackupsCallable() { - return stub.listBackupsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single backup. - * - *

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()) {
-   *   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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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()) {
-   *   GetBackupRequest request =
-   *       GetBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .build();
-   *   ApiFuture future = dataprocMetastoreClient.getBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getBackupCallable() { - return stub.getBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

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

`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 createBackupAsync( - ServiceName parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

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

`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 createBackupAsync( - String parent, Backup backup, String backupId) { - CreateBackupRequest request = - CreateBackupRequest.newBuilder() - .setParent(parent) - .setBackup(backup) - .setBackupId(backupId) - .build(); - return createBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 createBackupAsync( - CreateBackupRequest request) { - return createBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Backup response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createBackupOperationCallable() { - return stub.createBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new backup in a given project and location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (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 future =
-   *       dataprocMetastoreClient.createBackupCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createBackupCallable() { - return stub.createBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   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: - *

`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 deleteBackupAsync(BackupName name) { - DeleteBackupRequest request = - DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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 = 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: - *

`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 deleteBackupAsync(String name) { - DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); - return deleteBackupAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   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 deleteBackupAsync( - DeleteBackupRequest request) { - return deleteBackupOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.deleteBackupOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteBackupOperationCallable() { - return stub.deleteBackupOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single backup. - * - *

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()) {
-   *   DeleteBackupRequest request =
-   *       DeleteBackupRequest.newBuilder()
-   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.deleteBackupCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteBackupCallable() { - return stub.deleteBackupCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes the attached IAM policies for a resource - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
-   *   RemoveIamPolicyRequest request =
-   *       RemoveIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setAsynchronous(true)
-   *           .build();
-   *   RemoveIamPolicyResponse response = dataprocMetastoreClient.removeIamPolicy(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 RemoveIamPolicyResponse removeIamPolicy(RemoveIamPolicyRequest request) { - return removeIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes the attached IAM policies for a resource - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
-   *   RemoveIamPolicyRequest request =
-   *       RemoveIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
-   *           .setAsynchronous(true)
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.removeIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   RemoveIamPolicyResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - removeIamPolicyCallable() { - return stub.removeIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Query DPMS metadata. - * - *

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()) {
-   *   QueryMetadataRequest request =
-   *       QueryMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setQuery("query107944136")
-   *           .build();
-   *   QueryMetadataResponse response = dataprocMetastoreClient.queryMetadataAsync(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 queryMetadataAsync( - QueryMetadataRequest request) { - return queryMetadataOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Query DPMS metadata. - * - *

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()) {
-   *   QueryMetadataRequest request =
-   *       QueryMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setQuery("query107944136")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.queryMetadataOperationCallable().futureCall(request);
-   *   // Do something.
-   *   QueryMetadataResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - queryMetadataOperationCallable() { - return stub.queryMetadataOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Query DPMS metadata. - * - *

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()) {
-   *   QueryMetadataRequest request =
-   *       QueryMetadataRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setQuery("query107944136")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.queryMetadataCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable queryMetadataCallable() { - return stub.queryMetadataCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Move a table to another database. - * - *

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()) {
-   *   MoveTableToDatabaseRequest request =
-   *       MoveTableToDatabaseRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setTableName("tableName-1988717703")
-   *           .setDbName("dbName-1339126743")
-   *           .setDestinationDbName("destinationDbName-2077361705")
-   *           .build();
-   *   MoveTableToDatabaseResponse response =
-   *       dataprocMetastoreClient.moveTableToDatabaseAsync(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 - moveTableToDatabaseAsync(MoveTableToDatabaseRequest request) { - return moveTableToDatabaseOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Move a table to another database. - * - *

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()) {
-   *   MoveTableToDatabaseRequest request =
-   *       MoveTableToDatabaseRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setTableName("tableName-1988717703")
-   *           .setDbName("dbName-1339126743")
-   *           .setDestinationDbName("destinationDbName-2077361705")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient.moveTableToDatabaseOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MoveTableToDatabaseResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable() { - return stub.moveTableToDatabaseOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Move a table to another database. - * - *

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()) {
-   *   MoveTableToDatabaseRequest request =
-   *       MoveTableToDatabaseRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setTableName("tableName-1988717703")
-   *           .setDbName("dbName-1339126743")
-   *           .setDestinationDbName("destinationDbName-2077361705")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.moveTableToDatabaseCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable moveTableToDatabaseCallable() { - return stub.moveTableToDatabaseCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Alter metadata resource location. The metadata resource can be a database, table, or partition. - * This functionality only updates the parent directory for the respective metadata resource and - * does not transfer any existing data to the new 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()) {
-   *   AlterMetadataResourceLocationRequest request =
-   *       AlterMetadataResourceLocationRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setResourceName("resourceName-384566343")
-   *           .setLocationUri("locationUri552310135")
-   *           .build();
-   *   AlterMetadataResourceLocationResponse response =
-   *       dataprocMetastoreClient.alterMetadataResourceLocationAsync(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 - alterMetadataResourceLocationAsync(AlterMetadataResourceLocationRequest request) { - return alterMetadataResourceLocationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Alter metadata resource location. The metadata resource can be a database, table, or partition. - * This functionality only updates the parent directory for the respective metadata resource and - * does not transfer any existing data to the new 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()) {
-   *   AlterMetadataResourceLocationRequest request =
-   *       AlterMetadataResourceLocationRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setResourceName("resourceName-384566343")
-   *           .setLocationUri("locationUri552310135")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreClient
-   *           .alterMetadataResourceLocationOperationCallable()
-   *           .futureCall(request);
-   *   // Do something.
-   *   AlterMetadataResourceLocationResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable() { - return stub.alterMetadataResourceLocationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Alter metadata resource location. The metadata resource can be a database, table, or partition. - * This functionality only updates the parent directory for the respective metadata resource and - * does not transfer any existing data to the new 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()) {
-   *   AlterMetadataResourceLocationRequest request =
-   *       AlterMetadataResourceLocationRequest.newBuilder()
-   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
-   *           .setResourceName("resourceName-384566343")
-   *           .setLocationUri("locationUri552310135")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreClient.alterMetadataResourceLocationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - alterMetadataResourceLocationCallable() { - return stub.alterMetadataResourceLocationCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListServicesPagedResponse - extends AbstractPagedListResponse< - ListServicesRequest, - ListServicesResponse, - Service, - ListServicesPage, - ListServicesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListServicesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListServicesPagedResponse(ListServicesPage page) { - super(page, ListServicesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListServicesPage - extends AbstractPage { - - private ListServicesPage( - PageContext context, - ListServicesResponse response) { - super(context, response); - } - - private static ListServicesPage createEmptyPage() { - return new ListServicesPage(null, null); - } - - @Override - protected ListServicesPage createPage( - PageContext context, - ListServicesResponse response) { - return new ListServicesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListServicesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListServicesRequest, - ListServicesResponse, - Service, - ListServicesPage, - ListServicesFixedSizeCollection> { - - private ListServicesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListServicesFixedSizeCollection createEmptyCollection() { - return new ListServicesFixedSizeCollection(null, 0); - } - - @Override - protected ListServicesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListServicesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListMetadataImportsPagedResponse - extends AbstractPagedListResponse< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage, - ListMetadataImportsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListMetadataImportsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListMetadataImportsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListMetadataImportsPagedResponse(ListMetadataImportsPage page) { - super(page, ListMetadataImportsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListMetadataImportsPage - extends AbstractPage< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage> { - - private ListMetadataImportsPage( - PageContext - context, - ListMetadataImportsResponse response) { - super(context, response); - } - - private static ListMetadataImportsPage createEmptyPage() { - return new ListMetadataImportsPage(null, null); - } - - @Override - protected ListMetadataImportsPage createPage( - PageContext - context, - ListMetadataImportsResponse response) { - return new ListMetadataImportsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListMetadataImportsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - MetadataImport, - ListMetadataImportsPage, - ListMetadataImportsFixedSizeCollection> { - - private ListMetadataImportsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListMetadataImportsFixedSizeCollection createEmptyCollection() { - return new ListMetadataImportsFixedSizeCollection(null, 0); - } - - @Override - protected ListMetadataImportsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListMetadataImportsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListBackupsPagedResponse - extends AbstractPagedListResponse< - ListBackupsRequest, - ListBackupsResponse, - Backup, - ListBackupsPage, - ListBackupsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListBackupsPagedResponse(ListBackupsPage page) { - super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListBackupsPage - extends AbstractPage { - - private ListBackupsPage( - PageContext context, - ListBackupsResponse response) { - super(context, response); - } - - private static ListBackupsPage createEmptyPage() { - return new ListBackupsPage(null, null); - } - - @Override - protected ListBackupsPage createPage( - PageContext context, - ListBackupsResponse response) { - return new ListBackupsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListBackupsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListBackupsRequest, - ListBackupsResponse, - Backup, - ListBackupsPage, - ListBackupsFixedSizeCollection> { - - private ListBackupsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListBackupsFixedSizeCollection createEmptyCollection() { - return new ListBackupsFixedSizeCollection(null, 0); - } - - @Override - protected ListBackupsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListBackupsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClient.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClient.java deleted file mode 100644 index 817d9bb9625a..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClient.java +++ /dev/null @@ -1,1111 +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.v1beta; - -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.v1beta.stub.DataprocMetastoreFederationStub; -import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreFederationStubSettings; -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 federation services. Dataproc Metastore - * Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex - * Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which - * metadata from the backend metastores are served at query time. - * - *

The Dataproc Metastore Federation API defines the following resource model: - * - *

    - *
  • The service works with a collection of Google Cloud projects. - *
  • Each project has a collection of available locations. - *
  • Each location has a collection of federations. - *
  • Dataproc Metastore Federations are resources with names of the form: - * `projects/{project_number}/locations/{location_id}/federations/{federation_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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create()) {
- *   FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
- *   Federation response = dataprocMetastoreFederationClient.getFederation(name);
- * }
- * }
- * - *

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: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

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

This class can be customized by passing in a custom instance of - * DataprocMetastoreFederationSettings 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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newBuilder().setEndpoint(myEndpoint).build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

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
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- *     DataprocMetastoreFederationSettings.newHttpJsonBuilder().build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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

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

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 (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 future =
-   *       dataprocMetastoreFederationClient.listFederationsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Federation element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listFederationsPagedCallable() { - return stub.listFederationsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists federations 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 (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 - listFederationsCallable() { - return stub.listFederationsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a single federation. - * - *

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 (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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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: - *

`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: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying 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. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   GetFederationRequest request =
-   *       GetFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.getFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getFederationCallable() { - return stub.getFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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: - *

`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 createFederationAsync( - LocationName parent, Federation federation, String federationId) { - CreateFederationRequest request = - CreateFederationRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFederation(federation) - .setFederationId(federationId) - .build(); - return createFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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: - *

`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 createFederationAsync( - String parent, Federation federation, String federationId) { - CreateFederationRequest request = - CreateFederationRequest.newBuilder() - .setParent(parent) - .setFederation(federation) - .setFederationId(federationId) - .build(); - return createFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 createFederationAsync( - CreateFederationRequest request) { - return createFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 future =
-   *       dataprocMetastoreFederationClient.createFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createFederationOperationCallable() { - return stub.createFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a metastore federation 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 (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 future =
-   *       dataprocMetastoreFederationClient.createFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createFederationCallable() { - return stub.createFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (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`. - *

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 updateFederationAsync( - Federation federation, FieldMask updateMask) { - UpdateFederationRequest request = - UpdateFederationRequest.newBuilder() - .setFederation(federation) - .setUpdateMask(updateMask) - .build(); - return updateFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (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 updateFederationAsync( - UpdateFederationRequest request) { - return updateFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   UpdateFederationRequest request =
-   *       UpdateFederationRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setFederation(Federation.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreFederationClient.updateFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Federation response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateFederationOperationCallable() { - return stub.updateFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the fields of a federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   UpdateFederationRequest request =
-   *       UpdateFederationRequest.newBuilder()
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setFederation(Federation.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.updateFederationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateFederationCallable() { - return stub.updateFederationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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: - *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteFederationAsync( - FederationName name) { - DeleteFederationRequest request = - DeleteFederationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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: - *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteFederationAsync(String name) { - DeleteFederationRequest request = DeleteFederationRequest.newBuilder().setName(name).build(); - return deleteFederationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (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 deleteFederationAsync( - DeleteFederationRequest request) { - return deleteFederationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   DeleteFederationRequest request =
-   *       DeleteFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       dataprocMetastoreFederationClient.deleteFederationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteFederationOperationCallable() { - return stub.deleteFederationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a single federation. - * - *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
-   *     DataprocMetastoreFederationClient.create()) {
-   *   DeleteFederationRequest request =
-   *       DeleteFederationRequest.newBuilder()
-   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       dataprocMetastoreFederationClient.deleteFederationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteFederationCallable() { - return stub.deleteFederationCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListFederationsPagedResponse - extends AbstractPagedListResponse< - ListFederationsRequest, - ListFederationsResponse, - Federation, - ListFederationsPage, - ListFederationsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListFederationsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListFederationsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListFederationsPagedResponse(ListFederationsPage page) { - super(page, ListFederationsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListFederationsPage - extends AbstractPage< - ListFederationsRequest, ListFederationsResponse, Federation, ListFederationsPage> { - - private ListFederationsPage( - PageContext context, - ListFederationsResponse response) { - super(context, response); - } - - private static ListFederationsPage createEmptyPage() { - return new ListFederationsPage(null, null); - } - - @Override - protected ListFederationsPage createPage( - PageContext context, - ListFederationsResponse response) { - return new ListFederationsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListFederationsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListFederationsRequest, - ListFederationsResponse, - Federation, - ListFederationsPage, - ListFederationsFixedSizeCollection> { - - private ListFederationsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListFederationsFixedSizeCollection createEmptyCollection() { - return new ListFederationsFixedSizeCollection(null, 0); - } - - @Override - protected ListFederationsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListFederationsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationSettings.java deleted file mode 100644 index 64f8872fa188..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationSettings.java +++ /dev/null @@ -1,301 +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.v1beta; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreFederationStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreFederationClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationSettings - extends ClientSettings { - - /** Returns the object with the settings used for calls to listFederations. */ - public PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listFederationsSettings(); - } - - /** Returns the object with the settings used for calls to getFederation. */ - public UnaryCallSettings getFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getFederationSettings(); - } - - /** Returns the object with the settings used for calls to createFederation. */ - public UnaryCallSettings createFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).createFederationSettings(); - } - - /** Returns the object with the settings used for calls to createFederation. */ - public OperationCallSettings - createFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .createFederationOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public UnaryCallSettings updateFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).updateFederationSettings(); - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public OperationCallSettings - updateFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .updateFederationOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public UnaryCallSettings deleteFederationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()).deleteFederationSettings(); - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public OperationCallSettings - deleteFederationOperationSettings() { - return ((DataprocMetastoreFederationStubSettings) getStubSettings()) - .deleteFederationOperationSettings(); - } - - public static final DataprocMetastoreFederationSettings create( - DataprocMetastoreFederationStubSettings stub) throws IOException { - return new DataprocMetastoreFederationSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return DataprocMetastoreFederationStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DataprocMetastoreFederationStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return DataprocMetastoreFederationStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreFederationSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for DataprocMetastoreFederationSettings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(DataprocMetastoreFederationStubSettings.newBuilder(clientContext)); - } - - protected Builder(DataprocMetastoreFederationSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(DataprocMetastoreFederationStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(DataprocMetastoreFederationStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(DataprocMetastoreFederationStubSettings.newHttpJsonBuilder()); - } - - public DataprocMetastoreFederationStubSettings.Builder getStubSettingsBuilder() { - return ((DataprocMetastoreFederationStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listFederations. */ - public PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return getStubSettingsBuilder().listFederationsSettings(); - } - - /** Returns the builder for the settings used for calls to getFederation. */ - public UnaryCallSettings.Builder getFederationSettings() { - return getStubSettingsBuilder().getFederationSettings(); - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public UnaryCallSettings.Builder - createFederationSettings() { - return getStubSettingsBuilder().createFederationSettings(); - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public OperationCallSettings.Builder - createFederationOperationSettings() { - return getStubSettingsBuilder().createFederationOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public UnaryCallSettings.Builder - updateFederationSettings() { - return getStubSettingsBuilder().updateFederationSettings(); - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public OperationCallSettings.Builder - updateFederationOperationSettings() { - return getStubSettingsBuilder().updateFederationOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public UnaryCallSettings.Builder - deleteFederationSettings() { - return getStubSettingsBuilder().deleteFederationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public OperationCallSettings.Builder - deleteFederationOperationSettings() { - return getStubSettingsBuilder().deleteFederationOperationSettings(); - } - - @Override - public DataprocMetastoreFederationSettings build() throws IOException { - return new DataprocMetastoreFederationSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreSettings.java deleted file mode 100644 index 81eeeb943e13..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreSettings.java +++ /dev/null @@ -1,574 +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.v1beta; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataprocMetastoreSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listServices. */ - public PagedCallSettings - listServicesSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listServicesSettings(); - } - - /** Returns the object with the settings used for calls to getService. */ - public UnaryCallSettings getServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getServiceSettings(); - } - - /** Returns the object with the settings used for calls to createService. */ - public UnaryCallSettings createServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceSettings(); - } - - /** Returns the object with the settings used for calls to createService. */ - public OperationCallSettings - createServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateService. */ - public UnaryCallSettings updateServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceSettings(); - } - - /** Returns the object with the settings used for calls to updateService. */ - public OperationCallSettings - updateServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteService. */ - public UnaryCallSettings deleteServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceSettings(); - } - - /** Returns the object with the settings used for calls to deleteService. */ - public OperationCallSettings - deleteServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to listMetadataImports. */ - public PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listMetadataImportsSettings(); - } - - /** Returns the object with the settings used for calls to getMetadataImport. */ - public UnaryCallSettings getMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public UnaryCallSettings createMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public OperationCallSettings - createMetadataImportOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .createMetadataImportOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings updateMetadataImportSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).updateMetadataImportSettings(); - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public OperationCallSettings - updateMetadataImportOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .updateMetadataImportOperationSettings(); - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public UnaryCallSettings exportMetadataSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataSettings(); - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public OperationCallSettings - exportMetadataOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataOperationSettings(); - } - - /** Returns the object with the settings used for calls to restoreService. */ - public UnaryCallSettings restoreServiceSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceSettings(); - } - - /** Returns the object with the settings used for calls to restoreService. */ - public OperationCallSettings - restoreServiceOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceOperationSettings(); - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).listBackupsSettings(); - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).getBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupSettings(); - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupSettings(); - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupOperationSettings(); - } - - /** Returns the object with the settings used for calls to removeIamPolicy. */ - public UnaryCallSettings - removeIamPolicySettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).removeIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to queryMetadata. */ - public UnaryCallSettings queryMetadataSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).queryMetadataSettings(); - } - - /** Returns the object with the settings used for calls to queryMetadata. */ - public OperationCallSettings - queryMetadataOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).queryMetadataOperationSettings(); - } - - /** Returns the object with the settings used for calls to moveTableToDatabase. */ - public UnaryCallSettings moveTableToDatabaseSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()).moveTableToDatabaseSettings(); - } - - /** Returns the object with the settings used for calls to moveTableToDatabase. */ - public OperationCallSettings< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .moveTableToDatabaseOperationSettings(); - } - - /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ - public UnaryCallSettings - alterMetadataResourceLocationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .alterMetadataResourceLocationSettings(); - } - - /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ - public OperationCallSettings< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings() { - return ((DataprocMetastoreStubSettings) getStubSettings()) - .alterMetadataResourceLocationOperationSettings(); - } - - public static final DataprocMetastoreSettings create(DataprocMetastoreStubSettings stub) - throws IOException { - return new DataprocMetastoreSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return DataprocMetastoreStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return DataprocMetastoreStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DataprocMetastoreStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return DataprocMetastoreStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return DataprocMetastoreStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return DataprocMetastoreStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return DataprocMetastoreStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for DataprocMetastoreSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(DataprocMetastoreStubSettings.newBuilder(clientContext)); - } - - protected Builder(DataprocMetastoreSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(DataprocMetastoreStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(DataprocMetastoreStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(DataprocMetastoreStubSettings.newHttpJsonBuilder()); - } - - public DataprocMetastoreStubSettings.Builder getStubSettingsBuilder() { - return ((DataprocMetastoreStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listServices. */ - public PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings() { - return getStubSettingsBuilder().listServicesSettings(); - } - - /** Returns the builder for the settings used for calls to getService. */ - public UnaryCallSettings.Builder getServiceSettings() { - return getStubSettingsBuilder().getServiceSettings(); - } - - /** Returns the builder for the settings used for calls to createService. */ - public UnaryCallSettings.Builder createServiceSettings() { - return getStubSettingsBuilder().createServiceSettings(); - } - - /** Returns the builder for the settings used for calls to createService. */ - public OperationCallSettings.Builder - createServiceOperationSettings() { - return getStubSettingsBuilder().createServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateService. */ - public UnaryCallSettings.Builder updateServiceSettings() { - return getStubSettingsBuilder().updateServiceSettings(); - } - - /** Returns the builder for the settings used for calls to updateService. */ - public OperationCallSettings.Builder - updateServiceOperationSettings() { - return getStubSettingsBuilder().updateServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public UnaryCallSettings.Builder deleteServiceSettings() { - return getStubSettingsBuilder().deleteServiceSettings(); - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public OperationCallSettings.Builder - deleteServiceOperationSettings() { - return getStubSettingsBuilder().deleteServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listMetadataImports. */ - public PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return getStubSettingsBuilder().listMetadataImportsSettings(); - } - - /** Returns the builder for the settings used for calls to getMetadataImport. */ - public UnaryCallSettings.Builder - getMetadataImportSettings() { - return getStubSettingsBuilder().getMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public UnaryCallSettings.Builder - createMetadataImportSettings() { - return getStubSettingsBuilder().createMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings() { - return getStubSettingsBuilder().createMetadataImportOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings.Builder - updateMetadataImportSettings() { - return getStubSettingsBuilder().updateMetadataImportSettings(); - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings() { - return getStubSettingsBuilder().updateMetadataImportOperationSettings(); - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public UnaryCallSettings.Builder exportMetadataSettings() { - return getStubSettingsBuilder().exportMetadataSettings(); - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public OperationCallSettings.Builder - exportMetadataOperationSettings() { - return getStubSettingsBuilder().exportMetadataOperationSettings(); - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public UnaryCallSettings.Builder restoreServiceSettings() { - return getStubSettingsBuilder().restoreServiceSettings(); - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public OperationCallSettings.Builder - restoreServiceOperationSettings() { - return getStubSettingsBuilder().restoreServiceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return getStubSettingsBuilder().listBackupsSettings(); - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getStubSettingsBuilder().getBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return getStubSettingsBuilder().createBackupSettings(); - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public OperationCallSettings.Builder - createBackupOperationSettings() { - return getStubSettingsBuilder().createBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return getStubSettingsBuilder().deleteBackupSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return getStubSettingsBuilder().deleteBackupOperationSettings(); - } - - /** Returns the builder for the settings used for calls to removeIamPolicy. */ - public UnaryCallSettings.Builder - removeIamPolicySettings() { - return getStubSettingsBuilder().removeIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to queryMetadata. */ - public UnaryCallSettings.Builder queryMetadataSettings() { - return getStubSettingsBuilder().queryMetadataSettings(); - } - - /** Returns the builder for the settings used for calls to queryMetadata. */ - public OperationCallSettings.Builder< - QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> - queryMetadataOperationSettings() { - return getStubSettingsBuilder().queryMetadataOperationSettings(); - } - - /** Returns the builder for the settings used for calls to moveTableToDatabase. */ - public UnaryCallSettings.Builder - moveTableToDatabaseSettings() { - return getStubSettingsBuilder().moveTableToDatabaseSettings(); - } - - /** Returns the builder for the settings used for calls to moveTableToDatabase. */ - public OperationCallSettings.Builder< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings() { - return getStubSettingsBuilder().moveTableToDatabaseOperationSettings(); - } - - /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ - public UnaryCallSettings.Builder - alterMetadataResourceLocationSettings() { - return getStubSettingsBuilder().alterMetadataResourceLocationSettings(); - } - - /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ - public OperationCallSettings.Builder< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings() { - return getStubSettingsBuilder().alterMetadataResourceLocationOperationSettings(); - } - - @Override - public DataprocMetastoreSettings build() throws IOException { - return new DataprocMetastoreSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/gapic_metadata.json b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/gapic_metadata.json deleted file mode 100644 index 9a99c98e2b68..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/gapic_metadata.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.metastore.v1beta", - "libraryPackage": "com.google.cloud.metastore.v1beta", - "services": { - "DataprocMetastore": { - "clients": { - "grpc": { - "libraryClient": "DataprocMetastoreClient", - "rpcs": { - "AlterMetadataResourceLocation": { - "methods": ["alterMetadataResourceLocationAsync", "alterMetadataResourceLocationOperationCallable", "alterMetadataResourceLocationCallable"] - }, - "CreateBackup": { - "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] - }, - "CreateMetadataImport": { - "methods": ["createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportOperationCallable", "createMetadataImportCallable"] - }, - "CreateService": { - "methods": ["createServiceAsync", "createServiceAsync", "createServiceAsync", "createServiceOperationCallable", "createServiceCallable"] - }, - "DeleteBackup": { - "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] - }, - "DeleteService": { - "methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] - }, - "ExportMetadata": { - "methods": ["exportMetadataAsync", "exportMetadataOperationCallable", "exportMetadataCallable"] - }, - "GetBackup": { - "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] - }, - "GetMetadataImport": { - "methods": ["getMetadataImport", "getMetadataImport", "getMetadataImport", "getMetadataImportCallable"] - }, - "GetService": { - "methods": ["getService", "getService", "getService", "getServiceCallable"] - }, - "ListBackups": { - "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] - }, - "ListMetadataImports": { - "methods": ["listMetadataImports", "listMetadataImports", "listMetadataImports", "listMetadataImportsPagedCallable", "listMetadataImportsCallable"] - }, - "ListServices": { - "methods": ["listServices", "listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] - }, - "MoveTableToDatabase": { - "methods": ["moveTableToDatabaseAsync", "moveTableToDatabaseOperationCallable", "moveTableToDatabaseCallable"] - }, - "QueryMetadata": { - "methods": ["queryMetadataAsync", "queryMetadataOperationCallable", "queryMetadataCallable"] - }, - "RemoveIamPolicy": { - "methods": ["removeIamPolicy", "removeIamPolicyCallable"] - }, - "RestoreService": { - "methods": ["restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceOperationCallable", "restoreServiceCallable"] - }, - "UpdateMetadataImport": { - "methods": ["updateMetadataImportAsync", "updateMetadataImportAsync", "updateMetadataImportOperationCallable", "updateMetadataImportCallable"] - }, - "UpdateService": { - "methods": ["updateServiceAsync", "updateServiceAsync", "updateServiceOperationCallable", "updateServiceCallable"] - } - } - } - } - }, - "DataprocMetastoreFederation": { - "clients": { - "grpc": { - "libraryClient": "DataprocMetastoreFederationClient", - "rpcs": { - "CreateFederation": { - "methods": ["createFederationAsync", "createFederationAsync", "createFederationAsync", "createFederationOperationCallable", "createFederationCallable"] - }, - "DeleteFederation": { - "methods": ["deleteFederationAsync", "deleteFederationAsync", "deleteFederationAsync", "deleteFederationOperationCallable", "deleteFederationCallable"] - }, - "GetFederation": { - "methods": ["getFederation", "getFederation", "getFederation", "getFederationCallable"] - }, - "ListFederations": { - "methods": ["listFederations", "listFederations", "listFederations", "listFederationsPagedCallable", "listFederationsCallable"] - }, - "UpdateFederation": { - "methods": ["updateFederationAsync", "updateFederationAsync", "updateFederationOperationCallable", "updateFederationCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStub.java deleted file mode 100644 index 8fbe1be362b5..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStub.java +++ /dev/null @@ -1,98 +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.v1beta.stub; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1beta.CreateFederationRequest; -import com.google.cloud.metastore.v1beta.DeleteFederationRequest; -import com.google.cloud.metastore.v1beta.Federation; -import com.google.cloud.metastore.v1beta.GetFederationRequest; -import com.google.cloud.metastore.v1beta.ListFederationsRequest; -import com.google.cloud.metastore.v1beta.ListFederationsResponse; -import com.google.cloud.metastore.v1beta.OperationMetadata; -import com.google.cloud.metastore.v1beta.UpdateFederationRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the DataprocMetastoreFederation service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@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 - listFederationsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listFederationsPagedCallable()"); - } - - public UnaryCallable listFederationsCallable() { - throw new UnsupportedOperationException("Not implemented: listFederationsCallable()"); - } - - public UnaryCallable getFederationCallable() { - throw new UnsupportedOperationException("Not implemented: getFederationCallable()"); - } - - public OperationCallable - createFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createFederationOperationCallable()"); - } - - public UnaryCallable createFederationCallable() { - throw new UnsupportedOperationException("Not implemented: createFederationCallable()"); - } - - public OperationCallable - updateFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateFederationOperationCallable()"); - } - - public UnaryCallable updateFederationCallable() { - throw new UnsupportedOperationException("Not implemented: updateFederationCallable()"); - } - - public OperationCallable - deleteFederationOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFederationOperationCallable()"); - } - - public UnaryCallable deleteFederationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFederationCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStubSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStubSettings.java deleted file mode 100644 index bec9d3b11875..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStubSettings.java +++ /dev/null @@ -1,636 +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.v1beta.stub; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1beta.CreateFederationRequest; -import com.google.cloud.metastore.v1beta.DeleteFederationRequest; -import com.google.cloud.metastore.v1beta.Federation; -import com.google.cloud.metastore.v1beta.GetFederationRequest; -import com.google.cloud.metastore.v1beta.ListFederationsRequest; -import com.google.cloud.metastore.v1beta.ListFederationsResponse; -import com.google.cloud.metastore.v1beta.OperationMetadata; -import com.google.cloud.metastore.v1beta.UpdateFederationRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreFederationStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require 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();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationStubSettings - extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings; - private final UnaryCallSettings getFederationSettings; - private final UnaryCallSettings createFederationSettings; - private final OperationCallSettings - createFederationOperationSettings; - private final UnaryCallSettings updateFederationSettings; - private final OperationCallSettings - updateFederationOperationSettings; - private final UnaryCallSettings deleteFederationSettings; - private final OperationCallSettings - deleteFederationOperationSettings; - - private static final PagedListDescriptor< - ListFederationsRequest, ListFederationsResponse, Federation> - LIST_FEDERATIONS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListFederationsRequest injectToken( - ListFederationsRequest payload, String token) { - return ListFederationsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListFederationsRequest injectPageSize( - ListFederationsRequest payload, int pageSize) { - return ListFederationsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListFederationsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListFederationsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListFederationsResponse payload) { - return payload.getFederationsList() == null - ? ImmutableList.of() - : payload.getFederationsList(); - } - }; - - private static final PagedListResponseFactory< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - LIST_FEDERATIONS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListFederationsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_FEDERATIONS_PAGE_STR_DESC, request, context); - return ListFederationsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listFederations. */ - public PagedCallSettings< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return listFederationsSettings; - } - - /** Returns the object with the settings used for calls to getFederation. */ - public UnaryCallSettings getFederationSettings() { - return getFederationSettings; - } - - /** Returns the object with the settings used for calls to createFederation. */ - public UnaryCallSettings createFederationSettings() { - return createFederationSettings; - } - - /** Returns the object with the settings used for calls to createFederation. */ - public OperationCallSettings - createFederationOperationSettings() { - return createFederationOperationSettings; - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public UnaryCallSettings updateFederationSettings() { - return updateFederationSettings; - } - - /** Returns the object with the settings used for calls to updateFederation. */ - public OperationCallSettings - updateFederationOperationSettings() { - return updateFederationOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public UnaryCallSettings deleteFederationSettings() { - return deleteFederationSettings; - } - - /** Returns the object with the settings used for calls to deleteFederation. */ - public OperationCallSettings - deleteFederationOperationSettings() { - return deleteFederationOperationSettings; - } - - public DataprocMetastoreFederationStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcDataprocMetastoreFederationStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonDataprocMetastoreFederationStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "metastore.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "metastore.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreFederationStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreFederationStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listFederationsSettings = settingsBuilder.listFederationsSettings().build(); - getFederationSettings = settingsBuilder.getFederationSettings().build(); - createFederationSettings = settingsBuilder.createFederationSettings().build(); - createFederationOperationSettings = settingsBuilder.createFederationOperationSettings().build(); - updateFederationSettings = settingsBuilder.updateFederationSettings().build(); - updateFederationOperationSettings = settingsBuilder.updateFederationOperationSettings().build(); - deleteFederationSettings = settingsBuilder.deleteFederationSettings().build(); - deleteFederationOperationSettings = settingsBuilder.deleteFederationOperationSettings().build(); - } - - /** Builder for DataprocMetastoreFederationStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings; - private final UnaryCallSettings.Builder getFederationSettings; - private final UnaryCallSettings.Builder - createFederationSettings; - private final OperationCallSettings.Builder< - CreateFederationRequest, Federation, OperationMetadata> - createFederationOperationSettings; - private final UnaryCallSettings.Builder - updateFederationSettings; - private final OperationCallSettings.Builder< - UpdateFederationRequest, Federation, OperationMetadata> - updateFederationOperationSettings; - private final UnaryCallSettings.Builder - deleteFederationSettings; - private final OperationCallSettings.Builder - deleteFederationOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listFederationsSettings = PagedCallSettings.newBuilder(LIST_FEDERATIONS_PAGE_STR_FACT); - getFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFederationOperationSettings = OperationCallSettings.newBuilder(); - updateFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateFederationOperationSettings = OperationCallSettings.newBuilder(); - deleteFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteFederationOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listFederationsSettings, - getFederationSettings, - createFederationSettings, - updateFederationSettings, - deleteFederationSettings); - initDefaults(this); - } - - protected Builder(DataprocMetastoreFederationStubSettings settings) { - super(settings); - - listFederationsSettings = settings.listFederationsSettings.toBuilder(); - getFederationSettings = settings.getFederationSettings.toBuilder(); - createFederationSettings = settings.createFederationSettings.toBuilder(); - createFederationOperationSettings = settings.createFederationOperationSettings.toBuilder(); - updateFederationSettings = settings.updateFederationSettings.toBuilder(); - updateFederationOperationSettings = settings.updateFederationOperationSettings.toBuilder(); - deleteFederationSettings = settings.deleteFederationSettings.toBuilder(); - deleteFederationOperationSettings = settings.deleteFederationOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listFederationsSettings, - getFederationSettings, - createFederationSettings, - updateFederationSettings, - deleteFederationSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listFederationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteFederationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .updateFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .deleteFederationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listFederations. */ - public PagedCallSettings.Builder< - ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> - listFederationsSettings() { - return listFederationsSettings; - } - - /** Returns the builder for the settings used for calls to getFederation. */ - public UnaryCallSettings.Builder getFederationSettings() { - return getFederationSettings; - } - - /** Returns the builder for the settings used for calls to createFederation. */ - public UnaryCallSettings.Builder - createFederationSettings() { - return createFederationSettings; - } - - /** Returns the builder for the settings used for calls to createFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createFederationOperationSettings() { - return createFederationOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - public UnaryCallSettings.Builder - updateFederationSettings() { - return updateFederationSettings; - } - - /** Returns the builder for the settings used for calls to updateFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateFederationOperationSettings() { - return updateFederationOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - public UnaryCallSettings.Builder - deleteFederationSettings() { - return deleteFederationSettings; - } - - /** Returns the builder for the settings used for calls to deleteFederation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteFederationOperationSettings() { - return deleteFederationOperationSettings; - } - - @Override - public DataprocMetastoreFederationStubSettings build() throws IOException { - return new DataprocMetastoreFederationStubSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStub.java deleted file mode 100644 index c034d5167a90..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStub.java +++ /dev/null @@ -1,244 +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.v1beta.stub; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest; -import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse; -import com.google.cloud.metastore.v1beta.Backup; -import com.google.cloud.metastore.v1beta.CreateBackupRequest; -import com.google.cloud.metastore.v1beta.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1beta.CreateServiceRequest; -import com.google.cloud.metastore.v1beta.DeleteBackupRequest; -import com.google.cloud.metastore.v1beta.DeleteServiceRequest; -import com.google.cloud.metastore.v1beta.ExportMetadataRequest; -import com.google.cloud.metastore.v1beta.GetBackupRequest; -import com.google.cloud.metastore.v1beta.GetMetadataImportRequest; -import com.google.cloud.metastore.v1beta.GetServiceRequest; -import com.google.cloud.metastore.v1beta.ListBackupsRequest; -import com.google.cloud.metastore.v1beta.ListBackupsResponse; -import com.google.cloud.metastore.v1beta.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1beta.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1beta.ListServicesRequest; -import com.google.cloud.metastore.v1beta.ListServicesResponse; -import com.google.cloud.metastore.v1beta.MetadataExport; -import com.google.cloud.metastore.v1beta.MetadataImport; -import com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest; -import com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse; -import com.google.cloud.metastore.v1beta.OperationMetadata; -import com.google.cloud.metastore.v1beta.QueryMetadataRequest; -import com.google.cloud.metastore.v1beta.QueryMetadataResponse; -import com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest; -import com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse; -import com.google.cloud.metastore.v1beta.Restore; -import com.google.cloud.metastore.v1beta.RestoreServiceRequest; -import com.google.cloud.metastore.v1beta.Service; -import com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1beta.UpdateServiceRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class DataprocMetastoreStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable listServicesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); - } - - public UnaryCallable listServicesCallable() { - throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); - } - - public UnaryCallable getServiceCallable() { - throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); - } - - public OperationCallable - createServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createServiceOperationCallable()"); - } - - public UnaryCallable createServiceCallable() { - throw new UnsupportedOperationException("Not implemented: createServiceCallable()"); - } - - public OperationCallable - updateServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateServiceOperationCallable()"); - } - - public UnaryCallable updateServiceCallable() { - throw new UnsupportedOperationException("Not implemented: updateServiceCallable()"); - } - - public OperationCallable - deleteServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); - } - - public UnaryCallable deleteServiceCallable() { - throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); - } - - public UnaryCallable - listMetadataImportsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listMetadataImportsPagedCallable()"); - } - - public UnaryCallable - listMetadataImportsCallable() { - throw new UnsupportedOperationException("Not implemented: listMetadataImportsCallable()"); - } - - public UnaryCallable getMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: getMetadataImportCallable()"); - } - - public OperationCallable - createMetadataImportOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: createMetadataImportOperationCallable()"); - } - - public UnaryCallable createMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: createMetadataImportCallable()"); - } - - public OperationCallable - updateMetadataImportOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: updateMetadataImportOperationCallable()"); - } - - public UnaryCallable updateMetadataImportCallable() { - throw new UnsupportedOperationException("Not implemented: updateMetadataImportCallable()"); - } - - public OperationCallable - exportMetadataOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportMetadataOperationCallable()"); - } - - public UnaryCallable exportMetadataCallable() { - throw new UnsupportedOperationException("Not implemented: exportMetadataCallable()"); - } - - public OperationCallable - restoreServiceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: restoreServiceOperationCallable()"); - } - - public UnaryCallable restoreServiceCallable() { - throw new UnsupportedOperationException("Not implemented: restoreServiceCallable()"); - } - - public UnaryCallable listBackupsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); - } - - public UnaryCallable listBackupsCallable() { - throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); - } - - public UnaryCallable getBackupCallable() { - throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); - } - - public OperationCallable - createBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); - } - - public UnaryCallable createBackupCallable() { - throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); - } - - public OperationCallable - deleteBackupOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); - } - - public UnaryCallable deleteBackupCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); - } - - public UnaryCallable removeIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: removeIamPolicyCallable()"); - } - - public OperationCallable - queryMetadataOperationCallable() { - throw new UnsupportedOperationException("Not implemented: queryMetadataOperationCallable()"); - } - - public UnaryCallable queryMetadataCallable() { - throw new UnsupportedOperationException("Not implemented: queryMetadataCallable()"); - } - - public OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: moveTableToDatabaseOperationCallable()"); - } - - public UnaryCallable moveTableToDatabaseCallable() { - throw new UnsupportedOperationException("Not implemented: moveTableToDatabaseCallable()"); - } - - public OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: alterMetadataResourceLocationOperationCallable()"); - } - - public UnaryCallable - alterMetadataResourceLocationCallable() { - throw new UnsupportedOperationException( - "Not implemented: alterMetadataResourceLocationCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStubSettings.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStubSettings.java deleted file mode 100644 index 1425d0a7387c..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStubSettings.java +++ /dev/null @@ -1,1576 +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.v1beta.stub; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest; -import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse; -import com.google.cloud.metastore.v1beta.Backup; -import com.google.cloud.metastore.v1beta.CreateBackupRequest; -import com.google.cloud.metastore.v1beta.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1beta.CreateServiceRequest; -import com.google.cloud.metastore.v1beta.DeleteBackupRequest; -import com.google.cloud.metastore.v1beta.DeleteServiceRequest; -import com.google.cloud.metastore.v1beta.ExportMetadataRequest; -import com.google.cloud.metastore.v1beta.GetBackupRequest; -import com.google.cloud.metastore.v1beta.GetMetadataImportRequest; -import com.google.cloud.metastore.v1beta.GetServiceRequest; -import com.google.cloud.metastore.v1beta.ListBackupsRequest; -import com.google.cloud.metastore.v1beta.ListBackupsResponse; -import com.google.cloud.metastore.v1beta.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1beta.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1beta.ListServicesRequest; -import com.google.cloud.metastore.v1beta.ListServicesResponse; -import com.google.cloud.metastore.v1beta.MetadataExport; -import com.google.cloud.metastore.v1beta.MetadataImport; -import com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest; -import com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse; -import com.google.cloud.metastore.v1beta.OperationMetadata; -import com.google.cloud.metastore.v1beta.QueryMetadataRequest; -import com.google.cloud.metastore.v1beta.QueryMetadataResponse; -import com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest; -import com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse; -import com.google.cloud.metastore.v1beta.Restore; -import com.google.cloud.metastore.v1beta.RestoreServiceRequest; -import com.google.cloud.metastore.v1beta.Service; -import com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1beta.UpdateServiceRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DataprocMetastoreStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (metastore.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

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: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataprocMetastoreStubSettings.Builder dataprocMetastoreSettingsBuilder =
- *     DataprocMetastoreStubSettings.newBuilder();
- * dataprocMetastoreSettingsBuilder
- *     .getServiceSettings()
- *     .setRetrySettings(
- *         dataprocMetastoreSettingsBuilder
- *             .getServiceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * DataprocMetastoreStubSettings dataprocMetastoreSettings =
- *     dataprocMetastoreSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataprocMetastoreStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings; - private final UnaryCallSettings getServiceSettings; - private final UnaryCallSettings createServiceSettings; - private final OperationCallSettings - createServiceOperationSettings; - private final UnaryCallSettings updateServiceSettings; - private final OperationCallSettings - updateServiceOperationSettings; - private final UnaryCallSettings deleteServiceSettings; - private final OperationCallSettings - deleteServiceOperationSettings; - private final PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings; - private final UnaryCallSettings - getMetadataImportSettings; - private final UnaryCallSettings - createMetadataImportSettings; - private final OperationCallSettings< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings; - private final UnaryCallSettings - updateMetadataImportSettings; - private final OperationCallSettings< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings; - private final UnaryCallSettings exportMetadataSettings; - private final OperationCallSettings - exportMetadataOperationSettings; - private final UnaryCallSettings restoreServiceSettings; - private final OperationCallSettings - restoreServiceOperationSettings; - private final PagedCallSettings - listBackupsSettings; - private final UnaryCallSettings getBackupSettings; - private final UnaryCallSettings createBackupSettings; - private final OperationCallSettings - createBackupOperationSettings; - private final UnaryCallSettings deleteBackupSettings; - private final OperationCallSettings - deleteBackupOperationSettings; - private final UnaryCallSettings - removeIamPolicySettings; - private final UnaryCallSettings queryMetadataSettings; - private final OperationCallSettings< - QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> - queryMetadataOperationSettings; - private final UnaryCallSettings - moveTableToDatabaseSettings; - private final OperationCallSettings< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings; - private final UnaryCallSettings - alterMetadataResourceLocationSettings; - private final OperationCallSettings< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings; - - private static final PagedListDescriptor - LIST_SERVICES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListServicesRequest injectToken(ListServicesRequest payload, String token) { - return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { - return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListServicesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListServicesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListServicesResponse payload) { - return payload.getServicesList() == null - ? ImmutableList.of() - : payload.getServicesList(); - } - }; - - private static final PagedListDescriptor< - ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport> - LIST_METADATA_IMPORTS_PAGE_STR_DESC = - new PagedListDescriptor< - ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListMetadataImportsRequest injectToken( - ListMetadataImportsRequest payload, String token) { - return ListMetadataImportsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListMetadataImportsRequest injectPageSize( - ListMetadataImportsRequest payload, int pageSize) { - return ListMetadataImportsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListMetadataImportsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListMetadataImportsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListMetadataImportsResponse payload) { - return payload.getMetadataImportsList() == null - ? ImmutableList.of() - : payload.getMetadataImportsList(); - } - }; - - private static final PagedListDescriptor - LIST_BACKUPS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { - return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { - return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListBackupsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListBackupsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListBackupsResponse payload) { - return payload.getBackupsList() == null - ? ImmutableList.of() - : payload.getBackupsList(); - } - }; - - private static final PagedListResponseFactory< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - LIST_SERVICES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListServicesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); - return ListServicesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - LIST_METADATA_IMPORTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListMetadataImportsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_METADATA_IMPORTS_PAGE_STR_DESC, request, context); - return ListMetadataImportsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - LIST_BACKUPS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListBackupsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); - return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listServices. */ - public PagedCallSettings - listServicesSettings() { - return listServicesSettings; - } - - /** Returns the object with the settings used for calls to getService. */ - public UnaryCallSettings getServiceSettings() { - return getServiceSettings; - } - - /** Returns the object with the settings used for calls to createService. */ - public UnaryCallSettings createServiceSettings() { - return createServiceSettings; - } - - /** Returns the object with the settings used for calls to createService. */ - public OperationCallSettings - createServiceOperationSettings() { - return createServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to updateService. */ - public UnaryCallSettings updateServiceSettings() { - return updateServiceSettings; - } - - /** Returns the object with the settings used for calls to updateService. */ - public OperationCallSettings - updateServiceOperationSettings() { - return updateServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteService. */ - public UnaryCallSettings deleteServiceSettings() { - return deleteServiceSettings; - } - - /** Returns the object with the settings used for calls to deleteService. */ - public OperationCallSettings - deleteServiceOperationSettings() { - return deleteServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to listMetadataImports. */ - public PagedCallSettings< - ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return listMetadataImportsSettings; - } - - /** Returns the object with the settings used for calls to getMetadataImport. */ - public UnaryCallSettings getMetadataImportSettings() { - return getMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public UnaryCallSettings createMetadataImportSettings() { - return createMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to createMetadataImport. */ - public OperationCallSettings - createMetadataImportOperationSettings() { - return createMetadataImportOperationSettings; - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings updateMetadataImportSettings() { - return updateMetadataImportSettings; - } - - /** Returns the object with the settings used for calls to updateMetadataImport. */ - public OperationCallSettings - updateMetadataImportOperationSettings() { - return updateMetadataImportOperationSettings; - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public UnaryCallSettings exportMetadataSettings() { - return exportMetadataSettings; - } - - /** Returns the object with the settings used for calls to exportMetadata. */ - public OperationCallSettings - exportMetadataOperationSettings() { - return exportMetadataOperationSettings; - } - - /** Returns the object with the settings used for calls to restoreService. */ - public UnaryCallSettings restoreServiceSettings() { - return restoreServiceSettings; - } - - /** Returns the object with the settings used for calls to restoreService. */ - public OperationCallSettings - restoreServiceOperationSettings() { - return restoreServiceOperationSettings; - } - - /** Returns the object with the settings used for calls to listBackups. */ - public PagedCallSettings - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the object with the settings used for calls to getBackup. */ - public UnaryCallSettings getBackupSettings() { - return getBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public UnaryCallSettings createBackupSettings() { - return createBackupSettings; - } - - /** Returns the object with the settings used for calls to createBackup. */ - public OperationCallSettings - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public UnaryCallSettings deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the object with the settings used for calls to deleteBackup. */ - public OperationCallSettings - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - /** Returns the object with the settings used for calls to removeIamPolicy. */ - public UnaryCallSettings - removeIamPolicySettings() { - return removeIamPolicySettings; - } - - /** Returns the object with the settings used for calls to queryMetadata. */ - public UnaryCallSettings queryMetadataSettings() { - return queryMetadataSettings; - } - - /** Returns the object with the settings used for calls to queryMetadata. */ - public OperationCallSettings - queryMetadataOperationSettings() { - return queryMetadataOperationSettings; - } - - /** Returns the object with the settings used for calls to moveTableToDatabase. */ - public UnaryCallSettings moveTableToDatabaseSettings() { - return moveTableToDatabaseSettings; - } - - /** Returns the object with the settings used for calls to moveTableToDatabase. */ - public OperationCallSettings< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings() { - return moveTableToDatabaseOperationSettings; - } - - /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ - public UnaryCallSettings - alterMetadataResourceLocationSettings() { - return alterMetadataResourceLocationSettings; - } - - /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ - public OperationCallSettings< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings() { - return alterMetadataResourceLocationOperationSettings; - } - - public DataprocMetastoreStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcDataprocMetastoreStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonDataprocMetastoreStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "metastore.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "metastore.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DataprocMetastoreStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DataprocMetastoreStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listServicesSettings = settingsBuilder.listServicesSettings().build(); - getServiceSettings = settingsBuilder.getServiceSettings().build(); - createServiceSettings = settingsBuilder.createServiceSettings().build(); - createServiceOperationSettings = settingsBuilder.createServiceOperationSettings().build(); - updateServiceSettings = settingsBuilder.updateServiceSettings().build(); - updateServiceOperationSettings = settingsBuilder.updateServiceOperationSettings().build(); - deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); - deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); - listMetadataImportsSettings = settingsBuilder.listMetadataImportsSettings().build(); - getMetadataImportSettings = settingsBuilder.getMetadataImportSettings().build(); - createMetadataImportSettings = settingsBuilder.createMetadataImportSettings().build(); - createMetadataImportOperationSettings = - settingsBuilder.createMetadataImportOperationSettings().build(); - updateMetadataImportSettings = settingsBuilder.updateMetadataImportSettings().build(); - updateMetadataImportOperationSettings = - settingsBuilder.updateMetadataImportOperationSettings().build(); - exportMetadataSettings = settingsBuilder.exportMetadataSettings().build(); - exportMetadataOperationSettings = settingsBuilder.exportMetadataOperationSettings().build(); - restoreServiceSettings = settingsBuilder.restoreServiceSettings().build(); - restoreServiceOperationSettings = settingsBuilder.restoreServiceOperationSettings().build(); - listBackupsSettings = settingsBuilder.listBackupsSettings().build(); - getBackupSettings = settingsBuilder.getBackupSettings().build(); - createBackupSettings = settingsBuilder.createBackupSettings().build(); - createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); - deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); - deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); - removeIamPolicySettings = settingsBuilder.removeIamPolicySettings().build(); - queryMetadataSettings = settingsBuilder.queryMetadataSettings().build(); - queryMetadataOperationSettings = settingsBuilder.queryMetadataOperationSettings().build(); - moveTableToDatabaseSettings = settingsBuilder.moveTableToDatabaseSettings().build(); - moveTableToDatabaseOperationSettings = - settingsBuilder.moveTableToDatabaseOperationSettings().build(); - alterMetadataResourceLocationSettings = - settingsBuilder.alterMetadataResourceLocationSettings().build(); - alterMetadataResourceLocationOperationSettings = - settingsBuilder.alterMetadataResourceLocationOperationSettings().build(); - } - - /** Builder for DataprocMetastoreStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings; - private final UnaryCallSettings.Builder getServiceSettings; - private final UnaryCallSettings.Builder createServiceSettings; - private final OperationCallSettings.Builder - createServiceOperationSettings; - private final UnaryCallSettings.Builder updateServiceSettings; - private final OperationCallSettings.Builder - updateServiceOperationSettings; - private final UnaryCallSettings.Builder deleteServiceSettings; - private final OperationCallSettings.Builder - deleteServiceOperationSettings; - private final PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings; - private final UnaryCallSettings.Builder - getMetadataImportSettings; - private final UnaryCallSettings.Builder - createMetadataImportSettings; - private final OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings; - private final UnaryCallSettings.Builder - updateMetadataImportSettings; - private final OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings; - private final UnaryCallSettings.Builder - exportMetadataSettings; - private final OperationCallSettings.Builder< - ExportMetadataRequest, MetadataExport, OperationMetadata> - exportMetadataOperationSettings; - private final UnaryCallSettings.Builder - restoreServiceSettings; - private final OperationCallSettings.Builder - restoreServiceOperationSettings; - private final PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings; - private final UnaryCallSettings.Builder getBackupSettings; - private final UnaryCallSettings.Builder createBackupSettings; - private final OperationCallSettings.Builder - createBackupOperationSettings; - private final UnaryCallSettings.Builder deleteBackupSettings; - private final OperationCallSettings.Builder - deleteBackupOperationSettings; - private final UnaryCallSettings.Builder - removeIamPolicySettings; - private final UnaryCallSettings.Builder queryMetadataSettings; - private final OperationCallSettings.Builder< - QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> - queryMetadataOperationSettings; - private final UnaryCallSettings.Builder - moveTableToDatabaseSettings; - private final OperationCallSettings.Builder< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings; - private final UnaryCallSettings.Builder - alterMetadataResourceLocationSettings; - private final OperationCallSettings.Builder< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); - getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createServiceOperationSettings = OperationCallSettings.newBuilder(); - updateServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateServiceOperationSettings = OperationCallSettings.newBuilder(); - deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteServiceOperationSettings = OperationCallSettings.newBuilder(); - listMetadataImportsSettings = - PagedCallSettings.newBuilder(LIST_METADATA_IMPORTS_PAGE_STR_FACT); - getMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createMetadataImportOperationSettings = OperationCallSettings.newBuilder(); - updateMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateMetadataImportOperationSettings = OperationCallSettings.newBuilder(); - exportMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - exportMetadataOperationSettings = OperationCallSettings.newBuilder(); - restoreServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - restoreServiceOperationSettings = OperationCallSettings.newBuilder(); - listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); - getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBackupOperationSettings = OperationCallSettings.newBuilder(); - deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteBackupOperationSettings = OperationCallSettings.newBuilder(); - removeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - queryMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - queryMetadataOperationSettings = OperationCallSettings.newBuilder(); - moveTableToDatabaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - moveTableToDatabaseOperationSettings = OperationCallSettings.newBuilder(); - alterMetadataResourceLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - alterMetadataResourceLocationOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listServicesSettings, - getServiceSettings, - createServiceSettings, - updateServiceSettings, - deleteServiceSettings, - listMetadataImportsSettings, - getMetadataImportSettings, - createMetadataImportSettings, - updateMetadataImportSettings, - exportMetadataSettings, - restoreServiceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings, - removeIamPolicySettings, - queryMetadataSettings, - moveTableToDatabaseSettings, - alterMetadataResourceLocationSettings); - initDefaults(this); - } - - protected Builder(DataprocMetastoreStubSettings settings) { - super(settings); - - listServicesSettings = settings.listServicesSettings.toBuilder(); - getServiceSettings = settings.getServiceSettings.toBuilder(); - createServiceSettings = settings.createServiceSettings.toBuilder(); - createServiceOperationSettings = settings.createServiceOperationSettings.toBuilder(); - updateServiceSettings = settings.updateServiceSettings.toBuilder(); - updateServiceOperationSettings = settings.updateServiceOperationSettings.toBuilder(); - deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); - deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); - listMetadataImportsSettings = settings.listMetadataImportsSettings.toBuilder(); - getMetadataImportSettings = settings.getMetadataImportSettings.toBuilder(); - createMetadataImportSettings = settings.createMetadataImportSettings.toBuilder(); - createMetadataImportOperationSettings = - settings.createMetadataImportOperationSettings.toBuilder(); - updateMetadataImportSettings = settings.updateMetadataImportSettings.toBuilder(); - updateMetadataImportOperationSettings = - settings.updateMetadataImportOperationSettings.toBuilder(); - exportMetadataSettings = settings.exportMetadataSettings.toBuilder(); - exportMetadataOperationSettings = settings.exportMetadataOperationSettings.toBuilder(); - restoreServiceSettings = settings.restoreServiceSettings.toBuilder(); - restoreServiceOperationSettings = settings.restoreServiceOperationSettings.toBuilder(); - listBackupsSettings = settings.listBackupsSettings.toBuilder(); - getBackupSettings = settings.getBackupSettings.toBuilder(); - createBackupSettings = settings.createBackupSettings.toBuilder(); - createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); - deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); - deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); - removeIamPolicySettings = settings.removeIamPolicySettings.toBuilder(); - queryMetadataSettings = settings.queryMetadataSettings.toBuilder(); - queryMetadataOperationSettings = settings.queryMetadataOperationSettings.toBuilder(); - moveTableToDatabaseSettings = settings.moveTableToDatabaseSettings.toBuilder(); - moveTableToDatabaseOperationSettings = - settings.moveTableToDatabaseOperationSettings.toBuilder(); - alterMetadataResourceLocationSettings = - settings.alterMetadataResourceLocationSettings.toBuilder(); - alterMetadataResourceLocationOperationSettings = - settings.alterMetadataResourceLocationOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listServicesSettings, - getServiceSettings, - createServiceSettings, - updateServiceSettings, - deleteServiceSettings, - listMetadataImportsSettings, - getMetadataImportSettings, - createMetadataImportSettings, - updateMetadataImportSettings, - exportMetadataSettings, - restoreServiceSettings, - listBackupsSettings, - getBackupSettings, - createBackupSettings, - deleteBackupSettings, - removeIamPolicySettings, - queryMetadataSettings, - moveTableToDatabaseSettings, - alterMetadataResourceLocationSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listServicesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listMetadataImportsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateMetadataImportSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .exportMetadataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .restoreServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listBackupsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteBackupSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .removeIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .queryMetadataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .moveTableToDatabaseSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .alterMetadataResourceLocationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Service.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .updateServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Service.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(3000000L)) - .build())); - - builder - .deleteServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1500000L)) - .build())); - - builder - .createMetadataImportOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .updateMetadataImportOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1200000L)) - .build())); - - builder - .exportMetadataOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(MetadataExport.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .restoreServiceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Restore.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .createBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(120000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(4800000L)) - .build())); - - builder - .deleteBackupOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(1500000L)) - .build())); - - builder - .queryMetadataOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(QueryMetadataResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .moveTableToDatabaseOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - MoveTableToDatabaseResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .alterMetadataResourceLocationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - . - newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AlterMetadataResourceLocationResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listServices. */ - public PagedCallSettings.Builder< - ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> - listServicesSettings() { - return listServicesSettings; - } - - /** Returns the builder for the settings used for calls to getService. */ - public UnaryCallSettings.Builder getServiceSettings() { - return getServiceSettings; - } - - /** Returns the builder for the settings used for calls to createService. */ - public UnaryCallSettings.Builder createServiceSettings() { - return createServiceSettings; - } - - /** Returns the builder for the settings used for calls to createService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createServiceOperationSettings() { - return createServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateService. */ - public UnaryCallSettings.Builder updateServiceSettings() { - return updateServiceSettings; - } - - /** Returns the builder for the settings used for calls to updateService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateServiceOperationSettings() { - return updateServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteService. */ - public UnaryCallSettings.Builder deleteServiceSettings() { - return deleteServiceSettings; - } - - /** Returns the builder for the settings used for calls to deleteService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteServiceOperationSettings() { - return deleteServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to listMetadataImports. */ - public PagedCallSettings.Builder< - ListMetadataImportsRequest, - ListMetadataImportsResponse, - ListMetadataImportsPagedResponse> - listMetadataImportsSettings() { - return listMetadataImportsSettings; - } - - /** Returns the builder for the settings used for calls to getMetadataImport. */ - public UnaryCallSettings.Builder - getMetadataImportSettings() { - return getMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - public UnaryCallSettings.Builder - createMetadataImportSettings() { - return createMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to createMetadataImport. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - CreateMetadataImportRequest, MetadataImport, OperationMetadata> - createMetadataImportOperationSettings() { - return createMetadataImportOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - public UnaryCallSettings.Builder - updateMetadataImportSettings() { - return updateMetadataImportSettings; - } - - /** Returns the builder for the settings used for calls to updateMetadataImport. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - UpdateMetadataImportRequest, MetadataImport, OperationMetadata> - updateMetadataImportOperationSettings() { - return updateMetadataImportOperationSettings; - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - public UnaryCallSettings.Builder exportMetadataSettings() { - return exportMetadataSettings; - } - - /** Returns the builder for the settings used for calls to exportMetadata. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportMetadataOperationSettings() { - return exportMetadataOperationSettings; - } - - /** Returns the builder for the settings used for calls to restoreService. */ - public UnaryCallSettings.Builder restoreServiceSettings() { - return restoreServiceSettings; - } - - /** Returns the builder for the settings used for calls to restoreService. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - restoreServiceOperationSettings() { - return restoreServiceOperationSettings; - } - - /** Returns the builder for the settings used for calls to listBackups. */ - public PagedCallSettings.Builder< - ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> - listBackupsSettings() { - return listBackupsSettings; - } - - /** Returns the builder for the settings used for calls to getBackup. */ - public UnaryCallSettings.Builder getBackupSettings() { - return getBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - public UnaryCallSettings.Builder createBackupSettings() { - return createBackupSettings; - } - - /** Returns the builder for the settings used for calls to createBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createBackupOperationSettings() { - return createBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - public UnaryCallSettings.Builder deleteBackupSettings() { - return deleteBackupSettings; - } - - /** Returns the builder for the settings used for calls to deleteBackup. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteBackupOperationSettings() { - return deleteBackupOperationSettings; - } - - /** Returns the builder for the settings used for calls to removeIamPolicy. */ - public UnaryCallSettings.Builder - removeIamPolicySettings() { - return removeIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to queryMetadata. */ - public UnaryCallSettings.Builder queryMetadataSettings() { - return queryMetadataSettings; - } - - /** Returns the builder for the settings used for calls to queryMetadata. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> - queryMetadataOperationSettings() { - return queryMetadataOperationSettings; - } - - /** Returns the builder for the settings used for calls to moveTableToDatabase. */ - public UnaryCallSettings.Builder - moveTableToDatabaseSettings() { - return moveTableToDatabaseSettings; - } - - /** Returns the builder for the settings used for calls to moveTableToDatabase. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationSettings() { - return moveTableToDatabaseOperationSettings; - } - - /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ - public UnaryCallSettings.Builder - alterMetadataResourceLocationSettings() { - return alterMetadataResourceLocationSettings; - } - - /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationSettings() { - return alterMetadataResourceLocationOperationSettings; - } - - @Override - public DataprocMetastoreStubSettings build() throws IOException { - return new DataprocMetastoreStubSettings(this); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationStub.java deleted file mode 100644 index 3a90e68a8ed5..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationStub.java +++ /dev/null @@ -1,355 +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.v1beta.stub; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1beta.CreateFederationRequest; -import com.google.cloud.metastore.v1beta.DeleteFederationRequest; -import com.google.cloud.metastore.v1beta.Federation; -import com.google.cloud.metastore.v1beta.GetFederationRequest; -import com.google.cloud.metastore.v1beta.ListFederationsRequest; -import com.google.cloud.metastore.v1beta.ListFederationsResponse; -import com.google.cloud.metastore.v1beta.OperationMetadata; -import com.google.cloud.metastore.v1beta.UpdateFederationRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the DataprocMetastoreFederation service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { - private static final MethodDescriptor - listFederationsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/ListFederations") - .setRequestMarshaller( - ProtoUtils.marshaller(ListFederationsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListFederationsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/GetFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(GetFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Federation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/CreateFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/UpdateFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteFederationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/DeleteFederation") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteFederationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable - listFederationsCallable; - private final UnaryCallable - listFederationsPagedCallable; - private final UnaryCallable getFederationCallable; - private final UnaryCallable createFederationCallable; - private final OperationCallable - createFederationOperationCallable; - private final UnaryCallable updateFederationCallable; - private final OperationCallable - updateFederationOperationCallable; - private final UnaryCallable deleteFederationCallable; - private final OperationCallable - deleteFederationOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcDataprocMetastoreFederationStub create( - DataprocMetastoreFederationStubSettings settings) throws IOException { - return new GrpcDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); - } - - public static final GrpcDataprocMetastoreFederationStub create(ClientContext clientContext) - throws IOException { - return new GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcDataprocMetastoreFederationStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcDataprocMetastoreFederationCallableFactory()); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - listFederationsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listFederationsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("federation.name", String.valueOf(request.getFederation().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteFederationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteFederationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.listFederationsCallable = - callableFactory.createUnaryCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.listFederationsPagedCallable = - callableFactory.createPagedCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.getFederationCallable = - callableFactory.createUnaryCallable( - getFederationTransportSettings, settings.getFederationSettings(), clientContext); - this.createFederationCallable = - callableFactory.createUnaryCallable( - createFederationTransportSettings, settings.createFederationSettings(), clientContext); - this.createFederationOperationCallable = - callableFactory.createOperationCallable( - createFederationTransportSettings, - settings.createFederationOperationSettings(), - clientContext, - operationsStub); - this.updateFederationCallable = - callableFactory.createUnaryCallable( - updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); - this.updateFederationOperationCallable = - callableFactory.createOperationCallable( - updateFederationTransportSettings, - settings.updateFederationOperationSettings(), - clientContext, - operationsStub); - this.deleteFederationCallable = - callableFactory.createUnaryCallable( - deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); - this.deleteFederationOperationCallable = - callableFactory.createOperationCallable( - deleteFederationTransportSettings, - settings.deleteFederationOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listFederationsCallable() { - return listFederationsCallable; - } - - @Override - public UnaryCallable - listFederationsPagedCallable() { - return listFederationsPagedCallable; - } - - @Override - public UnaryCallable getFederationCallable() { - return getFederationCallable; - } - - @Override - public UnaryCallable createFederationCallable() { - return createFederationCallable; - } - - @Override - public OperationCallable - createFederationOperationCallable() { - return createFederationOperationCallable; - } - - @Override - public UnaryCallable updateFederationCallable() { - return updateFederationCallable; - } - - @Override - public OperationCallable - updateFederationOperationCallable() { - return updateFederationOperationCallable; - } - - @Override - public UnaryCallable deleteFederationCallable() { - return deleteFederationCallable; - } - - @Override - public OperationCallable - deleteFederationOperationCallable() { - return deleteFederationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreStub.java deleted file mode 100644 index 9b835f152be1..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreStub.java +++ /dev/null @@ -1,956 +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.v1beta.stub; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest; -import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse; -import com.google.cloud.metastore.v1beta.Backup; -import com.google.cloud.metastore.v1beta.CreateBackupRequest; -import com.google.cloud.metastore.v1beta.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1beta.CreateServiceRequest; -import com.google.cloud.metastore.v1beta.DeleteBackupRequest; -import com.google.cloud.metastore.v1beta.DeleteServiceRequest; -import com.google.cloud.metastore.v1beta.ExportMetadataRequest; -import com.google.cloud.metastore.v1beta.GetBackupRequest; -import com.google.cloud.metastore.v1beta.GetMetadataImportRequest; -import com.google.cloud.metastore.v1beta.GetServiceRequest; -import com.google.cloud.metastore.v1beta.ListBackupsRequest; -import com.google.cloud.metastore.v1beta.ListBackupsResponse; -import com.google.cloud.metastore.v1beta.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1beta.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1beta.ListServicesRequest; -import com.google.cloud.metastore.v1beta.ListServicesResponse; -import com.google.cloud.metastore.v1beta.MetadataExport; -import com.google.cloud.metastore.v1beta.MetadataImport; -import com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest; -import com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse; -import com.google.cloud.metastore.v1beta.OperationMetadata; -import com.google.cloud.metastore.v1beta.QueryMetadataRequest; -import com.google.cloud.metastore.v1beta.QueryMetadataResponse; -import com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest; -import com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse; -import com.google.cloud.metastore.v1beta.Restore; -import com.google.cloud.metastore.v1beta.RestoreServiceRequest; -import com.google.cloud.metastore.v1beta.Service; -import com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1beta.UpdateServiceRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcDataprocMetastoreStub extends DataprocMetastoreStub { - private static final MethodDescriptor - listServicesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ListServices") - .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/GetService") - .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/CreateService") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/UpdateService") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/DeleteService") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listMetadataImportsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/ListMetadataImports") - .setRequestMarshaller( - ProtoUtils.marshaller(ListMetadataImportsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListMetadataImportsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/GetMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(GetMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(MetadataImport.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/CreateMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateMetadataImportMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/UpdateMetadataImport") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateMetadataImportRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - exportMetadataMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ExportMetadata") - .setRequestMarshaller( - ProtoUtils.marshaller(ExportMetadataRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - restoreServiceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/RestoreService") - .setRequestMarshaller( - ProtoUtils.marshaller(RestoreServiceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listBackupsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ListBackups") - .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/GetBackup") - .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/CreateBackup") - .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteBackupMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/DeleteBackup") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - removeIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/RemoveIamPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(RemoveIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(RemoveIamPolicyResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - queryMetadataMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/QueryMetadata") - .setRequestMarshaller( - ProtoUtils.marshaller(QueryMetadataRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - moveTableToDatabaseMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/MoveTableToDatabase") - .setRequestMarshaller( - ProtoUtils.marshaller(MoveTableToDatabaseRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - alterMetadataResourceLocationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/AlterMetadataResourceLocation") - .setRequestMarshaller( - ProtoUtils.marshaller(AlterMetadataResourceLocationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable listServicesCallable; - private final UnaryCallable - listServicesPagedCallable; - private final UnaryCallable getServiceCallable; - private final UnaryCallable createServiceCallable; - private final OperationCallable - createServiceOperationCallable; - private final UnaryCallable updateServiceCallable; - private final OperationCallable - updateServiceOperationCallable; - private final UnaryCallable deleteServiceCallable; - private final OperationCallable - deleteServiceOperationCallable; - private final UnaryCallable - listMetadataImportsCallable; - private final UnaryCallable - listMetadataImportsPagedCallable; - private final UnaryCallable getMetadataImportCallable; - private final UnaryCallable createMetadataImportCallable; - private final OperationCallable - createMetadataImportOperationCallable; - private final UnaryCallable updateMetadataImportCallable; - private final OperationCallable - updateMetadataImportOperationCallable; - private final UnaryCallable exportMetadataCallable; - private final OperationCallable - exportMetadataOperationCallable; - private final UnaryCallable restoreServiceCallable; - private final OperationCallable - restoreServiceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - private final UnaryCallable - removeIamPolicyCallable; - private final UnaryCallable queryMetadataCallable; - private final OperationCallable - queryMetadataOperationCallable; - private final UnaryCallable moveTableToDatabaseCallable; - private final OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable; - private final UnaryCallable - alterMetadataResourceLocationCallable; - private final OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) - throws IOException { - return new GrpcDataprocMetastoreStub(settings, ClientContext.create(settings)); - } - - public static final GrpcDataprocMetastoreStub create(ClientContext clientContext) - throws IOException { - return new GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcDataprocMetastoreStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcDataprocMetastoreCallableFactory()); - } - - /** - * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listServicesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listServicesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service.name", String.valueOf(request.getService().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listMetadataImportsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listMetadataImportsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateMetadataImportTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateMetadataImportMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "metadata_import.name", - String.valueOf(request.getMetadataImport().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings exportMetadataTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(exportMetadataMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings restoreServiceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(restoreServiceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings listBackupsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteBackupTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - removeIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(removeIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings queryMetadataTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(queryMetadataMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings moveTableToDatabaseTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - GrpcCallSettings - alterMetadataResourceLocationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("service", String.valueOf(request.getService())); - return params.build(); - }) - .build(); - - this.listServicesCallable = - callableFactory.createUnaryCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.listServicesPagedCallable = - callableFactory.createPagedCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.getServiceCallable = - callableFactory.createUnaryCallable( - getServiceTransportSettings, settings.getServiceSettings(), clientContext); - this.createServiceCallable = - callableFactory.createUnaryCallable( - createServiceTransportSettings, settings.createServiceSettings(), clientContext); - this.createServiceOperationCallable = - callableFactory.createOperationCallable( - createServiceTransportSettings, - settings.createServiceOperationSettings(), - clientContext, - operationsStub); - this.updateServiceCallable = - callableFactory.createUnaryCallable( - updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); - this.updateServiceOperationCallable = - callableFactory.createOperationCallable( - updateServiceTransportSettings, - settings.updateServiceOperationSettings(), - clientContext, - operationsStub); - this.deleteServiceCallable = - callableFactory.createUnaryCallable( - deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); - this.deleteServiceOperationCallable = - callableFactory.createOperationCallable( - deleteServiceTransportSettings, - settings.deleteServiceOperationSettings(), - clientContext, - operationsStub); - this.listMetadataImportsCallable = - callableFactory.createUnaryCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.listMetadataImportsPagedCallable = - callableFactory.createPagedCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.getMetadataImportCallable = - callableFactory.createUnaryCallable( - getMetadataImportTransportSettings, - settings.getMetadataImportSettings(), - clientContext); - this.createMetadataImportCallable = - callableFactory.createUnaryCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportSettings(), - clientContext); - this.createMetadataImportOperationCallable = - callableFactory.createOperationCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportOperationSettings(), - clientContext, - operationsStub); - this.updateMetadataImportCallable = - callableFactory.createUnaryCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportSettings(), - clientContext); - this.updateMetadataImportOperationCallable = - callableFactory.createOperationCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportOperationSettings(), - clientContext, - operationsStub); - this.exportMetadataCallable = - callableFactory.createUnaryCallable( - exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); - this.exportMetadataOperationCallable = - callableFactory.createOperationCallable( - exportMetadataTransportSettings, - settings.exportMetadataOperationSettings(), - clientContext, - operationsStub); - this.restoreServiceCallable = - callableFactory.createUnaryCallable( - restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); - this.restoreServiceOperationCallable = - callableFactory.createOperationCallable( - restoreServiceTransportSettings, - settings.restoreServiceOperationSettings(), - clientContext, - operationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - operationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - operationsStub); - this.removeIamPolicyCallable = - callableFactory.createUnaryCallable( - removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); - this.queryMetadataCallable = - callableFactory.createUnaryCallable( - queryMetadataTransportSettings, settings.queryMetadataSettings(), clientContext); - this.queryMetadataOperationCallable = - callableFactory.createOperationCallable( - queryMetadataTransportSettings, - settings.queryMetadataOperationSettings(), - clientContext, - operationsStub); - this.moveTableToDatabaseCallable = - callableFactory.createUnaryCallable( - moveTableToDatabaseTransportSettings, - settings.moveTableToDatabaseSettings(), - clientContext); - this.moveTableToDatabaseOperationCallable = - callableFactory.createOperationCallable( - moveTableToDatabaseTransportSettings, - settings.moveTableToDatabaseOperationSettings(), - clientContext, - operationsStub); - this.alterMetadataResourceLocationCallable = - callableFactory.createUnaryCallable( - alterMetadataResourceLocationTransportSettings, - settings.alterMetadataResourceLocationSettings(), - clientContext); - this.alterMetadataResourceLocationOperationCallable = - callableFactory.createOperationCallable( - alterMetadataResourceLocationTransportSettings, - settings.alterMetadataResourceLocationOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listServicesCallable() { - return listServicesCallable; - } - - @Override - public UnaryCallable listServicesPagedCallable() { - return listServicesPagedCallable; - } - - @Override - public UnaryCallable getServiceCallable() { - return getServiceCallable; - } - - @Override - public UnaryCallable createServiceCallable() { - return createServiceCallable; - } - - @Override - public OperationCallable - createServiceOperationCallable() { - return createServiceOperationCallable; - } - - @Override - public UnaryCallable updateServiceCallable() { - return updateServiceCallable; - } - - @Override - public OperationCallable - updateServiceOperationCallable() { - return updateServiceOperationCallable; - } - - @Override - public UnaryCallable deleteServiceCallable() { - return deleteServiceCallable; - } - - @Override - public OperationCallable - deleteServiceOperationCallable() { - return deleteServiceOperationCallable; - } - - @Override - public UnaryCallable - listMetadataImportsCallable() { - return listMetadataImportsCallable; - } - - @Override - public UnaryCallable - listMetadataImportsPagedCallable() { - return listMetadataImportsPagedCallable; - } - - @Override - public UnaryCallable getMetadataImportCallable() { - return getMetadataImportCallable; - } - - @Override - public UnaryCallable createMetadataImportCallable() { - return createMetadataImportCallable; - } - - @Override - public OperationCallable - createMetadataImportOperationCallable() { - return createMetadataImportOperationCallable; - } - - @Override - public UnaryCallable updateMetadataImportCallable() { - return updateMetadataImportCallable; - } - - @Override - public OperationCallable - updateMetadataImportOperationCallable() { - return updateMetadataImportOperationCallable; - } - - @Override - public UnaryCallable exportMetadataCallable() { - return exportMetadataCallable; - } - - @Override - public OperationCallable - exportMetadataOperationCallable() { - return exportMetadataOperationCallable; - } - - @Override - public UnaryCallable restoreServiceCallable() { - return restoreServiceCallable; - } - - @Override - public OperationCallable - restoreServiceOperationCallable() { - return restoreServiceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public UnaryCallable removeIamPolicyCallable() { - return removeIamPolicyCallable; - } - - @Override - public UnaryCallable queryMetadataCallable() { - return queryMetadataCallable; - } - - @Override - public OperationCallable - queryMetadataOperationCallable() { - return queryMetadataOperationCallable; - } - - @Override - public UnaryCallable moveTableToDatabaseCallable() { - return moveTableToDatabaseCallable; - } - - @Override - public OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable() { - return moveTableToDatabaseOperationCallable; - } - - @Override - public UnaryCallable - alterMetadataResourceLocationCallable() { - return alterMetadataResourceLocationCallable; - } - - @Override - public OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable() { - return alterMetadataResourceLocationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationStub.java deleted file mode 100644 index 34a92e58849b..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationStub.java +++ /dev/null @@ -1,524 +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.v1beta.stub; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.HttpRule; -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1beta.CreateFederationRequest; -import com.google.cloud.metastore.v1beta.DeleteFederationRequest; -import com.google.cloud.metastore.v1beta.Federation; -import com.google.cloud.metastore.v1beta.GetFederationRequest; -import com.google.cloud.metastore.v1beta.ListFederationsRequest; -import com.google.cloud.metastore.v1beta.ListFederationsResponse; -import com.google.cloud.metastore.v1beta.OperationMetadata; -import com.google.cloud.metastore.v1beta.UpdateFederationRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the DataprocMetastoreFederation service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(OperationMetadata.getDescriptor()) - .add(Empty.getDescriptor()) - .add(Federation.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listFederationsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/ListFederations") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*}/federations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListFederationsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/GetFederation") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Federation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/CreateFederation") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*}/federations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "federationId", request.getFederationId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("federation", request.getFederation(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/UpdateFederation") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{federation.name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "federation.name", request.getFederation().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("federation", request.getFederation(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteFederationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastoreFederation/DeleteFederation") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/federations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteFederationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable - listFederationsCallable; - private final UnaryCallable - listFederationsPagedCallable; - private final UnaryCallable getFederationCallable; - private final UnaryCallable createFederationCallable; - private final OperationCallable - createFederationOperationCallable; - private final UnaryCallable updateFederationCallable; - private final OperationCallable - updateFederationOperationCallable; - private final UnaryCallable deleteFederationCallable; - private final OperationCallable - deleteFederationOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonDataprocMetastoreFederationStub create( - DataprocMetastoreFederationStubSettings settings) throws IOException { - return new HttpJsonDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonDataprocMetastoreFederationStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonDataprocMetastoreFederationStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonDataprocMetastoreFederationCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( - DataprocMetastoreFederationStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create( - clientContext, - callableFactory, - typeRegistry, - ImmutableMap.builder() - .put( - "google.longrunning.Operations.DeleteOperation", - HttpRule.newBuilder() - .setDelete("/v1beta/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.GetOperation", - HttpRule.newBuilder() - .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.ListOperations", - HttpRule.newBuilder() - .setGet("/v1beta/{name=projects/*/locations/*}/operations") - .build()) - .build()); - - HttpJsonCallSettings - listFederationsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listFederationsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteFederationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteFederationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listFederationsCallable = - callableFactory.createUnaryCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.listFederationsPagedCallable = - callableFactory.createPagedCallable( - listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); - this.getFederationCallable = - callableFactory.createUnaryCallable( - getFederationTransportSettings, settings.getFederationSettings(), clientContext); - this.createFederationCallable = - callableFactory.createUnaryCallable( - createFederationTransportSettings, settings.createFederationSettings(), clientContext); - this.createFederationOperationCallable = - callableFactory.createOperationCallable( - createFederationTransportSettings, - settings.createFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateFederationCallable = - callableFactory.createUnaryCallable( - updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); - this.updateFederationOperationCallable = - callableFactory.createOperationCallable( - updateFederationTransportSettings, - settings.updateFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteFederationCallable = - callableFactory.createUnaryCallable( - deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); - this.deleteFederationOperationCallable = - callableFactory.createOperationCallable( - deleteFederationTransportSettings, - settings.deleteFederationOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listFederationsMethodDescriptor); - methodDescriptors.add(getFederationMethodDescriptor); - methodDescriptors.add(createFederationMethodDescriptor); - methodDescriptors.add(updateFederationMethodDescriptor); - methodDescriptors.add(deleteFederationMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable listFederationsCallable() { - return listFederationsCallable; - } - - @Override - public UnaryCallable - listFederationsPagedCallable() { - return listFederationsPagedCallable; - } - - @Override - public UnaryCallable getFederationCallable() { - return getFederationCallable; - } - - @Override - public UnaryCallable createFederationCallable() { - return createFederationCallable; - } - - @Override - public OperationCallable - createFederationOperationCallable() { - return createFederationOperationCallable; - } - - @Override - public UnaryCallable updateFederationCallable() { - return updateFederationCallable; - } - - @Override - public OperationCallable - updateFederationOperationCallable() { - return updateFederationOperationCallable; - } - - @Override - public UnaryCallable deleteFederationCallable() { - return deleteFederationCallable; - } - - @Override - public OperationCallable - deleteFederationOperationCallable() { - return deleteFederationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreStub.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreStub.java deleted file mode 100644 index a148a3a55092..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreStub.java +++ /dev/null @@ -1,1490 +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.v1beta.stub; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.HttpRule; -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest; -import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse; -import com.google.cloud.metastore.v1beta.Backup; -import com.google.cloud.metastore.v1beta.CreateBackupRequest; -import com.google.cloud.metastore.v1beta.CreateMetadataImportRequest; -import com.google.cloud.metastore.v1beta.CreateServiceRequest; -import com.google.cloud.metastore.v1beta.DeleteBackupRequest; -import com.google.cloud.metastore.v1beta.DeleteServiceRequest; -import com.google.cloud.metastore.v1beta.ExportMetadataRequest; -import com.google.cloud.metastore.v1beta.GetBackupRequest; -import com.google.cloud.metastore.v1beta.GetMetadataImportRequest; -import com.google.cloud.metastore.v1beta.GetServiceRequest; -import com.google.cloud.metastore.v1beta.ListBackupsRequest; -import com.google.cloud.metastore.v1beta.ListBackupsResponse; -import com.google.cloud.metastore.v1beta.ListMetadataImportsRequest; -import com.google.cloud.metastore.v1beta.ListMetadataImportsResponse; -import com.google.cloud.metastore.v1beta.ListServicesRequest; -import com.google.cloud.metastore.v1beta.ListServicesResponse; -import com.google.cloud.metastore.v1beta.MetadataExport; -import com.google.cloud.metastore.v1beta.MetadataImport; -import com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest; -import com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse; -import com.google.cloud.metastore.v1beta.OperationMetadata; -import com.google.cloud.metastore.v1beta.QueryMetadataRequest; -import com.google.cloud.metastore.v1beta.QueryMetadataResponse; -import com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest; -import com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse; -import com.google.cloud.metastore.v1beta.Restore; -import com.google.cloud.metastore.v1beta.RestoreServiceRequest; -import com.google.cloud.metastore.v1beta.Service; -import com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest; -import com.google.cloud.metastore.v1beta.UpdateServiceRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the DataprocMetastore service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(OperationMetadata.getDescriptor()) - .add(Empty.getDescriptor()) - .add(MetadataImport.getDescriptor()) - .add(MoveTableToDatabaseResponse.getDescriptor()) - .add(AlterMetadataResourceLocationResponse.getDescriptor()) - .add(QueryMetadataResponse.getDescriptor()) - .add(Restore.getDescriptor()) - .add(Service.getDescriptor()) - .add(Backup.getDescriptor()) - .add(MetadataExport.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listServicesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ListServices") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*}/services", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListServicesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/GetService") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Service.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/CreateService") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*}/services", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "serviceId", request.getServiceId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("service", request.getService(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/UpdateService") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{service.name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "service.name", request.getService().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("service", request.getService(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/DeleteService") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/services/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listMetadataImportsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/ListMetadataImports") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListMetadataImportsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/GetMetadataImport") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/services/*/metadataImports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MetadataImport.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/CreateMetadataImport") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "metadataImportId", request.getMetadataImportId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("metadataImport", request.getMetadataImport(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateMetadataImportRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateMetadataImportMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/UpdateMetadataImport") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{metadataImport.name=projects/*/locations/*/services/*/metadataImports/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "metadataImport.name", - request.getMetadataImport().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("metadataImport", request.getMetadataImport(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateMetadataImportRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - exportMetadataMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ExportMetadata") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{service=projects/*/locations/*/services/*}:exportMetadata", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (ExportMetadataRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - restoreServiceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/RestoreService") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{service=projects/*/locations/*/services/*}:restore", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (RestoreServiceRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listBackupsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ListBackups") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*/services/*}/backups", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/GetBackup") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/services/*/backups/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Backup.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/CreateBackup") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*/services/*}/backups", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "backupId", request.getBackupId()); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("backup", request.getBackup(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteBackupMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/DeleteBackup") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/services/*/backups/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "requestId", request.getRequestId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteBackupRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - removeIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/RemoveIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearResource().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(RemoveIamPolicyResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - queryMetadataMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/QueryMetadata") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{service=projects/*/locations/*/services/*}:queryMetadata", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (QueryMetadataRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - moveTableToDatabaseMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/MoveTableToDatabase") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{service=projects/*/locations/*/services/*}:moveTableToDatabase", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (MoveTableToDatabaseRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - alterMetadataResourceLocationMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.metastore.v1beta.DataprocMetastore/AlterMetadataResourceLocation") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{service=projects/*/locations/*/services/*}:alterLocation", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "service", request.getService()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearService().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AlterMetadataResourceLocationRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable listServicesCallable; - private final UnaryCallable - listServicesPagedCallable; - private final UnaryCallable getServiceCallable; - private final UnaryCallable createServiceCallable; - private final OperationCallable - createServiceOperationCallable; - private final UnaryCallable updateServiceCallable; - private final OperationCallable - updateServiceOperationCallable; - private final UnaryCallable deleteServiceCallable; - private final OperationCallable - deleteServiceOperationCallable; - private final UnaryCallable - listMetadataImportsCallable; - private final UnaryCallable - listMetadataImportsPagedCallable; - private final UnaryCallable getMetadataImportCallable; - private final UnaryCallable createMetadataImportCallable; - private final OperationCallable - createMetadataImportOperationCallable; - private final UnaryCallable updateMetadataImportCallable; - private final OperationCallable - updateMetadataImportOperationCallable; - private final UnaryCallable exportMetadataCallable; - private final OperationCallable - exportMetadataOperationCallable; - private final UnaryCallable restoreServiceCallable; - private final OperationCallable - restoreServiceOperationCallable; - private final UnaryCallable listBackupsCallable; - private final UnaryCallable - listBackupsPagedCallable; - private final UnaryCallable getBackupCallable; - private final UnaryCallable createBackupCallable; - private final OperationCallable - createBackupOperationCallable; - private final UnaryCallable deleteBackupCallable; - private final OperationCallable - deleteBackupOperationCallable; - private final UnaryCallable - removeIamPolicyCallable; - private final UnaryCallable queryMetadataCallable; - private final OperationCallable - queryMetadataOperationCallable; - private final UnaryCallable moveTableToDatabaseCallable; - private final OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable; - private final UnaryCallable - alterMetadataResourceLocationCallable; - private final OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) - throws IOException { - return new HttpJsonDataprocMetastoreStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonDataprocMetastoreStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonDataprocMetastoreStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonDataprocMetastoreCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( - DataprocMetastoreStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create( - clientContext, - callableFactory, - typeRegistry, - ImmutableMap.builder() - .put( - "google.longrunning.Operations.DeleteOperation", - HttpRule.newBuilder() - .setDelete("/v1beta/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.GetOperation", - HttpRule.newBuilder() - .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") - .build()) - .put( - "google.longrunning.Operations.ListOperations", - HttpRule.newBuilder() - .setGet("/v1beta/{name=projects/*/locations/*}/operations") - .build()) - .build()); - - HttpJsonCallSettings listServicesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listServicesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listMetadataImportsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listMetadataImportsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateMetadataImportTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateMetadataImportMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings exportMetadataTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(exportMetadataMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings restoreServiceTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(restoreServiceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listBackupsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listBackupsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteBackupTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteBackupMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - removeIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(removeIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings queryMetadataTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(queryMetadataMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - moveTableToDatabaseTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - alterMetadataResourceLocationTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listServicesCallable = - callableFactory.createUnaryCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.listServicesPagedCallable = - callableFactory.createPagedCallable( - listServicesTransportSettings, settings.listServicesSettings(), clientContext); - this.getServiceCallable = - callableFactory.createUnaryCallable( - getServiceTransportSettings, settings.getServiceSettings(), clientContext); - this.createServiceCallable = - callableFactory.createUnaryCallable( - createServiceTransportSettings, settings.createServiceSettings(), clientContext); - this.createServiceOperationCallable = - callableFactory.createOperationCallable( - createServiceTransportSettings, - settings.createServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateServiceCallable = - callableFactory.createUnaryCallable( - updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); - this.updateServiceOperationCallable = - callableFactory.createOperationCallable( - updateServiceTransportSettings, - settings.updateServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteServiceCallable = - callableFactory.createUnaryCallable( - deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); - this.deleteServiceOperationCallable = - callableFactory.createOperationCallable( - deleteServiceTransportSettings, - settings.deleteServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listMetadataImportsCallable = - callableFactory.createUnaryCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.listMetadataImportsPagedCallable = - callableFactory.createPagedCallable( - listMetadataImportsTransportSettings, - settings.listMetadataImportsSettings(), - clientContext); - this.getMetadataImportCallable = - callableFactory.createUnaryCallable( - getMetadataImportTransportSettings, - settings.getMetadataImportSettings(), - clientContext); - this.createMetadataImportCallable = - callableFactory.createUnaryCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportSettings(), - clientContext); - this.createMetadataImportOperationCallable = - callableFactory.createOperationCallable( - createMetadataImportTransportSettings, - settings.createMetadataImportOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateMetadataImportCallable = - callableFactory.createUnaryCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportSettings(), - clientContext); - this.updateMetadataImportOperationCallable = - callableFactory.createOperationCallable( - updateMetadataImportTransportSettings, - settings.updateMetadataImportOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.exportMetadataCallable = - callableFactory.createUnaryCallable( - exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); - this.exportMetadataOperationCallable = - callableFactory.createOperationCallable( - exportMetadataTransportSettings, - settings.exportMetadataOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.restoreServiceCallable = - callableFactory.createUnaryCallable( - restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); - this.restoreServiceOperationCallable = - callableFactory.createOperationCallable( - restoreServiceTransportSettings, - settings.restoreServiceOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listBackupsCallable = - callableFactory.createUnaryCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.listBackupsPagedCallable = - callableFactory.createPagedCallable( - listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); - this.getBackupCallable = - callableFactory.createUnaryCallable( - getBackupTransportSettings, settings.getBackupSettings(), clientContext); - this.createBackupCallable = - callableFactory.createUnaryCallable( - createBackupTransportSettings, settings.createBackupSettings(), clientContext); - this.createBackupOperationCallable = - callableFactory.createOperationCallable( - createBackupTransportSettings, - settings.createBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteBackupCallable = - callableFactory.createUnaryCallable( - deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); - this.deleteBackupOperationCallable = - callableFactory.createOperationCallable( - deleteBackupTransportSettings, - settings.deleteBackupOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.removeIamPolicyCallable = - callableFactory.createUnaryCallable( - removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); - this.queryMetadataCallable = - callableFactory.createUnaryCallable( - queryMetadataTransportSettings, settings.queryMetadataSettings(), clientContext); - this.queryMetadataOperationCallable = - callableFactory.createOperationCallable( - queryMetadataTransportSettings, - settings.queryMetadataOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.moveTableToDatabaseCallable = - callableFactory.createUnaryCallable( - moveTableToDatabaseTransportSettings, - settings.moveTableToDatabaseSettings(), - clientContext); - this.moveTableToDatabaseOperationCallable = - callableFactory.createOperationCallable( - moveTableToDatabaseTransportSettings, - settings.moveTableToDatabaseOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.alterMetadataResourceLocationCallable = - callableFactory.createUnaryCallable( - alterMetadataResourceLocationTransportSettings, - settings.alterMetadataResourceLocationSettings(), - clientContext); - this.alterMetadataResourceLocationOperationCallable = - callableFactory.createOperationCallable( - alterMetadataResourceLocationTransportSettings, - settings.alterMetadataResourceLocationOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listServicesMethodDescriptor); - methodDescriptors.add(getServiceMethodDescriptor); - methodDescriptors.add(createServiceMethodDescriptor); - methodDescriptors.add(updateServiceMethodDescriptor); - methodDescriptors.add(deleteServiceMethodDescriptor); - methodDescriptors.add(listMetadataImportsMethodDescriptor); - methodDescriptors.add(getMetadataImportMethodDescriptor); - methodDescriptors.add(createMetadataImportMethodDescriptor); - methodDescriptors.add(updateMetadataImportMethodDescriptor); - methodDescriptors.add(exportMetadataMethodDescriptor); - methodDescriptors.add(restoreServiceMethodDescriptor); - methodDescriptors.add(listBackupsMethodDescriptor); - methodDescriptors.add(getBackupMethodDescriptor); - methodDescriptors.add(createBackupMethodDescriptor); - methodDescriptors.add(deleteBackupMethodDescriptor); - methodDescriptors.add(removeIamPolicyMethodDescriptor); - methodDescriptors.add(queryMetadataMethodDescriptor); - methodDescriptors.add(moveTableToDatabaseMethodDescriptor); - methodDescriptors.add(alterMetadataResourceLocationMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable listServicesCallable() { - return listServicesCallable; - } - - @Override - public UnaryCallable listServicesPagedCallable() { - return listServicesPagedCallable; - } - - @Override - public UnaryCallable getServiceCallable() { - return getServiceCallable; - } - - @Override - public UnaryCallable createServiceCallable() { - return createServiceCallable; - } - - @Override - public OperationCallable - createServiceOperationCallable() { - return createServiceOperationCallable; - } - - @Override - public UnaryCallable updateServiceCallable() { - return updateServiceCallable; - } - - @Override - public OperationCallable - updateServiceOperationCallable() { - return updateServiceOperationCallable; - } - - @Override - public UnaryCallable deleteServiceCallable() { - return deleteServiceCallable; - } - - @Override - public OperationCallable - deleteServiceOperationCallable() { - return deleteServiceOperationCallable; - } - - @Override - public UnaryCallable - listMetadataImportsCallable() { - return listMetadataImportsCallable; - } - - @Override - public UnaryCallable - listMetadataImportsPagedCallable() { - return listMetadataImportsPagedCallable; - } - - @Override - public UnaryCallable getMetadataImportCallable() { - return getMetadataImportCallable; - } - - @Override - public UnaryCallable createMetadataImportCallable() { - return createMetadataImportCallable; - } - - @Override - public OperationCallable - createMetadataImportOperationCallable() { - return createMetadataImportOperationCallable; - } - - @Override - public UnaryCallable updateMetadataImportCallable() { - return updateMetadataImportCallable; - } - - @Override - public OperationCallable - updateMetadataImportOperationCallable() { - return updateMetadataImportOperationCallable; - } - - @Override - public UnaryCallable exportMetadataCallable() { - return exportMetadataCallable; - } - - @Override - public OperationCallable - exportMetadataOperationCallable() { - return exportMetadataOperationCallable; - } - - @Override - public UnaryCallable restoreServiceCallable() { - return restoreServiceCallable; - } - - @Override - public OperationCallable - restoreServiceOperationCallable() { - return restoreServiceOperationCallable; - } - - @Override - public UnaryCallable listBackupsCallable() { - return listBackupsCallable; - } - - @Override - public UnaryCallable listBackupsPagedCallable() { - return listBackupsPagedCallable; - } - - @Override - public UnaryCallable getBackupCallable() { - return getBackupCallable; - } - - @Override - public UnaryCallable createBackupCallable() { - return createBackupCallable; - } - - @Override - public OperationCallable - createBackupOperationCallable() { - return createBackupOperationCallable; - } - - @Override - public UnaryCallable deleteBackupCallable() { - return deleteBackupCallable; - } - - @Override - public OperationCallable - deleteBackupOperationCallable() { - return deleteBackupOperationCallable; - } - - @Override - public UnaryCallable removeIamPolicyCallable() { - return removeIamPolicyCallable; - } - - @Override - public UnaryCallable queryMetadataCallable() { - return queryMetadataCallable; - } - - @Override - public OperationCallable - queryMetadataOperationCallable() { - return queryMetadataOperationCallable; - } - - @Override - public UnaryCallable moveTableToDatabaseCallable() { - return moveTableToDatabaseCallable; - } - - @Override - public OperationCallable< - MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> - moveTableToDatabaseOperationCallable() { - return moveTableToDatabaseOperationCallable; - } - - @Override - public UnaryCallable - alterMetadataResourceLocationCallable() { - return alterMetadataResourceLocationCallable; - } - - @Override - public OperationCallable< - AlterMetadataResourceLocationRequest, - AlterMetadataResourceLocationResponse, - OperationMetadata> - alterMetadataResourceLocationOperationCallable() { - return alterMetadataResourceLocationOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientHttpJsonTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientHttpJsonTest.java deleted file mode 100644 index 8afcfb4d1ca0..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientHttpJsonTest.java +++ /dev/null @@ -1,1708 +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 static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.metastore.v1.stub.HttpJsonDataprocMetastoreStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreClientHttpJsonTest { - private static MockHttpService mockService; - private static DataprocMetastoreClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonDataprocMetastoreStub.getMethodDescriptors(), - DataprocMetastoreSettings.getDefaultEndpoint()); - DataprocMetastoreSettings settings = - DataprocMetastoreSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - DataprocMetastoreSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listServicesTest() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listServicesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listServicesTest2() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listServicesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Service service = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Service actualResponse = client.updateServiceAsync(service, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Service service = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateServiceAsync(service, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteServiceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteServiceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listMetadataImportsTest() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMetadataImportsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMetadataImportsTest2() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMetadataImportsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getMetadataImportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMetadataImportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - MetadataImport metadataImport = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MetadataImport actualResponse = - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MetadataImport metadataImport = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void exportMetadataTest() throws Exception { - MetadataExport expectedResponse = - MetadataExport.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - - MetadataExport actualResponse = client.exportMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void exportMetadataExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - client.exportMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest2() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest3() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest4() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBackupsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBackupsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientTest.java deleted file mode 100644 index 2594af370fa5..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientTest.java +++ /dev/null @@ -1,1555 +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 static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreClientTest { - private static MockDataprocMetastore mockDataprocMetastore; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private DataprocMetastoreClient client; - - @BeforeClass - public static void startStaticServer() { - mockDataprocMetastore = new MockDataprocMetastore(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockDataprocMetastore)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - DataprocMetastoreSettings settings = - DataprocMetastoreSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listServicesTest() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listServicesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listServicesTest2() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listServicesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(serviceId, actualRequest.getServiceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(serviceId, actualRequest.getServiceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - Service service = Service.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Service actualResponse = client.updateServiceAsync(service, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateServiceRequest actualRequest = ((UpdateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - Service service = Service.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateServiceAsync(service, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteServiceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteServiceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void listMetadataImportsTest() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMetadataImportsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMetadataImportsTest2() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMetadataImportsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getMetadataImportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMetadataImportRequest actualRequest = - ((CreateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMetadataImportRequest actualRequest = - ((CreateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMetadataImportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MetadataImport actualResponse = - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateMetadataImportRequest actualRequest = - ((UpdateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void exportMetadataTest() throws Exception { - MetadataExport expectedResponse = - MetadataExport.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - - MetadataExport actualResponse = client.exportMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportMetadataRequest actualRequest = ((ExportMetadataRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getDestinationGcsFolder(), actualRequest.getDestinationGcsFolder()); - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); - Assert.assertEquals(request.getDatabaseDumpType(), actualRequest.getDatabaseDumpType()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void exportMetadataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - client.exportMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service.toString(), actualRequest.getService()); - Assert.assertEquals(backup.toString(), actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest2() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service.toString(), actualRequest.getService()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest3() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String service = "service1984153269"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(backup.toString(), actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String service = "service1984153269"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest4() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String service = "service1984153269"; - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String service = "service1984153269"; - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientHttpJsonTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientHttpJsonTest.java deleted file mode 100644 index c27d4ae8dae1..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientHttpJsonTest.java +++ /dev/null @@ -1,583 +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 static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.metastore.v1.stub.HttpJsonDataprocMetastoreFederationStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationClientHttpJsonTest { - private static MockHttpService mockService; - private static DataprocMetastoreFederationClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonDataprocMetastoreFederationStub.getMethodDescriptors(), - DataprocMetastoreFederationSettings.getDefaultEndpoint()); - DataprocMetastoreFederationSettings settings = - DataprocMetastoreFederationSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - DataprocMetastoreFederationSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreFederationClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listFederationsTest() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFederationsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFederationsTest2() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFederationsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockService.addResponse(expectedResponse); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Federation federation = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Federation federation = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateFederationAsync(federation, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteFederationTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteFederationTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientTest.java deleted file mode 100644 index a426f4288ed2..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientTest.java +++ /dev/null @@ -1,532 +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 static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationClientTest { - private static MockDataprocMetastoreFederation mockDataprocMetastoreFederation; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private DataprocMetastoreFederationClient client; - - @BeforeClass - public static void startStaticServer() { - mockDataprocMetastoreFederation = new MockDataprocMetastoreFederation(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockDataprocMetastoreFederation)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - DataprocMetastoreFederationSettings settings = - DataprocMetastoreFederationSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreFederationClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listFederationsTest() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFederationsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFederationsTest2() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFederationsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String parent = "parent-995424086"; - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - String name = "name3373707"; - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String name = "name3373707"; - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(federationId, actualRequest.getFederationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - String parent = "parent-995424086"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(federationId, actualRequest.getFederationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String parent = "parent-995424086"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - Federation federation = Federation.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateFederationRequest actualRequest = ((UpdateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - Federation federation = Federation.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateFederationAsync(federation, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteFederationTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteFederationTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String name = "name3373707"; - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientHttpJsonTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientHttpJsonTest.java deleted file mode 100644 index 81ffd118d766..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientHttpJsonTest.java +++ /dev/null @@ -1,1940 +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.v1alpha; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.metastore.v1alpha.stub.HttpJsonDataprocMetastoreStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreClientHttpJsonTest { - private static MockHttpService mockService; - private static DataprocMetastoreClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonDataprocMetastoreStub.getMethodDescriptors(), - DataprocMetastoreSettings.getDefaultEndpoint()); - DataprocMetastoreSettings settings = - DataprocMetastoreSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - DataprocMetastoreSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listServicesTest() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listServicesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listServicesTest2() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listServicesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Service service = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Service actualResponse = client.updateServiceAsync(service, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Service service = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateServiceAsync(service, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteServiceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteServiceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listMetadataImportsTest() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMetadataImportsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMetadataImportsTest2() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMetadataImportsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getMetadataImportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMetadataImportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - MetadataImport metadataImport = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MetadataImport actualResponse = - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MetadataImport metadataImport = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void exportMetadataTest() throws Exception { - MetadataExport expectedResponse = - MetadataExport.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - - MetadataExport actualResponse = client.exportMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void exportMetadataExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - client.exportMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest2() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest3() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest4() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBackupsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBackupsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void removeIamPolicyTest() throws Exception { - RemoveIamPolicyResponse expectedResponse = - RemoveIamPolicyResponse.newBuilder().setSuccess(true).build(); - mockService.addResponse(expectedResponse); - - RemoveIamPolicyRequest request = - RemoveIamPolicyRequest.newBuilder() - .setResource( - BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setAsynchronous(true) - .build(); - - RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - RemoveIamPolicyRequest request = - RemoveIamPolicyRequest.newBuilder() - .setResource( - BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setAsynchronous(true) - .build(); - client.removeIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void queryMetadataTest() throws Exception { - QueryMetadataResponse expectedResponse = - QueryMetadataResponse.newBuilder() - .setResultManifestUri("resultManifestUri233134176") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("queryMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - QueryMetadataRequest request = - QueryMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setQuery("query107944136") - .build(); - - QueryMetadataResponse actualResponse = client.queryMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void queryMetadataExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - QueryMetadataRequest request = - QueryMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setQuery("query107944136") - .build(); - client.queryMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void moveTableToDatabaseTest() throws Exception { - MoveTableToDatabaseResponse expectedResponse = MoveTableToDatabaseResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("moveTableToDatabaseTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - MoveTableToDatabaseRequest request = - MoveTableToDatabaseRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setTableName("tableName-1988717703") - .setDbName("dbName-1339126743") - .setDestinationDbName("destinationDbName-2077361705") - .build(); - - MoveTableToDatabaseResponse actualResponse = client.moveTableToDatabaseAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void moveTableToDatabaseExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MoveTableToDatabaseRequest request = - MoveTableToDatabaseRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setTableName("tableName-1988717703") - .setDbName("dbName-1339126743") - .setDestinationDbName("destinationDbName-2077361705") - .build(); - client.moveTableToDatabaseAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void alterMetadataResourceLocationTest() throws Exception { - AlterMetadataResourceLocationResponse expectedResponse = - AlterMetadataResourceLocationResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("alterMetadataResourceLocationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - AlterMetadataResourceLocationRequest request = - AlterMetadataResourceLocationRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setResourceName("resourceName-384566343") - .setLocationUri("locationUri552310135") - .build(); - - AlterMetadataResourceLocationResponse actualResponse = - client.alterMetadataResourceLocationAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void alterMetadataResourceLocationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AlterMetadataResourceLocationRequest request = - AlterMetadataResourceLocationRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setResourceName("resourceName-384566343") - .setLocationUri("locationUri552310135") - .build(); - client.alterMetadataResourceLocationAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientTest.java deleted file mode 100644 index 42abcb593a24..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientTest.java +++ /dev/null @@ -1,1778 +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.v1alpha; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreClientTest { - private static MockDataprocMetastore mockDataprocMetastore; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private DataprocMetastoreClient client; - - @BeforeClass - public static void startStaticServer() { - mockDataprocMetastore = new MockDataprocMetastore(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockDataprocMetastore)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - DataprocMetastoreSettings settings = - DataprocMetastoreSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listServicesTest() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listServicesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listServicesTest2() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listServicesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(serviceId, actualRequest.getServiceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(serviceId, actualRequest.getServiceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - Service service = Service.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Service actualResponse = client.updateServiceAsync(service, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateServiceRequest actualRequest = ((UpdateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - Service service = Service.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateServiceAsync(service, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteServiceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteServiceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void listMetadataImportsTest() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMetadataImportsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMetadataImportsTest2() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMetadataImportsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getMetadataImportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMetadataImportRequest actualRequest = - ((CreateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMetadataImportRequest actualRequest = - ((CreateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMetadataImportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MetadataImport actualResponse = - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateMetadataImportRequest actualRequest = - ((UpdateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void exportMetadataTest() throws Exception { - MetadataExport expectedResponse = - MetadataExport.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - - MetadataExport actualResponse = client.exportMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportMetadataRequest actualRequest = ((ExportMetadataRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getDestinationGcsFolder(), actualRequest.getDestinationGcsFolder()); - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); - Assert.assertEquals(request.getDatabaseDumpType(), actualRequest.getDatabaseDumpType()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void exportMetadataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - client.exportMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service.toString(), actualRequest.getService()); - Assert.assertEquals(backup.toString(), actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest2() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service.toString(), actualRequest.getService()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest3() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String service = "service1984153269"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(backup.toString(), actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String service = "service1984153269"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest4() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String service = "service1984153269"; - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String service = "service1984153269"; - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void removeIamPolicyTest() throws Exception { - RemoveIamPolicyResponse expectedResponse = - RemoveIamPolicyResponse.newBuilder().setSuccess(true).build(); - mockDataprocMetastore.addResponse(expectedResponse); - - RemoveIamPolicyRequest request = - RemoveIamPolicyRequest.newBuilder() - .setResource( - BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setAsynchronous(true) - .build(); - - RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveIamPolicyRequest actualRequest = ((RemoveIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getAsynchronous(), actualRequest.getAsynchronous()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - RemoveIamPolicyRequest request = - RemoveIamPolicyRequest.newBuilder() - .setResource( - BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setAsynchronous(true) - .build(); - client.removeIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void queryMetadataTest() throws Exception { - QueryMetadataResponse expectedResponse = - QueryMetadataResponse.newBuilder() - .setResultManifestUri("resultManifestUri233134176") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("queryMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - QueryMetadataRequest request = - QueryMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setQuery("query107944136") - .build(); - - QueryMetadataResponse actualResponse = client.queryMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - QueryMetadataRequest actualRequest = ((QueryMetadataRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void queryMetadataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - QueryMetadataRequest request = - QueryMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setQuery("query107944136") - .build(); - client.queryMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void moveTableToDatabaseTest() throws Exception { - MoveTableToDatabaseResponse expectedResponse = MoveTableToDatabaseResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("moveTableToDatabaseTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - MoveTableToDatabaseRequest request = - MoveTableToDatabaseRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setTableName("tableName-1988717703") - .setDbName("dbName-1339126743") - .setDestinationDbName("destinationDbName-2077361705") - .build(); - - MoveTableToDatabaseResponse actualResponse = client.moveTableToDatabaseAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - MoveTableToDatabaseRequest actualRequest = ((MoveTableToDatabaseRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getTableName(), actualRequest.getTableName()); - Assert.assertEquals(request.getDbName(), actualRequest.getDbName()); - Assert.assertEquals(request.getDestinationDbName(), actualRequest.getDestinationDbName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void moveTableToDatabaseExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - MoveTableToDatabaseRequest request = - MoveTableToDatabaseRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setTableName("tableName-1988717703") - .setDbName("dbName-1339126743") - .setDestinationDbName("destinationDbName-2077361705") - .build(); - client.moveTableToDatabaseAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void alterMetadataResourceLocationTest() throws Exception { - AlterMetadataResourceLocationResponse expectedResponse = - AlterMetadataResourceLocationResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("alterMetadataResourceLocationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - AlterMetadataResourceLocationRequest request = - AlterMetadataResourceLocationRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setResourceName("resourceName-384566343") - .setLocationUri("locationUri552310135") - .build(); - - AlterMetadataResourceLocationResponse actualResponse = - client.alterMetadataResourceLocationAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AlterMetadataResourceLocationRequest actualRequest = - ((AlterMetadataResourceLocationRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getResourceName(), actualRequest.getResourceName()); - Assert.assertEquals(request.getLocationUri(), actualRequest.getLocationUri()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void alterMetadataResourceLocationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - AlterMetadataResourceLocationRequest request = - AlterMetadataResourceLocationRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setResourceName("resourceName-384566343") - .setLocationUri("locationUri552310135") - .build(); - client.alterMetadataResourceLocationAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientHttpJsonTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientHttpJsonTest.java deleted file mode 100644 index 7722b3cef998..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientHttpJsonTest.java +++ /dev/null @@ -1,583 +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.v1alpha; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.metastore.v1alpha.stub.HttpJsonDataprocMetastoreFederationStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationClientHttpJsonTest { - private static MockHttpService mockService; - private static DataprocMetastoreFederationClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonDataprocMetastoreFederationStub.getMethodDescriptors(), - DataprocMetastoreFederationSettings.getDefaultEndpoint()); - DataprocMetastoreFederationSettings settings = - DataprocMetastoreFederationSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - DataprocMetastoreFederationSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreFederationClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listFederationsTest() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFederationsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFederationsTest2() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFederationsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockService.addResponse(expectedResponse); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Federation federation = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Federation federation = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateFederationAsync(federation, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteFederationTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteFederationTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientTest.java deleted file mode 100644 index 6dff23583134..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientTest.java +++ /dev/null @@ -1,532 +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.v1alpha; - -import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationClientTest { - private static MockDataprocMetastoreFederation mockDataprocMetastoreFederation; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private DataprocMetastoreFederationClient client; - - @BeforeClass - public static void startStaticServer() { - mockDataprocMetastoreFederation = new MockDataprocMetastoreFederation(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockDataprocMetastoreFederation)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - DataprocMetastoreFederationSettings settings = - DataprocMetastoreFederationSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreFederationClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listFederationsTest() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFederationsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFederationsTest2() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFederationsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String parent = "parent-995424086"; - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - String name = "name3373707"; - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String name = "name3373707"; - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(federationId, actualRequest.getFederationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - String parent = "parent-995424086"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(federationId, actualRequest.getFederationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String parent = "parent-995424086"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - Federation federation = Federation.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateFederationRequest actualRequest = ((UpdateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - Federation federation = Federation.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateFederationAsync(federation, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteFederationTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteFederationTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String name = "name3373707"; - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientHttpJsonTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientHttpJsonTest.java deleted file mode 100644 index d382addc1bde..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientHttpJsonTest.java +++ /dev/null @@ -1,1940 +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.v1beta; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.metastore.v1beta.stub.HttpJsonDataprocMetastoreStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreClientHttpJsonTest { - private static MockHttpService mockService; - private static DataprocMetastoreClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonDataprocMetastoreStub.getMethodDescriptors(), - DataprocMetastoreSettings.getDefaultEndpoint()); - DataprocMetastoreSettings settings = - DataprocMetastoreSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - DataprocMetastoreSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listServicesTest() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listServicesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listServicesTest2() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listServicesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Service service = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Service actualResponse = client.updateServiceAsync(service, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Service service = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateServiceAsync(service, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteServiceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteServiceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7842/locations/location-7842/services/service-7842"; - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listMetadataImportsTest() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMetadataImportsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMetadataImportsTest2() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listMetadataImportsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getMetadataImportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createMetadataImportExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - MetadataImport metadataImport = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MetadataImport actualResponse = - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateMetadataImportExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MetadataImport metadataImport = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void exportMetadataTest() throws Exception { - MetadataExport expectedResponse = - MetadataExport.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - - MetadataExport actualResponse = client.exportMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void exportMetadataExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - client.exportMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest2() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest3() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void restoreServiceTest4() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void restoreServiceExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String service = "projects/project-9852/locations/location-9852/services/service-9852"; - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBackupsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listBackupsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-4913/locations/location-4913/services/service-4913"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteBackupExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteBackupExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void removeIamPolicyTest() throws Exception { - RemoveIamPolicyResponse expectedResponse = - RemoveIamPolicyResponse.newBuilder().setSuccess(true).build(); - mockService.addResponse(expectedResponse); - - RemoveIamPolicyRequest request = - RemoveIamPolicyRequest.newBuilder() - .setResource( - BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setAsynchronous(true) - .build(); - - RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - RemoveIamPolicyRequest request = - RemoveIamPolicyRequest.newBuilder() - .setResource( - BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setAsynchronous(true) - .build(); - client.removeIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void queryMetadataTest() throws Exception { - QueryMetadataResponse expectedResponse = - QueryMetadataResponse.newBuilder() - .setResultManifestUri("resultManifestUri233134176") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("queryMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - QueryMetadataRequest request = - QueryMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setQuery("query107944136") - .build(); - - QueryMetadataResponse actualResponse = client.queryMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void queryMetadataExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - QueryMetadataRequest request = - QueryMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setQuery("query107944136") - .build(); - client.queryMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void moveTableToDatabaseTest() throws Exception { - MoveTableToDatabaseResponse expectedResponse = MoveTableToDatabaseResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("moveTableToDatabaseTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - MoveTableToDatabaseRequest request = - MoveTableToDatabaseRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setTableName("tableName-1988717703") - .setDbName("dbName-1339126743") - .setDestinationDbName("destinationDbName-2077361705") - .build(); - - MoveTableToDatabaseResponse actualResponse = client.moveTableToDatabaseAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void moveTableToDatabaseExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - MoveTableToDatabaseRequest request = - MoveTableToDatabaseRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setTableName("tableName-1988717703") - .setDbName("dbName-1339126743") - .setDestinationDbName("destinationDbName-2077361705") - .build(); - client.moveTableToDatabaseAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void alterMetadataResourceLocationTest() throws Exception { - AlterMetadataResourceLocationResponse expectedResponse = - AlterMetadataResourceLocationResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("alterMetadataResourceLocationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - AlterMetadataResourceLocationRequest request = - AlterMetadataResourceLocationRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setResourceName("resourceName-384566343") - .setLocationUri("locationUri552310135") - .build(); - - AlterMetadataResourceLocationResponse actualResponse = - client.alterMetadataResourceLocationAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void alterMetadataResourceLocationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AlterMetadataResourceLocationRequest request = - AlterMetadataResourceLocationRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setResourceName("resourceName-384566343") - .setLocationUri("locationUri552310135") - .build(); - client.alterMetadataResourceLocationAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientTest.java deleted file mode 100644 index b474c9ffbc2d..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientTest.java +++ /dev/null @@ -1,1778 +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.v1beta; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; -import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreClientTest { - private static MockDataprocMetastore mockDataprocMetastore; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private DataprocMetastoreClient client; - - @BeforeClass - public static void startStaticServer() { - mockDataprocMetastore = new MockDataprocMetastore(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockDataprocMetastore)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - DataprocMetastoreSettings settings = - DataprocMetastoreSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listServicesTest() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listServicesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listServicesTest2() throws Exception { - Service responsesElement = Service.newBuilder().build(); - ListServicesResponse expectedResponse = - ListServicesResponse.newBuilder() - .setNextPageToken("") - .addAllServices(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListServicesPagedResponse pagedListResponse = client.listServices(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listServicesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listServices(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - Service actualResponse = client.getService(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getService(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(serviceId, actualRequest.getServiceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createServiceTest2() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - - Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(serviceId, actualRequest.getServiceId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - Service service = Service.newBuilder().build(); - String serviceId = "serviceId-194185552"; - client.createServiceAsync(parent, service, serviceId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateServiceTest() throws Exception { - Service expectedResponse = - Service.newBuilder() - .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setNetwork("network1843485230") - .setEndpointUri("endpointUri-1135817833") - .setPort(3446913) - .setStateMessage("stateMessage1128185398") - .setArtifactGcsUri("artifactGcsUri-2145935545") - .setMetadataIntegration(MetadataIntegration.newBuilder().build()) - .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) - .setUid("uid115792") - .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) - .setEncryptionConfig(EncryptionConfig.newBuilder().build()) - .setNetworkConfig(NetworkConfig.newBuilder().build()) - .setTelemetryConfig(TelemetryConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - Service service = Service.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Service actualResponse = client.updateServiceAsync(service, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateServiceRequest actualRequest = ((UpdateServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - Service service = Service.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateServiceAsync(service, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteServiceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteServiceTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteServiceAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.deleteServiceAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void listMetadataImportsTest() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMetadataImportsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listMetadataImportsTest2() throws Exception { - MetadataImport responsesElement = MetadataImport.newBuilder().build(); - ListMetadataImportsResponse expectedResponse = - ListMetadataImportsResponse.newBuilder() - .setNextPageToken("") - .addAllMetadataImports(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listMetadataImportsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listMetadataImports(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - MetadataImportName name = - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - MetadataImport actualResponse = client.getMetadataImport(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getMetadataImportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getMetadataImport(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMetadataImportRequest actualRequest = - ((CreateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createMetadataImportTest2() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - - MetadataImport actualResponse = - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateMetadataImportRequest actualRequest = - ((CreateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createMetadataImportExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - String metadataImportId = "metadataImportId1824548847"; - client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateMetadataImportTest() throws Exception { - MetadataImport expectedResponse = - MetadataImport.newBuilder() - .setName( - MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") - .toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateMetadataImportTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MetadataImport actualResponse = - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateMetadataImportRequest actualRequest = - ((UpdateMetadataImportRequest) actualRequests.get(0)); - - Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateMetadataImportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - MetadataImport metadataImport = MetadataImport.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMetadataImportAsync(metadataImport, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void exportMetadataTest() throws Exception { - MetadataExport expectedResponse = - MetadataExport.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - - MetadataExport actualResponse = client.exportMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportMetadataRequest actualRequest = ((ExportMetadataRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getDestinationGcsFolder(), actualRequest.getDestinationGcsFolder()); - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); - Assert.assertEquals(request.getDatabaseDumpType(), actualRequest.getDatabaseDumpType()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void exportMetadataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ExportMetadataRequest request = - ExportMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setRequestId("requestId693933066") - .build(); - client.exportMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service.toString(), actualRequest.getService()); - Assert.assertEquals(backup.toString(), actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest2() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service.toString(), actualRequest.getService()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest3() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String service = "service1984153269"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(backup.toString(), actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String service = "service1984153269"; - BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void restoreServiceTest4() throws Exception { - Restore expectedResponse = - Restore.newBuilder() - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setDetails("details1557721666") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("restoreServiceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String service = "service1984153269"; - String backup = "backup-1396673086"; - - Restore actualResponse = client.restoreServiceAsync(service, backup).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); - - Assert.assertEquals(service, actualRequest.getService()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void restoreServiceExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String service = "service1984153269"; - String backup = "backup-1396673086"; - client.restoreServiceAsync(service, backup).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void listBackupsTest() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBackupsTest2() throws Exception { - Backup responsesElement = Backup.newBuilder().build(); - ListBackupsResponse expectedResponse = - ListBackupsResponse.newBuilder() - .setNextPageToken("") - .addAllBackups(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBackupsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - client.listBackups(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - mockDataprocMetastore.addResponse(expectedResponse); - - String name = "name3373707"; - - Backup actualResponse = client.getBackup(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.getBackup(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createBackupTest() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createBackupTest2() throws Exception { - Backup expectedResponse = - Backup.newBuilder() - .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setServiceRevision(Service.newBuilder().build()) - .setDescription("description-1724546052") - .addAllRestoringServices(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - - Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(backup, actualRequest.getBackup()); - Assert.assertEquals(backupId, actualRequest.getBackupId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String parent = "parent-995424086"; - Backup backup = Backup.newBuilder().build(); - String backupId = "backupId2121930365"; - client.createBackupAsync(parent, backup, backupId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteBackupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteBackupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteBackupTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteBackupAsync(name).get(); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBackupExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - String name = "name3373707"; - client.deleteBackupAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void removeIamPolicyTest() throws Exception { - RemoveIamPolicyResponse expectedResponse = - RemoveIamPolicyResponse.newBuilder().setSuccess(true).build(); - mockDataprocMetastore.addResponse(expectedResponse); - - RemoveIamPolicyRequest request = - RemoveIamPolicyRequest.newBuilder() - .setResource( - BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setAsynchronous(true) - .build(); - - RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveIamPolicyRequest actualRequest = ((RemoveIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getAsynchronous(), actualRequest.getAsynchronous()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - RemoveIamPolicyRequest request = - RemoveIamPolicyRequest.newBuilder() - .setResource( - BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) - .setAsynchronous(true) - .build(); - client.removeIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void queryMetadataTest() throws Exception { - QueryMetadataResponse expectedResponse = - QueryMetadataResponse.newBuilder() - .setResultManifestUri("resultManifestUri233134176") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("queryMetadataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - QueryMetadataRequest request = - QueryMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setQuery("query107944136") - .build(); - - QueryMetadataResponse actualResponse = client.queryMetadataAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - QueryMetadataRequest actualRequest = ((QueryMetadataRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void queryMetadataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - QueryMetadataRequest request = - QueryMetadataRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setQuery("query107944136") - .build(); - client.queryMetadataAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void moveTableToDatabaseTest() throws Exception { - MoveTableToDatabaseResponse expectedResponse = MoveTableToDatabaseResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("moveTableToDatabaseTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - MoveTableToDatabaseRequest request = - MoveTableToDatabaseRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setTableName("tableName-1988717703") - .setDbName("dbName-1339126743") - .setDestinationDbName("destinationDbName-2077361705") - .build(); - - MoveTableToDatabaseResponse actualResponse = client.moveTableToDatabaseAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - MoveTableToDatabaseRequest actualRequest = ((MoveTableToDatabaseRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getTableName(), actualRequest.getTableName()); - Assert.assertEquals(request.getDbName(), actualRequest.getDbName()); - Assert.assertEquals(request.getDestinationDbName(), actualRequest.getDestinationDbName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void moveTableToDatabaseExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - MoveTableToDatabaseRequest request = - MoveTableToDatabaseRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setTableName("tableName-1988717703") - .setDbName("dbName-1339126743") - .setDestinationDbName("destinationDbName-2077361705") - .build(); - client.moveTableToDatabaseAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void alterMetadataResourceLocationTest() throws Exception { - AlterMetadataResourceLocationResponse expectedResponse = - AlterMetadataResourceLocationResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("alterMetadataResourceLocationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastore.addResponse(resultOperation); - - AlterMetadataResourceLocationRequest request = - AlterMetadataResourceLocationRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setResourceName("resourceName-384566343") - .setLocationUri("locationUri552310135") - .build(); - - AlterMetadataResourceLocationResponse actualResponse = - client.alterMetadataResourceLocationAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastore.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AlterMetadataResourceLocationRequest actualRequest = - ((AlterMetadataResourceLocationRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getService(), actualRequest.getService()); - Assert.assertEquals(request.getResourceName(), actualRequest.getResourceName()); - Assert.assertEquals(request.getLocationUri(), actualRequest.getLocationUri()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void alterMetadataResourceLocationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastore.addException(exception); - - try { - AlterMetadataResourceLocationRequest request = - AlterMetadataResourceLocationRequest.newBuilder() - .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - .setResourceName("resourceName-384566343") - .setLocationUri("locationUri552310135") - .build(); - client.alterMetadataResourceLocationAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientHttpJsonTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientHttpJsonTest.java deleted file mode 100644 index 29b9c878e0e7..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientHttpJsonTest.java +++ /dev/null @@ -1,583 +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.v1beta; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.metastore.v1beta.stub.HttpJsonDataprocMetastoreFederationStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationClientHttpJsonTest { - private static MockHttpService mockService; - private static DataprocMetastoreFederationClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonDataprocMetastoreFederationStub.getMethodDescriptors(), - DataprocMetastoreFederationSettings.getDefaultEndpoint()); - DataprocMetastoreFederationSettings settings = - DataprocMetastoreFederationSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - DataprocMetastoreFederationSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreFederationClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listFederationsTest() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFederationsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFederationsTest2() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFederationsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockService.addResponse(expectedResponse); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Federation federation = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Federation federation = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateFederationAsync(federation, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteFederationTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFederationExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteFederationTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFederationExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientTest.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientTest.java deleted file mode 100644 index b7efdb61ba80..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientTest.java +++ /dev/null @@ -1,532 +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.v1beta; - -import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DataprocMetastoreFederationClientTest { - private static MockDataprocMetastoreFederation mockDataprocMetastoreFederation; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private DataprocMetastoreFederationClient client; - - @BeforeClass - public static void startStaticServer() { - mockDataprocMetastoreFederation = new MockDataprocMetastoreFederation(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockDataprocMetastoreFederation)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - DataprocMetastoreFederationSettings settings = - DataprocMetastoreFederationSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DataprocMetastoreFederationClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listFederationsTest() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFederationsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFederationsTest2() throws Exception { - Federation responsesElement = Federation.newBuilder().build(); - ListFederationsResponse expectedResponse = - ListFederationsResponse.newBuilder() - .setNextPageToken("") - .addAllFederations(Arrays.asList(responsesElement)) - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFederationsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String parent = "parent-995424086"; - client.listFederations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - mockDataprocMetastoreFederation.addResponse(expectedResponse); - - String name = "name3373707"; - - Federation actualResponse = client.getFederation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String name = "name3373707"; - client.getFederation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(federationId, actualRequest.getFederationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void createFederationTest2() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - String parent = "parent-995424086"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - - Federation actualResponse = - client.createFederationAsync(parent, federation, federationId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(federationId, actualRequest.getFederationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String parent = "parent-995424086"; - Federation federation = Federation.newBuilder().build(); - String federationId = "federationId-735921218"; - client.createFederationAsync(parent, federation, federationId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void updateFederationTest() throws Exception { - Federation expectedResponse = - Federation.newBuilder() - .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setVersion("version351608024") - .putAllBackendMetastores(new HashMap()) - .setEndpointUri("endpointUri-1135817833") - .setStateMessage("stateMessage1128185398") - .setUid("uid115792") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - Federation federation = Federation.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateFederationRequest actualRequest = ((UpdateFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(federation, actualRequest.getFederation()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - Federation federation = Federation.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateFederationAsync(federation, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteFederationTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFederationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void deleteFederationTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteFederationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockDataprocMetastoreFederation.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteFederationAsync(name).get(); - - List actualRequests = mockDataprocMetastoreFederation.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFederationExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDataprocMetastoreFederation.addException(exception); - - try { - String name = "name3373707"; - client.deleteFederationAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationGrpc.java b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationGrpc.java deleted file mode 100644 index fdfc190f0b21..000000000000 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationGrpc.java +++ /dev/null @@ -1,915 +0,0 @@ -/* - * Copyright 2020 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 static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *

- * Configures and manages metastore federation services.
- * Dataproc Metastore Federation Service allows federating a collection of
- * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
- * Metastores. The Federation Service exposes a gRPC URL through which metadata
- * from the backend metastores are served at query time.
- * The Dataproc Metastore Federation API defines the following resource model:
- * * The service works with a collection of Google Cloud projects.
- * * Each project has a collection of available locations.
- * * Each location has a collection of federations.
- * * Dataproc Metastore Federations are resources with names of the
- * form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/metastore/v1/metastore_federation.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class DataprocMetastoreFederationGrpc { - - private DataprocMetastoreFederationGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.metastore.v1.DataprocMetastoreFederation"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListFederationsRequest, - com.google.cloud.metastore.v1.ListFederationsResponse> - getListFederationsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListFederations", - requestType = com.google.cloud.metastore.v1.ListFederationsRequest.class, - responseType = com.google.cloud.metastore.v1.ListFederationsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListFederationsRequest, - com.google.cloud.metastore.v1.ListFederationsResponse> - getListFederationsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListFederationsRequest, - com.google.cloud.metastore.v1.ListFederationsResponse> - getListFederationsMethod; - if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) - == null) { - DataprocMetastoreFederationGrpc.getListFederationsMethod = - getListFederationsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFederations")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ListFederationsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ListFederationsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "ListFederations")) - .build(); - } - } - } - return getListFederationsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetFederationRequest, - com.google.cloud.metastore.v1.Federation> - getGetFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetFederation", - requestType = com.google.cloud.metastore.v1.GetFederationRequest.class, - responseType = com.google.cloud.metastore.v1.Federation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetFederationRequest, - com.google.cloud.metastore.v1.Federation> - getGetFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetFederationRequest, - com.google.cloud.metastore.v1.Federation> - getGetFederationMethod; - if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getGetFederationMethod = - getGetFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.GetFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.Federation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier("GetFederation")) - .build(); - } - } - } - return getGetFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateFederationRequest, com.google.longrunning.Operation> - getCreateFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateFederation", - requestType = com.google.cloud.metastore.v1.CreateFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateFederationRequest, com.google.longrunning.Operation> - getCreateFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateFederationRequest, com.google.longrunning.Operation> - getCreateFederationMethod; - if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getCreateFederationMethod = - getCreateFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.CreateFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "CreateFederation")) - .build(); - } - } - } - return getCreateFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateFederationRequest, com.google.longrunning.Operation> - getUpdateFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateFederation", - requestType = com.google.cloud.metastore.v1.UpdateFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateFederationRequest, com.google.longrunning.Operation> - getUpdateFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateFederationRequest, com.google.longrunning.Operation> - getUpdateFederationMethod; - if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getUpdateFederationMethod = - getUpdateFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.UpdateFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "UpdateFederation")) - .build(); - } - } - } - return getUpdateFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteFederationRequest, com.google.longrunning.Operation> - getDeleteFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteFederation", - requestType = com.google.cloud.metastore.v1.DeleteFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteFederationRequest, com.google.longrunning.Operation> - getDeleteFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteFederationRequest, com.google.longrunning.Operation> - getDeleteFederationMethod; - if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getDeleteFederationMethod = - getDeleteFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.DeleteFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "DeleteFederation")) - .build(); - } - } - } - return getDeleteFederationMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static DataprocMetastoreFederationStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DataprocMetastoreFederationBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationBlockingStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static DataprocMetastoreFederationFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationFutureStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - default void listFederations( - com.google.cloud.metastore.v1.ListFederationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListFederationsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - default void getFederation( - com.google.cloud.metastore.v1.GetFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - default void createFederation( - com.google.cloud.metastore.v1.CreateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - default void updateFederation( - com.google.cloud.metastore.v1.UpdateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - default void deleteFederation( - com.google.cloud.metastore.v1.DeleteFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteFederationMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public abstract static class DataprocMetastoreFederationImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return DataprocMetastoreFederationGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationStub - extends io.grpc.stub.AbstractAsyncStub { - private DataprocMetastoreFederationStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public void listFederations( - com.google.cloud.metastore.v1.ListFederationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListFederationsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public void getFederation( - com.google.cloud.metastore.v1.GetFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public void createFederation( - com.google.cloud.metastore.v1.CreateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public void updateFederation( - com.google.cloud.metastore.v1.UpdateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public void deleteFederation( - com.google.cloud.metastore.v1.DeleteFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private DataprocMetastoreFederationBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public com.google.cloud.metastore.v1.ListFederationsResponse listFederations( - com.google.cloud.metastore.v1.ListFederationsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListFederationsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public com.google.cloud.metastore.v1.Federation getFederation( - com.google.cloud.metastore.v1.GetFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public com.google.longrunning.Operation createFederation( - com.google.cloud.metastore.v1.CreateFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public com.google.longrunning.Operation updateFederation( - com.google.cloud.metastore.v1.UpdateFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public com.google.longrunning.Operation deleteFederation( - com.google.cloud.metastore.v1.DeleteFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteFederationMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service - * DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationFutureStub - extends io.grpc.stub.AbstractFutureStub { - private DataprocMetastoreFederationFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1.ListFederationsResponse> - listFederations(com.google.cloud.metastore.v1.ListFederationsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListFederationsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1.Federation> - getFederation(com.google.cloud.metastore.v1.GetFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createFederation(com.google.cloud.metastore.v1.CreateFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateFederation(com.google.cloud.metastore.v1.UpdateFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteFederation(com.google.cloud.metastore.v1.DeleteFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_FEDERATIONS = 0; - private static final int METHODID_GET_FEDERATION = 1; - private static final int METHODID_CREATE_FEDERATION = 2; - private static final int METHODID_UPDATE_FEDERATION = 3; - private static final int METHODID_DELETE_FEDERATION = 4; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_FEDERATIONS: - serviceImpl.listFederations( - (com.google.cloud.metastore.v1.ListFederationsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_FEDERATION: - serviceImpl.getFederation( - (com.google.cloud.metastore.v1.GetFederationRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_FEDERATION: - serviceImpl.createFederation( - (com.google.cloud.metastore.v1.CreateFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_FEDERATION: - serviceImpl.updateFederation( - (com.google.cloud.metastore.v1.UpdateFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_FEDERATION: - serviceImpl.deleteFederation( - (com.google.cloud.metastore.v1.DeleteFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListFederationsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.ListFederationsRequest, - com.google.cloud.metastore.v1.ListFederationsResponse>( - service, METHODID_LIST_FEDERATIONS))) - .addMethod( - getGetFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.GetFederationRequest, - com.google.cloud.metastore.v1.Federation>(service, METHODID_GET_FEDERATION))) - .addMethod( - getCreateFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.CreateFederationRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_FEDERATION))) - .addMethod( - getUpdateFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.UpdateFederationRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_FEDERATION))) - .addMethod( - getDeleteFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.DeleteFederationRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_FEDERATION))) - .build(); - } - - private abstract static class DataprocMetastoreFederationBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DataprocMetastoreFederationBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DataprocMetastoreFederation"); - } - } - - private static final class DataprocMetastoreFederationFileDescriptorSupplier - extends DataprocMetastoreFederationBaseDescriptorSupplier { - DataprocMetastoreFederationFileDescriptorSupplier() {} - } - - private static final class DataprocMetastoreFederationMethodDescriptorSupplier - extends DataprocMetastoreFederationBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - DataprocMetastoreFederationMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DataprocMetastoreFederationFileDescriptorSupplier()) - .addMethod(getListFederationsMethod()) - .addMethod(getGetFederationMethod()) - .addMethod(getCreateFederationMethod()) - .addMethod(getUpdateFederationMethod()) - .addMethod(getDeleteFederationMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreGrpc.java b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreGrpc.java deleted file mode 100644 index b255f38240ee..000000000000 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreGrpc.java +++ /dev/null @@ -1,2066 +0,0 @@ -/* - * Copyright 2020 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 static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * 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:
- * * The service works with a collection of Google Cloud projects, named:
- * `/projects/*`
- * * Each project has a collection of available locations, named: `/locations/*`
- *   (a location must refer to a Google Cloud `region`)
- * * Each location has a collection of services, named: `/services/*`
- * * Dataproc Metastore services are resources with names of the form:
- *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/metastore/v1/metastore.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class DataprocMetastoreGrpc { - - private DataprocMetastoreGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.metastore.v1.DataprocMetastore"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListServicesRequest, - com.google.cloud.metastore.v1.ListServicesResponse> - getListServicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListServices", - requestType = com.google.cloud.metastore.v1.ListServicesRequest.class, - responseType = com.google.cloud.metastore.v1.ListServicesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListServicesRequest, - com.google.cloud.metastore.v1.ListServicesResponse> - getListServicesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListServicesRequest, - com.google.cloud.metastore.v1.ListServicesResponse> - getListServicesMethod; - if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { - DataprocMetastoreGrpc.getListServicesMethod = - getListServicesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ListServicesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ListServicesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListServices")) - .build(); - } - } - } - return getListServicesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetServiceRequest, com.google.cloud.metastore.v1.Service> - getGetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetService", - requestType = com.google.cloud.metastore.v1.GetServiceRequest.class, - responseType = com.google.cloud.metastore.v1.Service.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetServiceRequest, com.google.cloud.metastore.v1.Service> - getGetServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetServiceRequest, com.google.cloud.metastore.v1.Service> - getGetServiceMethod; - if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { - DataprocMetastoreGrpc.getGetServiceMethod = - getGetServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.GetServiceRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.Service.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetService")) - .build(); - } - } - } - return getGetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateServiceRequest, com.google.longrunning.Operation> - getCreateServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateService", - requestType = com.google.cloud.metastore.v1.CreateServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateServiceRequest, com.google.longrunning.Operation> - getCreateServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateServiceRequest, com.google.longrunning.Operation> - getCreateServiceMethod; - if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { - DataprocMetastoreGrpc.getCreateServiceMethod = - getCreateServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.CreateServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateService")) - .build(); - } - } - } - return getCreateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateServiceRequest, com.google.longrunning.Operation> - getUpdateServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateService", - requestType = com.google.cloud.metastore.v1.UpdateServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateServiceRequest, com.google.longrunning.Operation> - getUpdateServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateServiceRequest, com.google.longrunning.Operation> - getUpdateServiceMethod; - if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { - DataprocMetastoreGrpc.getUpdateServiceMethod = - getUpdateServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.UpdateServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("UpdateService")) - .build(); - } - } - } - return getUpdateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteServiceRequest, com.google.longrunning.Operation> - getDeleteServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteService", - requestType = com.google.cloud.metastore.v1.DeleteServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteServiceRequest, com.google.longrunning.Operation> - getDeleteServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteServiceRequest, com.google.longrunning.Operation> - getDeleteServiceMethod; - if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { - DataprocMetastoreGrpc.getDeleteServiceMethod = - getDeleteServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.DeleteServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("DeleteService")) - .build(); - } - } - } - return getDeleteServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListMetadataImportsRequest, - com.google.cloud.metastore.v1.ListMetadataImportsResponse> - getListMetadataImportsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListMetadataImports", - requestType = com.google.cloud.metastore.v1.ListMetadataImportsRequest.class, - responseType = com.google.cloud.metastore.v1.ListMetadataImportsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListMetadataImportsRequest, - com.google.cloud.metastore.v1.ListMetadataImportsResponse> - getListMetadataImportsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListMetadataImportsRequest, - com.google.cloud.metastore.v1.ListMetadataImportsResponse> - getListMetadataImportsMethod; - if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) - == null) { - DataprocMetastoreGrpc.getListMetadataImportsMethod = - getListMetadataImportsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListMetadataImports")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ListMetadataImportsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ListMetadataImportsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListMetadataImports")) - .build(); - } - } - } - return getListMetadataImportsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetMetadataImportRequest, - com.google.cloud.metastore.v1.MetadataImport> - getGetMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetMetadataImport", - requestType = com.google.cloud.metastore.v1.GetMetadataImportRequest.class, - responseType = com.google.cloud.metastore.v1.MetadataImport.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetMetadataImportRequest, - com.google.cloud.metastore.v1.MetadataImport> - getGetMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetMetadataImportRequest, - com.google.cloud.metastore.v1.MetadataImport> - getGetMetadataImportMethod; - if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getGetMetadataImportMethod = - getGetMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.GetMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetMetadataImport")) - .build(); - } - } - } - return getGetMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateMetadataImport", - requestType = com.google.cloud.metastore.v1.CreateMetadataImportRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod; - if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getCreateMetadataImportMethod = - getCreateMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.CreateMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateMetadataImport")) - .build(); - } - } - } - return getCreateMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateMetadataImport", - requestType = com.google.cloud.metastore.v1.UpdateMetadataImportRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod; - if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getUpdateMetadataImportMethod = - getUpdateMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "UpdateMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.UpdateMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("UpdateMetadataImport")) - .build(); - } - } - } - return getUpdateMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ExportMetadataRequest, com.google.longrunning.Operation> - getExportMetadataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ExportMetadata", - requestType = com.google.cloud.metastore.v1.ExportMetadataRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ExportMetadataRequest, com.google.longrunning.Operation> - getExportMetadataMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ExportMetadataRequest, com.google.longrunning.Operation> - getExportMetadataMethod; - if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { - DataprocMetastoreGrpc.getExportMetadataMethod = - getExportMetadataMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportMetadata")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ExportMetadataRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ExportMetadata")) - .build(); - } - } - } - return getExportMetadataMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.RestoreServiceRequest, com.google.longrunning.Operation> - getRestoreServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RestoreService", - requestType = com.google.cloud.metastore.v1.RestoreServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.RestoreServiceRequest, com.google.longrunning.Operation> - getRestoreServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.RestoreServiceRequest, com.google.longrunning.Operation> - getRestoreServiceMethod; - if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { - DataprocMetastoreGrpc.getRestoreServiceMethod = - getRestoreServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.RestoreServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("RestoreService")) - .build(); - } - } - } - return getRestoreServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListBackupsRequest, - com.google.cloud.metastore.v1.ListBackupsResponse> - getListBackupsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListBackups", - requestType = com.google.cloud.metastore.v1.ListBackupsRequest.class, - responseType = com.google.cloud.metastore.v1.ListBackupsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListBackupsRequest, - com.google.cloud.metastore.v1.ListBackupsResponse> - getListBackupsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.ListBackupsRequest, - com.google.cloud.metastore.v1.ListBackupsResponse> - getListBackupsMethod; - if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { - DataprocMetastoreGrpc.getListBackupsMethod = - getListBackupsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ListBackupsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.ListBackupsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListBackups")) - .build(); - } - } - } - return getListBackupsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetBackupRequest, com.google.cloud.metastore.v1.Backup> - getGetBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBackup", - requestType = com.google.cloud.metastore.v1.GetBackupRequest.class, - responseType = com.google.cloud.metastore.v1.Backup.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetBackupRequest, com.google.cloud.metastore.v1.Backup> - getGetBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.GetBackupRequest, com.google.cloud.metastore.v1.Backup> - getGetBackupMethod; - if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { - DataprocMetastoreGrpc.getGetBackupMethod = - getGetBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.GetBackupRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.Backup.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetBackup")) - .build(); - } - } - } - return getGetBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateBackupRequest, com.google.longrunning.Operation> - getCreateBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateBackup", - requestType = com.google.cloud.metastore.v1.CreateBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateBackupRequest, com.google.longrunning.Operation> - getCreateBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.CreateBackupRequest, com.google.longrunning.Operation> - getCreateBackupMethod; - if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { - DataprocMetastoreGrpc.getCreateBackupMethod = - getCreateBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.CreateBackupRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateBackup")) - .build(); - } - } - } - return getCreateBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteBackupRequest, com.google.longrunning.Operation> - getDeleteBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", - requestType = com.google.cloud.metastore.v1.DeleteBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteBackupRequest, com.google.longrunning.Operation> - getDeleteBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1.DeleteBackupRequest, com.google.longrunning.Operation> - getDeleteBackupMethod; - if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { - DataprocMetastoreGrpc.getDeleteBackupMethod = - getDeleteBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1.DeleteBackupRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("DeleteBackup")) - .build(); - } - } - } - return getDeleteBackupMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static DataprocMetastoreStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreStub(channel, callOptions); - } - }; - return DataprocMetastoreStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DataprocMetastoreBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreBlockingStub(channel, callOptions); - } - }; - return DataprocMetastoreBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static DataprocMetastoreFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFutureStub(channel, callOptions); - } - }; - return DataprocMetastoreFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - default void listServices( - com.google.cloud.metastore.v1.ListServicesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListServicesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - default void getService( - com.google.cloud.metastore.v1.GetServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - default void createService( - com.google.cloud.metastore.v1.CreateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - default void updateService( - com.google.cloud.metastore.v1.UpdateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - default void deleteService( - com.google.cloud.metastore.v1.DeleteServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - default void listMetadataImports( - com.google.cloud.metastore.v1.ListMetadataImportsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListMetadataImportsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - default void getMetadataImport( - com.google.cloud.metastore.v1.GetMetadataImportRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - default void createMetadataImport( - com.google.cloud.metastore.v1.CreateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - default void updateMetadataImport( - com.google.cloud.metastore.v1.UpdateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - default void exportMetadata( - com.google.cloud.metastore.v1.ExportMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getExportMetadataMethod(), responseObserver); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - default void restoreService( - com.google.cloud.metastore.v1.RestoreServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRestoreServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - default void listBackups( - com.google.cloud.metastore.v1.ListBackupsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListBackupsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - default void getBackup( - com.google.cloud.metastore.v1.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - default void createBackup( - com.google.cloud.metastore.v1.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateBackupMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - default void deleteBackup( - com.google.cloud.metastore.v1.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteBackupMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public abstract static class DataprocMetastoreImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return DataprocMetastoreGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreStub - extends io.grpc.stub.AbstractAsyncStub { - private DataprocMetastoreStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public void listServices( - com.google.cloud.metastore.v1.ListServicesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public void getService( - com.google.cloud.metastore.v1.GetServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public void createService( - com.google.cloud.metastore.v1.CreateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public void updateService( - com.google.cloud.metastore.v1.UpdateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public void deleteService( - com.google.cloud.metastore.v1.DeleteServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public void listMetadataImports( - com.google.cloud.metastore.v1.ListMetadataImportsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public void getMetadataImport( - com.google.cloud.metastore.v1.GetMetadataImportRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public void createMetadataImport( - com.google.cloud.metastore.v1.CreateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public void updateMetadataImport( - com.google.cloud.metastore.v1.UpdateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public void exportMetadata( - com.google.cloud.metastore.v1.ExportMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getExportMetadataMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public void restoreService( - com.google.cloud.metastore.v1.RestoreServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public void listBackups( - com.google.cloud.metastore.v1.ListBackupsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public void getBackup( - com.google.cloud.metastore.v1.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public void createBackup( - com.google.cloud.metastore.v1.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public void deleteBackup( - com.google.cloud.metastore.v1.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private DataprocMetastoreBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public com.google.cloud.metastore.v1.ListServicesResponse listServices( - com.google.cloud.metastore.v1.ListServicesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListServicesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public com.google.cloud.metastore.v1.Service getService( - com.google.cloud.metastore.v1.GetServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public com.google.longrunning.Operation createService( - com.google.cloud.metastore.v1.CreateServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public com.google.longrunning.Operation updateService( - com.google.cloud.metastore.v1.UpdateServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public com.google.longrunning.Operation deleteService( - com.google.cloud.metastore.v1.DeleteServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public com.google.cloud.metastore.v1.ListMetadataImportsResponse listMetadataImports( - com.google.cloud.metastore.v1.ListMetadataImportsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListMetadataImportsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public com.google.cloud.metastore.v1.MetadataImport getMetadataImport( - com.google.cloud.metastore.v1.GetMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public com.google.longrunning.Operation createMetadataImport( - com.google.cloud.metastore.v1.CreateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public com.google.longrunning.Operation updateMetadataImport( - com.google.cloud.metastore.v1.UpdateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public com.google.longrunning.Operation exportMetadata( - com.google.cloud.metastore.v1.ExportMetadataRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getExportMetadataMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public com.google.longrunning.Operation restoreService( - com.google.cloud.metastore.v1.RestoreServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRestoreServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public com.google.cloud.metastore.v1.ListBackupsResponse listBackups( - com.google.cloud.metastore.v1.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListBackupsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public com.google.cloud.metastore.v1.Backup getBackup( - com.google.cloud.metastore.v1.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBackupMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public com.google.longrunning.Operation createBackup( - com.google.cloud.metastore.v1.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateBackupMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public com.google.longrunning.Operation deleteBackup( - com.google.cloud.metastore.v1.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteBackupMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreFutureStub - extends io.grpc.stub.AbstractFutureStub { - private DataprocMetastoreFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1.ListServicesResponse> - listServices(com.google.cloud.metastore.v1.ListServicesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getService(com.google.cloud.metastore.v1.GetServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createService(com.google.cloud.metastore.v1.CreateServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateService(com.google.cloud.metastore.v1.UpdateServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteService(com.google.cloud.metastore.v1.DeleteServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1.ListMetadataImportsResponse> - listMetadataImports(com.google.cloud.metastore.v1.ListMetadataImportsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1.MetadataImport> - getMetadataImport(com.google.cloud.metastore.v1.GetMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createMetadataImport(com.google.cloud.metastore.v1.CreateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateMetadataImport(com.google.cloud.metastore.v1.UpdateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - exportMetadata(com.google.cloud.metastore.v1.ExportMetadataRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - restoreService(com.google.cloud.metastore.v1.RestoreServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1.ListBackupsResponse> - listBackups(com.google.cloud.metastore.v1.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getBackup(com.google.cloud.metastore.v1.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createBackup(com.google.cloud.metastore.v1.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteBackup(com.google.cloud.metastore.v1.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_SERVICES = 0; - private static final int METHODID_GET_SERVICE = 1; - private static final int METHODID_CREATE_SERVICE = 2; - private static final int METHODID_UPDATE_SERVICE = 3; - private static final int METHODID_DELETE_SERVICE = 4; - private static final int METHODID_LIST_METADATA_IMPORTS = 5; - private static final int METHODID_GET_METADATA_IMPORT = 6; - private static final int METHODID_CREATE_METADATA_IMPORT = 7; - private static final int METHODID_UPDATE_METADATA_IMPORT = 8; - private static final int METHODID_EXPORT_METADATA = 9; - private static final int METHODID_RESTORE_SERVICE = 10; - private static final int METHODID_LIST_BACKUPS = 11; - private static final int METHODID_GET_BACKUP = 12; - private static final int METHODID_CREATE_BACKUP = 13; - private static final int METHODID_DELETE_BACKUP = 14; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_SERVICES: - serviceImpl.listServices( - (com.google.cloud.metastore.v1.ListServicesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_SERVICE: - serviceImpl.getService( - (com.google.cloud.metastore.v1.GetServiceRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_SERVICE: - serviceImpl.createService( - (com.google.cloud.metastore.v1.CreateServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SERVICE: - serviceImpl.updateService( - (com.google.cloud.metastore.v1.UpdateServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SERVICE: - serviceImpl.deleteService( - (com.google.cloud.metastore.v1.DeleteServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_METADATA_IMPORTS: - serviceImpl.listMetadataImports( - (com.google.cloud.metastore.v1.ListMetadataImportsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.metastore.v1.ListMetadataImportsResponse>) - responseObserver); - break; - case METHODID_GET_METADATA_IMPORT: - serviceImpl.getMetadataImport( - (com.google.cloud.metastore.v1.GetMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_METADATA_IMPORT: - serviceImpl.createMetadataImport( - (com.google.cloud.metastore.v1.CreateMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_METADATA_IMPORT: - serviceImpl.updateMetadataImport( - (com.google.cloud.metastore.v1.UpdateMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_EXPORT_METADATA: - serviceImpl.exportMetadata( - (com.google.cloud.metastore.v1.ExportMetadataRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_RESTORE_SERVICE: - serviceImpl.restoreService( - (com.google.cloud.metastore.v1.RestoreServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_BACKUPS: - serviceImpl.listBackups( - (com.google.cloud.metastore.v1.ListBackupsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_BACKUP: - serviceImpl.getBackup( - (com.google.cloud.metastore.v1.GetBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_BACKUP: - serviceImpl.createBackup( - (com.google.cloud.metastore.v1.CreateBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_BACKUP: - serviceImpl.deleteBackup( - (com.google.cloud.metastore.v1.DeleteBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListServicesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.ListServicesRequest, - com.google.cloud.metastore.v1.ListServicesResponse>( - service, METHODID_LIST_SERVICES))) - .addMethod( - getGetServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.GetServiceRequest, - com.google.cloud.metastore.v1.Service>(service, METHODID_GET_SERVICE))) - .addMethod( - getCreateServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.CreateServiceRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_SERVICE))) - .addMethod( - getUpdateServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.UpdateServiceRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_SERVICE))) - .addMethod( - getDeleteServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.DeleteServiceRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_SERVICE))) - .addMethod( - getListMetadataImportsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.ListMetadataImportsRequest, - com.google.cloud.metastore.v1.ListMetadataImportsResponse>( - service, METHODID_LIST_METADATA_IMPORTS))) - .addMethod( - getGetMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.GetMetadataImportRequest, - com.google.cloud.metastore.v1.MetadataImport>( - service, METHODID_GET_METADATA_IMPORT))) - .addMethod( - getCreateMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.CreateMetadataImportRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_METADATA_IMPORT))) - .addMethod( - getUpdateMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.UpdateMetadataImportRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_METADATA_IMPORT))) - .addMethod( - getExportMetadataMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.ExportMetadataRequest, - com.google.longrunning.Operation>(service, METHODID_EXPORT_METADATA))) - .addMethod( - getRestoreServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.RestoreServiceRequest, - com.google.longrunning.Operation>(service, METHODID_RESTORE_SERVICE))) - .addMethod( - getListBackupsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.ListBackupsRequest, - com.google.cloud.metastore.v1.ListBackupsResponse>( - service, METHODID_LIST_BACKUPS))) - .addMethod( - getGetBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.GetBackupRequest, - com.google.cloud.metastore.v1.Backup>(service, METHODID_GET_BACKUP))) - .addMethod( - getCreateBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.CreateBackupRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_BACKUP))) - .addMethod( - getDeleteBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1.DeleteBackupRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP))) - .build(); - } - - private abstract static class DataprocMetastoreBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DataprocMetastoreBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DataprocMetastore"); - } - } - - private static final class DataprocMetastoreFileDescriptorSupplier - extends DataprocMetastoreBaseDescriptorSupplier { - DataprocMetastoreFileDescriptorSupplier() {} - } - - private static final class DataprocMetastoreMethodDescriptorSupplier - extends DataprocMetastoreBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - DataprocMetastoreMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DataprocMetastoreGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DataprocMetastoreFileDescriptorSupplier()) - .addMethod(getListServicesMethod()) - .addMethod(getGetServiceMethod()) - .addMethod(getCreateServiceMethod()) - .addMethod(getUpdateServiceMethod()) - .addMethod(getDeleteServiceMethod()) - .addMethod(getListMetadataImportsMethod()) - .addMethod(getGetMetadataImportMethod()) - .addMethod(getCreateMetadataImportMethod()) - .addMethod(getUpdateMetadataImportMethod()) - .addMethod(getExportMetadataMethod()) - .addMethod(getRestoreServiceMethod()) - .addMethod(getListBackupsMethod()) - .addMethod(getGetBackupMethod()) - .addMethod(getCreateBackupMethod()) - .addMethod(getDeleteBackupMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationGrpc.java b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationGrpc.java deleted file mode 100644 index a54605395690..000000000000 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationGrpc.java +++ /dev/null @@ -1,929 +0,0 @@ -/* - * Copyright 2020 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.v1alpha; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Configures and manages metastore federation services.
- * Dataproc Metastore Federation Service allows federating a collection of
- * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
- * Metastores. The Federation Service exposes a gRPC URL through which metadata
- * from the backend metastores are served at query time.
- * The Dataproc Metastore Federation API defines the following resource model:
- * * The service works with a collection of Google Cloud projects.
- * * Each project has a collection of available locations.
- * * Each location has a collection of federations.
- * * Dataproc Metastore Federations are resources with names of the
- * form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/metastore/v1alpha/metastore_federation.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class DataprocMetastoreFederationGrpc { - - private DataprocMetastoreFederationGrpc() {} - - public static final String SERVICE_NAME = - "google.cloud.metastore.v1alpha.DataprocMetastoreFederation"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListFederationsRequest, - com.google.cloud.metastore.v1alpha.ListFederationsResponse> - getListFederationsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListFederations", - requestType = com.google.cloud.metastore.v1alpha.ListFederationsRequest.class, - responseType = com.google.cloud.metastore.v1alpha.ListFederationsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListFederationsRequest, - com.google.cloud.metastore.v1alpha.ListFederationsResponse> - getListFederationsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListFederationsRequest, - com.google.cloud.metastore.v1alpha.ListFederationsResponse> - getListFederationsMethod; - if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) - == null) { - DataprocMetastoreFederationGrpc.getListFederationsMethod = - getListFederationsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFederations")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ListFederationsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ListFederationsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "ListFederations")) - .build(); - } - } - } - return getListFederationsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetFederationRequest, - com.google.cloud.metastore.v1alpha.Federation> - getGetFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetFederation", - requestType = com.google.cloud.metastore.v1alpha.GetFederationRequest.class, - responseType = com.google.cloud.metastore.v1alpha.Federation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetFederationRequest, - com.google.cloud.metastore.v1alpha.Federation> - getGetFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetFederationRequest, - com.google.cloud.metastore.v1alpha.Federation> - getGetFederationMethod; - if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getGetFederationMethod = - getGetFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.GetFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier("GetFederation")) - .build(); - } - } - } - return getGetFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateFederationRequest, - com.google.longrunning.Operation> - getCreateFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateFederation", - requestType = com.google.cloud.metastore.v1alpha.CreateFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateFederationRequest, - com.google.longrunning.Operation> - getCreateFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateFederationRequest, - com.google.longrunning.Operation> - getCreateFederationMethod; - if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getCreateFederationMethod = - getCreateFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.CreateFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "CreateFederation")) - .build(); - } - } - } - return getCreateFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateFederationRequest, - com.google.longrunning.Operation> - getUpdateFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateFederation", - requestType = com.google.cloud.metastore.v1alpha.UpdateFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateFederationRequest, - com.google.longrunning.Operation> - getUpdateFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateFederationRequest, - com.google.longrunning.Operation> - getUpdateFederationMethod; - if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getUpdateFederationMethod = - getUpdateFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.UpdateFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "UpdateFederation")) - .build(); - } - } - } - return getUpdateFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteFederationRequest, - com.google.longrunning.Operation> - getDeleteFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteFederation", - requestType = com.google.cloud.metastore.v1alpha.DeleteFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteFederationRequest, - com.google.longrunning.Operation> - getDeleteFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteFederationRequest, - com.google.longrunning.Operation> - getDeleteFederationMethod; - if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getDeleteFederationMethod = - getDeleteFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.DeleteFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "DeleteFederation")) - .build(); - } - } - } - return getDeleteFederationMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static DataprocMetastoreFederationStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DataprocMetastoreFederationBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationBlockingStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static DataprocMetastoreFederationFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationFutureStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - default void listFederations( - com.google.cloud.metastore.v1alpha.ListFederationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListFederationsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - default void getFederation( - com.google.cloud.metastore.v1alpha.GetFederationRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - default void createFederation( - com.google.cloud.metastore.v1alpha.CreateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - default void updateFederation( - com.google.cloud.metastore.v1alpha.UpdateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - default void deleteFederation( - com.google.cloud.metastore.v1alpha.DeleteFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteFederationMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public abstract static class DataprocMetastoreFederationImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return DataprocMetastoreFederationGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationStub - extends io.grpc.stub.AbstractAsyncStub { - private DataprocMetastoreFederationStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public void listFederations( - com.google.cloud.metastore.v1alpha.ListFederationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListFederationsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public void getFederation( - com.google.cloud.metastore.v1alpha.GetFederationRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public void createFederation( - com.google.cloud.metastore.v1alpha.CreateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public void updateFederation( - com.google.cloud.metastore.v1alpha.UpdateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public void deleteFederation( - com.google.cloud.metastore.v1alpha.DeleteFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private DataprocMetastoreFederationBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public com.google.cloud.metastore.v1alpha.ListFederationsResponse listFederations( - com.google.cloud.metastore.v1alpha.ListFederationsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListFederationsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public com.google.cloud.metastore.v1alpha.Federation getFederation( - com.google.cloud.metastore.v1alpha.GetFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public com.google.longrunning.Operation createFederation( - com.google.cloud.metastore.v1alpha.CreateFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public com.google.longrunning.Operation updateFederation( - com.google.cloud.metastore.v1alpha.UpdateFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public com.google.longrunning.Operation deleteFederation( - com.google.cloud.metastore.v1alpha.DeleteFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteFederationMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service - * DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationFutureStub - extends io.grpc.stub.AbstractFutureStub { - private DataprocMetastoreFederationFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.ListFederationsResponse> - listFederations(com.google.cloud.metastore.v1alpha.ListFederationsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListFederationsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.Federation> - getFederation(com.google.cloud.metastore.v1alpha.GetFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createFederation(com.google.cloud.metastore.v1alpha.CreateFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateFederation(com.google.cloud.metastore.v1alpha.UpdateFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteFederation(com.google.cloud.metastore.v1alpha.DeleteFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_FEDERATIONS = 0; - private static final int METHODID_GET_FEDERATION = 1; - private static final int METHODID_CREATE_FEDERATION = 2; - private static final int METHODID_UPDATE_FEDERATION = 3; - private static final int METHODID_DELETE_FEDERATION = 4; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_FEDERATIONS: - serviceImpl.listFederations( - (com.google.cloud.metastore.v1alpha.ListFederationsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.metastore.v1alpha.ListFederationsResponse>) - responseObserver); - break; - case METHODID_GET_FEDERATION: - serviceImpl.getFederation( - (com.google.cloud.metastore.v1alpha.GetFederationRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_FEDERATION: - serviceImpl.createFederation( - (com.google.cloud.metastore.v1alpha.CreateFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_FEDERATION: - serviceImpl.updateFederation( - (com.google.cloud.metastore.v1alpha.UpdateFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_FEDERATION: - serviceImpl.deleteFederation( - (com.google.cloud.metastore.v1alpha.DeleteFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListFederationsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.ListFederationsRequest, - com.google.cloud.metastore.v1alpha.ListFederationsResponse>( - service, METHODID_LIST_FEDERATIONS))) - .addMethod( - getGetFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.GetFederationRequest, - com.google.cloud.metastore.v1alpha.Federation>( - service, METHODID_GET_FEDERATION))) - .addMethod( - getCreateFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.CreateFederationRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_FEDERATION))) - .addMethod( - getUpdateFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.UpdateFederationRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_FEDERATION))) - .addMethod( - getDeleteFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.DeleteFederationRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_FEDERATION))) - .build(); - } - - private abstract static class DataprocMetastoreFederationBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DataprocMetastoreFederationBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DataprocMetastoreFederation"); - } - } - - private static final class DataprocMetastoreFederationFileDescriptorSupplier - extends DataprocMetastoreFederationBaseDescriptorSupplier { - DataprocMetastoreFederationFileDescriptorSupplier() {} - } - - private static final class DataprocMetastoreFederationMethodDescriptorSupplier - extends DataprocMetastoreFederationBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - DataprocMetastoreFederationMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DataprocMetastoreFederationFileDescriptorSupplier()) - .addMethod(getListFederationsMethod()) - .addMethod(getGetFederationMethod()) - .addMethod(getCreateFederationMethod()) - .addMethod(getUpdateFederationMethod()) - .addMethod(getDeleteFederationMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreGrpc.java b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreGrpc.java deleted file mode 100644 index 8609e87d0c99..000000000000 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreGrpc.java +++ /dev/null @@ -1,2580 +0,0 @@ -/* - * Copyright 2020 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.v1alpha; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * 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:
- * * The service works with a collection of Google Cloud projects, named:
- * `/projects/*`
- * * Each project has a collection of available locations, named: `/locations/*`
- *   (a location must refer to a Google Cloud `region`)
- * * Each location has a collection of services, named: `/services/*`
- * * Dataproc Metastore services are resources with names of the form:
- *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/metastore/v1alpha/metastore.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class DataprocMetastoreGrpc { - - private DataprocMetastoreGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.metastore.v1alpha.DataprocMetastore"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListServicesRequest, - com.google.cloud.metastore.v1alpha.ListServicesResponse> - getListServicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListServices", - requestType = com.google.cloud.metastore.v1alpha.ListServicesRequest.class, - responseType = com.google.cloud.metastore.v1alpha.ListServicesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListServicesRequest, - com.google.cloud.metastore.v1alpha.ListServicesResponse> - getListServicesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListServicesRequest, - com.google.cloud.metastore.v1alpha.ListServicesResponse> - getListServicesMethod; - if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { - DataprocMetastoreGrpc.getListServicesMethod = - getListServicesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ListServicesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ListServicesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListServices")) - .build(); - } - } - } - return getListServicesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetServiceRequest, - com.google.cloud.metastore.v1alpha.Service> - getGetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetService", - requestType = com.google.cloud.metastore.v1alpha.GetServiceRequest.class, - responseType = com.google.cloud.metastore.v1alpha.Service.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetServiceRequest, - com.google.cloud.metastore.v1alpha.Service> - getGetServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetServiceRequest, - com.google.cloud.metastore.v1alpha.Service> - getGetServiceMethod; - if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { - DataprocMetastoreGrpc.getGetServiceMethod = - getGetServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.GetServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.Service.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetService")) - .build(); - } - } - } - return getGetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateServiceRequest, com.google.longrunning.Operation> - getCreateServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateService", - requestType = com.google.cloud.metastore.v1alpha.CreateServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateServiceRequest, com.google.longrunning.Operation> - getCreateServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateServiceRequest, - com.google.longrunning.Operation> - getCreateServiceMethod; - if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { - DataprocMetastoreGrpc.getCreateServiceMethod = - getCreateServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.CreateServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateService")) - .build(); - } - } - } - return getCreateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateServiceRequest, com.google.longrunning.Operation> - getUpdateServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateService", - requestType = com.google.cloud.metastore.v1alpha.UpdateServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateServiceRequest, com.google.longrunning.Operation> - getUpdateServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateServiceRequest, - com.google.longrunning.Operation> - getUpdateServiceMethod; - if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { - DataprocMetastoreGrpc.getUpdateServiceMethod = - getUpdateServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.UpdateServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("UpdateService")) - .build(); - } - } - } - return getUpdateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteServiceRequest, com.google.longrunning.Operation> - getDeleteServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteService", - requestType = com.google.cloud.metastore.v1alpha.DeleteServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteServiceRequest, com.google.longrunning.Operation> - getDeleteServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteServiceRequest, - com.google.longrunning.Operation> - getDeleteServiceMethod; - if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { - DataprocMetastoreGrpc.getDeleteServiceMethod = - getDeleteServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.DeleteServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("DeleteService")) - .build(); - } - } - } - return getDeleteServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest, - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse> - getListMetadataImportsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListMetadataImports", - requestType = com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.class, - responseType = com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest, - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse> - getListMetadataImportsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest, - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse> - getListMetadataImportsMethod; - if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) - == null) { - DataprocMetastoreGrpc.getListMetadataImportsMethod = - getListMetadataImportsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListMetadataImports")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListMetadataImports")) - .build(); - } - } - } - return getListMetadataImportsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest, - com.google.cloud.metastore.v1alpha.MetadataImport> - getGetMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetMetadataImport", - requestType = com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.class, - responseType = com.google.cloud.metastore.v1alpha.MetadataImport.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest, - com.google.cloud.metastore.v1alpha.MetadataImport> - getGetMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest, - com.google.cloud.metastore.v1alpha.MetadataImport> - getGetMetadataImportMethod; - if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getGetMetadataImportMethod = - getGetMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.MetadataImport - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetMetadataImport")) - .build(); - } - } - } - return getGetMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateMetadataImport", - requestType = com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod; - if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getCreateMetadataImportMethod = - getCreateMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateMetadataImport")) - .build(); - } - } - } - return getCreateMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateMetadataImport", - requestType = com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod; - if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getUpdateMetadataImportMethod = - getUpdateMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "UpdateMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("UpdateMetadataImport")) - .build(); - } - } - } - return getUpdateMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ExportMetadataRequest, - com.google.longrunning.Operation> - getExportMetadataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ExportMetadata", - requestType = com.google.cloud.metastore.v1alpha.ExportMetadataRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ExportMetadataRequest, - com.google.longrunning.Operation> - getExportMetadataMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ExportMetadataRequest, - com.google.longrunning.Operation> - getExportMetadataMethod; - if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { - DataprocMetastoreGrpc.getExportMetadataMethod = - getExportMetadataMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportMetadata")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ExportMetadataRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ExportMetadata")) - .build(); - } - } - } - return getExportMetadataMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.RestoreServiceRequest, - com.google.longrunning.Operation> - getRestoreServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RestoreService", - requestType = com.google.cloud.metastore.v1alpha.RestoreServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.RestoreServiceRequest, - com.google.longrunning.Operation> - getRestoreServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.RestoreServiceRequest, - com.google.longrunning.Operation> - getRestoreServiceMethod; - if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { - DataprocMetastoreGrpc.getRestoreServiceMethod = - getRestoreServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.RestoreServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("RestoreService")) - .build(); - } - } - } - return getRestoreServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListBackupsRequest, - com.google.cloud.metastore.v1alpha.ListBackupsResponse> - getListBackupsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListBackups", - requestType = com.google.cloud.metastore.v1alpha.ListBackupsRequest.class, - responseType = com.google.cloud.metastore.v1alpha.ListBackupsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListBackupsRequest, - com.google.cloud.metastore.v1alpha.ListBackupsResponse> - getListBackupsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.ListBackupsRequest, - com.google.cloud.metastore.v1alpha.ListBackupsResponse> - getListBackupsMethod; - if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { - DataprocMetastoreGrpc.getListBackupsMethod = - getListBackupsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ListBackupsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.ListBackupsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListBackups")) - .build(); - } - } - } - return getListBackupsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetBackupRequest, - com.google.cloud.metastore.v1alpha.Backup> - getGetBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBackup", - requestType = com.google.cloud.metastore.v1alpha.GetBackupRequest.class, - responseType = com.google.cloud.metastore.v1alpha.Backup.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetBackupRequest, - com.google.cloud.metastore.v1alpha.Backup> - getGetBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.GetBackupRequest, - com.google.cloud.metastore.v1alpha.Backup> - getGetBackupMethod; - if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { - DataprocMetastoreGrpc.getGetBackupMethod = - getGetBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.GetBackupRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetBackup")) - .build(); - } - } - } - return getGetBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateBackupRequest, com.google.longrunning.Operation> - getCreateBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateBackup", - requestType = com.google.cloud.metastore.v1alpha.CreateBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateBackupRequest, com.google.longrunning.Operation> - getCreateBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.CreateBackupRequest, - com.google.longrunning.Operation> - getCreateBackupMethod; - if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { - DataprocMetastoreGrpc.getCreateBackupMethod = - getCreateBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.CreateBackupRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateBackup")) - .build(); - } - } - } - return getCreateBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteBackupRequest, com.google.longrunning.Operation> - getDeleteBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", - requestType = com.google.cloud.metastore.v1alpha.DeleteBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteBackupRequest, com.google.longrunning.Operation> - getDeleteBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.DeleteBackupRequest, - com.google.longrunning.Operation> - getDeleteBackupMethod; - if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { - DataprocMetastoreGrpc.getDeleteBackupMethod = - getDeleteBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.DeleteBackupRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("DeleteBackup")) - .build(); - } - } - } - return getDeleteBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest, - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse> - getRemoveIamPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveIamPolicy", - requestType = com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.class, - responseType = com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest, - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse> - getRemoveIamPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest, - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse> - getRemoveIamPolicyMethod; - if ((getRemoveIamPolicyMethod = DataprocMetastoreGrpc.getRemoveIamPolicyMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getRemoveIamPolicyMethod = DataprocMetastoreGrpc.getRemoveIamPolicyMethod) == null) { - DataprocMetastoreGrpc.getRemoveIamPolicyMethod = - getRemoveIamPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveIamPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("RemoveIamPolicy")) - .build(); - } - } - } - return getRemoveIamPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.QueryMetadataRequest, com.google.longrunning.Operation> - getQueryMetadataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "QueryMetadata", - requestType = com.google.cloud.metastore.v1alpha.QueryMetadataRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.QueryMetadataRequest, com.google.longrunning.Operation> - getQueryMetadataMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.QueryMetadataRequest, - com.google.longrunning.Operation> - getQueryMetadataMethod; - if ((getQueryMetadataMethod = DataprocMetastoreGrpc.getQueryMetadataMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getQueryMetadataMethod = DataprocMetastoreGrpc.getQueryMetadataMethod) == null) { - DataprocMetastoreGrpc.getQueryMetadataMethod = - getQueryMetadataMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryMetadata")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.QueryMetadataRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("QueryMetadata")) - .build(); - } - } - } - return getQueryMetadataMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest, - com.google.longrunning.Operation> - getMoveTableToDatabaseMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "MoveTableToDatabase", - requestType = com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest, - com.google.longrunning.Operation> - getMoveTableToDatabaseMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest, - com.google.longrunning.Operation> - getMoveTableToDatabaseMethod; - if ((getMoveTableToDatabaseMethod = DataprocMetastoreGrpc.getMoveTableToDatabaseMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getMoveTableToDatabaseMethod = DataprocMetastoreGrpc.getMoveTableToDatabaseMethod) - == null) { - DataprocMetastoreGrpc.getMoveTableToDatabaseMethod = - getMoveTableToDatabaseMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "MoveTableToDatabase")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("MoveTableToDatabase")) - .build(); - } - } - } - return getMoveTableToDatabaseMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest, - com.google.longrunning.Operation> - getAlterMetadataResourceLocationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AlterMetadataResourceLocation", - requestType = com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest, - com.google.longrunning.Operation> - getAlterMetadataResourceLocationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest, - com.google.longrunning.Operation> - getAlterMetadataResourceLocationMethod; - if ((getAlterMetadataResourceLocationMethod = - DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getAlterMetadataResourceLocationMethod = - DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod) - == null) { - DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod = - getAlterMetadataResourceLocationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "AlterMetadataResourceLocation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1alpha - .AlterMetadataResourceLocationRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier( - "AlterMetadataResourceLocation")) - .build(); - } - } - } - return getAlterMetadataResourceLocationMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static DataprocMetastoreStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreStub(channel, callOptions); - } - }; - return DataprocMetastoreStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DataprocMetastoreBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreBlockingStub(channel, callOptions); - } - }; - return DataprocMetastoreBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static DataprocMetastoreFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFutureStub(channel, callOptions); - } - }; - return DataprocMetastoreFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - default void listServices( - com.google.cloud.metastore.v1alpha.ListServicesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListServicesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - default void getService( - com.google.cloud.metastore.v1alpha.GetServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - default void createService( - com.google.cloud.metastore.v1alpha.CreateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - default void updateService( - com.google.cloud.metastore.v1alpha.UpdateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - default void deleteService( - com.google.cloud.metastore.v1alpha.DeleteServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - default void listMetadataImports( - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListMetadataImportsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - default void getMetadataImport( - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - default void createMetadataImport( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - default void updateMetadataImport( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - default void exportMetadata( - com.google.cloud.metastore.v1alpha.ExportMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getExportMetadataMethod(), responseObserver); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - default void restoreService( - com.google.cloud.metastore.v1alpha.RestoreServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRestoreServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - default void listBackups( - com.google.cloud.metastore.v1alpha.ListBackupsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListBackupsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - default void getBackup( - com.google.cloud.metastore.v1alpha.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - default void createBackup( - com.google.cloud.metastore.v1alpha.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateBackupMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - default void deleteBackup( - com.google.cloud.metastore.v1alpha.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteBackupMethod(), responseObserver); - } - - /** - * - * - *
-     * Removes the attached IAM policies for a resource
-     * 
- */ - default void removeIamPolicy( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRemoveIamPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Query DPMS metadata.
-     * 
- */ - default void queryMetadata( - com.google.cloud.metastore.v1alpha.QueryMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getQueryMetadataMethod(), responseObserver); - } - - /** - * - * - *
-     * Move a table to another database.
-     * 
- */ - default void moveTableToDatabase( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getMoveTableToDatabaseMethod(), responseObserver); - } - - /** - * - * - *
-     * Alter metadata resource location. The metadata resource can be a database,
-     * table, or partition. This functionality only updates the parent directory
-     * for the respective metadata resource and does not transfer any existing
-     * data to the new location.
-     * 
- */ - default void alterMetadataResourceLocation( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getAlterMetadataResourceLocationMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public abstract static class DataprocMetastoreImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return DataprocMetastoreGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreStub - extends io.grpc.stub.AbstractAsyncStub { - private DataprocMetastoreStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public void listServices( - com.google.cloud.metastore.v1alpha.ListServicesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public void getService( - com.google.cloud.metastore.v1alpha.GetServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public void createService( - com.google.cloud.metastore.v1alpha.CreateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public void updateService( - com.google.cloud.metastore.v1alpha.UpdateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public void deleteService( - com.google.cloud.metastore.v1alpha.DeleteServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public void listMetadataImports( - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public void getMetadataImport( - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public void createMetadataImport( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public void updateMetadataImport( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public void exportMetadata( - com.google.cloud.metastore.v1alpha.ExportMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getExportMetadataMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public void restoreService( - com.google.cloud.metastore.v1alpha.RestoreServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public void listBackups( - com.google.cloud.metastore.v1alpha.ListBackupsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public void getBackup( - com.google.cloud.metastore.v1alpha.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public void createBackup( - com.google.cloud.metastore.v1alpha.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public void deleteBackup( - com.google.cloud.metastore.v1alpha.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Removes the attached IAM policies for a resource
-     * 
- */ - public void removeIamPolicy( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Query DPMS metadata.
-     * 
- */ - public void queryMetadata( - com.google.cloud.metastore.v1alpha.QueryMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getQueryMetadataMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Move a table to another database.
-     * 
- */ - public void moveTableToDatabase( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getMoveTableToDatabaseMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Alter metadata resource location. The metadata resource can be a database,
-     * table, or partition. This functionality only updates the parent directory
-     * for the respective metadata resource and does not transfer any existing
-     * data to the new location.
-     * 
- */ - public void alterMetadataResourceLocation( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private DataprocMetastoreBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public com.google.cloud.metastore.v1alpha.ListServicesResponse listServices( - com.google.cloud.metastore.v1alpha.ListServicesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListServicesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public com.google.cloud.metastore.v1alpha.Service getService( - com.google.cloud.metastore.v1alpha.GetServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public com.google.longrunning.Operation createService( - com.google.cloud.metastore.v1alpha.CreateServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public com.google.longrunning.Operation updateService( - com.google.cloud.metastore.v1alpha.UpdateServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public com.google.longrunning.Operation deleteService( - com.google.cloud.metastore.v1alpha.DeleteServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse listMetadataImports( - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListMetadataImportsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport( - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public com.google.longrunning.Operation createMetadataImport( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public com.google.longrunning.Operation updateMetadataImport( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public com.google.longrunning.Operation exportMetadata( - com.google.cloud.metastore.v1alpha.ExportMetadataRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getExportMetadataMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public com.google.longrunning.Operation restoreService( - com.google.cloud.metastore.v1alpha.RestoreServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRestoreServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public com.google.cloud.metastore.v1alpha.ListBackupsResponse listBackups( - com.google.cloud.metastore.v1alpha.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListBackupsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public com.google.cloud.metastore.v1alpha.Backup getBackup( - com.google.cloud.metastore.v1alpha.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBackupMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public com.google.longrunning.Operation createBackup( - com.google.cloud.metastore.v1alpha.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateBackupMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public com.google.longrunning.Operation deleteBackup( - com.google.cloud.metastore.v1alpha.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteBackupMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Removes the attached IAM policies for a resource
-     * 
- */ - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse removeIamPolicy( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveIamPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Query DPMS metadata.
-     * 
- */ - public com.google.longrunning.Operation queryMetadata( - com.google.cloud.metastore.v1alpha.QueryMetadataRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getQueryMetadataMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Move a table to another database.
-     * 
- */ - public com.google.longrunning.Operation moveTableToDatabase( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMoveTableToDatabaseMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Alter metadata resource location. The metadata resource can be a database,
-     * table, or partition. This functionality only updates the parent directory
-     * for the respective metadata resource and does not transfer any existing
-     * data to the new location.
-     * 
- */ - public com.google.longrunning.Operation alterMetadataResourceLocation( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAlterMetadataResourceLocationMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreFutureStub - extends io.grpc.stub.AbstractFutureStub { - private DataprocMetastoreFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.ListServicesResponse> - listServices(com.google.cloud.metastore.v1alpha.ListServicesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.Service> - getService(com.google.cloud.metastore.v1alpha.GetServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createService(com.google.cloud.metastore.v1alpha.CreateServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateService(com.google.cloud.metastore.v1alpha.UpdateServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteService(com.google.cloud.metastore.v1alpha.DeleteServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse> - listMetadataImports(com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.MetadataImport> - getMetadataImport(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createMetadataImport( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateMetadataImport( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - exportMetadata(com.google.cloud.metastore.v1alpha.ExportMetadataRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - restoreService(com.google.cloud.metastore.v1alpha.RestoreServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.ListBackupsResponse> - listBackups(com.google.cloud.metastore.v1alpha.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.Backup> - getBackup(com.google.cloud.metastore.v1alpha.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createBackup(com.google.cloud.metastore.v1alpha.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteBackup(com.google.cloud.metastore.v1alpha.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Removes the attached IAM policies for a resource
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse> - removeIamPolicy(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Query DPMS metadata.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - queryMetadata(com.google.cloud.metastore.v1alpha.QueryMetadataRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getQueryMetadataMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Move a table to another database.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - moveTableToDatabase(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMoveTableToDatabaseMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Alter metadata resource location. The metadata resource can be a database,
-     * table, or partition. This functionality only updates the parent directory
-     * for the respective metadata resource and does not transfer any existing
-     * data to the new location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - alterMetadataResourceLocation( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), - request); - } - } - - private static final int METHODID_LIST_SERVICES = 0; - private static final int METHODID_GET_SERVICE = 1; - private static final int METHODID_CREATE_SERVICE = 2; - private static final int METHODID_UPDATE_SERVICE = 3; - private static final int METHODID_DELETE_SERVICE = 4; - private static final int METHODID_LIST_METADATA_IMPORTS = 5; - private static final int METHODID_GET_METADATA_IMPORT = 6; - private static final int METHODID_CREATE_METADATA_IMPORT = 7; - private static final int METHODID_UPDATE_METADATA_IMPORT = 8; - private static final int METHODID_EXPORT_METADATA = 9; - private static final int METHODID_RESTORE_SERVICE = 10; - private static final int METHODID_LIST_BACKUPS = 11; - private static final int METHODID_GET_BACKUP = 12; - private static final int METHODID_CREATE_BACKUP = 13; - private static final int METHODID_DELETE_BACKUP = 14; - private static final int METHODID_REMOVE_IAM_POLICY = 15; - private static final int METHODID_QUERY_METADATA = 16; - private static final int METHODID_MOVE_TABLE_TO_DATABASE = 17; - private static final int METHODID_ALTER_METADATA_RESOURCE_LOCATION = 18; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_SERVICES: - serviceImpl.listServices( - (com.google.cloud.metastore.v1alpha.ListServicesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_SERVICE: - serviceImpl.getService( - (com.google.cloud.metastore.v1alpha.GetServiceRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_SERVICE: - serviceImpl.createService( - (com.google.cloud.metastore.v1alpha.CreateServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SERVICE: - serviceImpl.updateService( - (com.google.cloud.metastore.v1alpha.UpdateServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SERVICE: - serviceImpl.deleteService( - (com.google.cloud.metastore.v1alpha.DeleteServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_METADATA_IMPORTS: - serviceImpl.listMetadataImports( - (com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse>) - responseObserver); - break; - case METHODID_GET_METADATA_IMPORT: - serviceImpl.getMetadataImport( - (com.google.cloud.metastore.v1alpha.GetMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_METADATA_IMPORT: - serviceImpl.createMetadataImport( - (com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_METADATA_IMPORT: - serviceImpl.updateMetadataImport( - (com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_EXPORT_METADATA: - serviceImpl.exportMetadata( - (com.google.cloud.metastore.v1alpha.ExportMetadataRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_RESTORE_SERVICE: - serviceImpl.restoreService( - (com.google.cloud.metastore.v1alpha.RestoreServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_BACKUPS: - serviceImpl.listBackups( - (com.google.cloud.metastore.v1alpha.ListBackupsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_BACKUP: - serviceImpl.getBackup( - (com.google.cloud.metastore.v1alpha.GetBackupRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_BACKUP: - serviceImpl.createBackup( - (com.google.cloud.metastore.v1alpha.CreateBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_BACKUP: - serviceImpl.deleteBackup( - (com.google.cloud.metastore.v1alpha.DeleteBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_IAM_POLICY: - serviceImpl.removeIamPolicy( - (com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse>) - responseObserver); - break; - case METHODID_QUERY_METADATA: - serviceImpl.queryMetadata( - (com.google.cloud.metastore.v1alpha.QueryMetadataRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_MOVE_TABLE_TO_DATABASE: - serviceImpl.moveTableToDatabase( - (com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ALTER_METADATA_RESOURCE_LOCATION: - serviceImpl.alterMetadataResourceLocation( - (com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListServicesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.ListServicesRequest, - com.google.cloud.metastore.v1alpha.ListServicesResponse>( - service, METHODID_LIST_SERVICES))) - .addMethod( - getGetServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.GetServiceRequest, - com.google.cloud.metastore.v1alpha.Service>(service, METHODID_GET_SERVICE))) - .addMethod( - getCreateServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.CreateServiceRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_SERVICE))) - .addMethod( - getUpdateServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.UpdateServiceRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_SERVICE))) - .addMethod( - getDeleteServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.DeleteServiceRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_SERVICE))) - .addMethod( - getListMetadataImportsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest, - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse>( - service, METHODID_LIST_METADATA_IMPORTS))) - .addMethod( - getGetMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest, - com.google.cloud.metastore.v1alpha.MetadataImport>( - service, METHODID_GET_METADATA_IMPORT))) - .addMethod( - getCreateMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_METADATA_IMPORT))) - .addMethod( - getUpdateMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_METADATA_IMPORT))) - .addMethod( - getExportMetadataMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.ExportMetadataRequest, - com.google.longrunning.Operation>(service, METHODID_EXPORT_METADATA))) - .addMethod( - getRestoreServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.RestoreServiceRequest, - com.google.longrunning.Operation>(service, METHODID_RESTORE_SERVICE))) - .addMethod( - getListBackupsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.ListBackupsRequest, - com.google.cloud.metastore.v1alpha.ListBackupsResponse>( - service, METHODID_LIST_BACKUPS))) - .addMethod( - getGetBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.GetBackupRequest, - com.google.cloud.metastore.v1alpha.Backup>(service, METHODID_GET_BACKUP))) - .addMethod( - getCreateBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.CreateBackupRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_BACKUP))) - .addMethod( - getDeleteBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.DeleteBackupRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP))) - .addMethod( - getRemoveIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest, - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse>( - service, METHODID_REMOVE_IAM_POLICY))) - .addMethod( - getQueryMetadataMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.QueryMetadataRequest, - com.google.longrunning.Operation>(service, METHODID_QUERY_METADATA))) - .addMethod( - getMoveTableToDatabaseMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest, - com.google.longrunning.Operation>(service, METHODID_MOVE_TABLE_TO_DATABASE))) - .addMethod( - getAlterMetadataResourceLocationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest, - com.google.longrunning.Operation>( - service, METHODID_ALTER_METADATA_RESOURCE_LOCATION))) - .build(); - } - - private abstract static class DataprocMetastoreBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DataprocMetastoreBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DataprocMetastore"); - } - } - - private static final class DataprocMetastoreFileDescriptorSupplier - extends DataprocMetastoreBaseDescriptorSupplier { - DataprocMetastoreFileDescriptorSupplier() {} - } - - private static final class DataprocMetastoreMethodDescriptorSupplier - extends DataprocMetastoreBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - DataprocMetastoreMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DataprocMetastoreGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DataprocMetastoreFileDescriptorSupplier()) - .addMethod(getListServicesMethod()) - .addMethod(getGetServiceMethod()) - .addMethod(getCreateServiceMethod()) - .addMethod(getUpdateServiceMethod()) - .addMethod(getDeleteServiceMethod()) - .addMethod(getListMetadataImportsMethod()) - .addMethod(getGetMetadataImportMethod()) - .addMethod(getCreateMetadataImportMethod()) - .addMethod(getUpdateMetadataImportMethod()) - .addMethod(getExportMetadataMethod()) - .addMethod(getRestoreServiceMethod()) - .addMethod(getListBackupsMethod()) - .addMethod(getGetBackupMethod()) - .addMethod(getCreateBackupMethod()) - .addMethod(getDeleteBackupMethod()) - .addMethod(getRemoveIamPolicyMethod()) - .addMethod(getQueryMetadataMethod()) - .addMethod(getMoveTableToDatabaseMethod()) - .addMethod(getAlterMetadataResourceLocationMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationGrpc.java b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationGrpc.java deleted file mode 100644 index 271ca1eced9a..000000000000 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationGrpc.java +++ /dev/null @@ -1,929 +0,0 @@ -/* - * Copyright 2020 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.v1beta; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Configures and manages metastore federation services.
- * Dataproc Metastore Federation Service allows federating a collection of
- * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
- * Metastores. The Federation Service exposes a gRPC URL through which metadata
- * from the backend metastores are served at query time.
- * The Dataproc Metastore Federation API defines the following resource model:
- * * The service works with a collection of Google Cloud projects.
- * * Each project has a collection of available locations.
- * * Each location has a collection of federations.
- * * Dataproc Metastore Federations are resources with names of the
- * form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/metastore/v1beta/metastore_federation.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class DataprocMetastoreFederationGrpc { - - private DataprocMetastoreFederationGrpc() {} - - public static final String SERVICE_NAME = - "google.cloud.metastore.v1beta.DataprocMetastoreFederation"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListFederationsRequest, - com.google.cloud.metastore.v1beta.ListFederationsResponse> - getListFederationsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListFederations", - requestType = com.google.cloud.metastore.v1beta.ListFederationsRequest.class, - responseType = com.google.cloud.metastore.v1beta.ListFederationsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListFederationsRequest, - com.google.cloud.metastore.v1beta.ListFederationsResponse> - getListFederationsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListFederationsRequest, - com.google.cloud.metastore.v1beta.ListFederationsResponse> - getListFederationsMethod; - if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) - == null) { - DataprocMetastoreFederationGrpc.getListFederationsMethod = - getListFederationsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFederations")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ListFederationsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ListFederationsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "ListFederations")) - .build(); - } - } - } - return getListFederationsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetFederationRequest, - com.google.cloud.metastore.v1beta.Federation> - getGetFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetFederation", - requestType = com.google.cloud.metastore.v1beta.GetFederationRequest.class, - responseType = com.google.cloud.metastore.v1beta.Federation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetFederationRequest, - com.google.cloud.metastore.v1beta.Federation> - getGetFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetFederationRequest, - com.google.cloud.metastore.v1beta.Federation> - getGetFederationMethod; - if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getGetFederationMethod = - getGetFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.GetFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.Federation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier("GetFederation")) - .build(); - } - } - } - return getGetFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateFederationRequest, - com.google.longrunning.Operation> - getCreateFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateFederation", - requestType = com.google.cloud.metastore.v1beta.CreateFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateFederationRequest, - com.google.longrunning.Operation> - getCreateFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateFederationRequest, - com.google.longrunning.Operation> - getCreateFederationMethod; - if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getCreateFederationMethod = - getCreateFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.CreateFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "CreateFederation")) - .build(); - } - } - } - return getCreateFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateFederationRequest, - com.google.longrunning.Operation> - getUpdateFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateFederation", - requestType = com.google.cloud.metastore.v1beta.UpdateFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateFederationRequest, - com.google.longrunning.Operation> - getUpdateFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateFederationRequest, - com.google.longrunning.Operation> - getUpdateFederationMethod; - if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getUpdateFederationMethod = - getUpdateFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.UpdateFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "UpdateFederation")) - .build(); - } - } - } - return getUpdateFederationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteFederationRequest, - com.google.longrunning.Operation> - getDeleteFederationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteFederation", - requestType = com.google.cloud.metastore.v1beta.DeleteFederationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteFederationRequest, - com.google.longrunning.Operation> - getDeleteFederationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteFederationRequest, - com.google.longrunning.Operation> - getDeleteFederationMethod; - if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) - == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) - == null) { - DataprocMetastoreFederationGrpc.getDeleteFederationMethod = - getDeleteFederationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFederation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.DeleteFederationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreFederationMethodDescriptorSupplier( - "DeleteFederation")) - .build(); - } - } - } - return getDeleteFederationMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static DataprocMetastoreFederationStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DataprocMetastoreFederationBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationBlockingStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static DataprocMetastoreFederationFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFederationFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationFutureStub(channel, callOptions); - } - }; - return DataprocMetastoreFederationFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - default void listFederations( - com.google.cloud.metastore.v1beta.ListFederationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListFederationsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - default void getFederation( - com.google.cloud.metastore.v1beta.GetFederationRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - default void createFederation( - com.google.cloud.metastore.v1beta.CreateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - default void updateFederation( - com.google.cloud.metastore.v1beta.UpdateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateFederationMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - default void deleteFederation( - com.google.cloud.metastore.v1beta.DeleteFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteFederationMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public abstract static class DataprocMetastoreFederationImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return DataprocMetastoreFederationGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationStub - extends io.grpc.stub.AbstractAsyncStub { - private DataprocMetastoreFederationStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public void listFederations( - com.google.cloud.metastore.v1beta.ListFederationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListFederationsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public void getFederation( - com.google.cloud.metastore.v1beta.GetFederationRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public void createFederation( - com.google.cloud.metastore.v1beta.CreateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public void updateFederation( - com.google.cloud.metastore.v1beta.UpdateFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public void deleteFederation( - com.google.cloud.metastore.v1beta.DeleteFederationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private DataprocMetastoreFederationBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public com.google.cloud.metastore.v1beta.ListFederationsResponse listFederations( - com.google.cloud.metastore.v1beta.ListFederationsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListFederationsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public com.google.cloud.metastore.v1beta.Federation getFederation( - com.google.cloud.metastore.v1beta.GetFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public com.google.longrunning.Operation createFederation( - com.google.cloud.metastore.v1beta.CreateFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public com.google.longrunning.Operation updateFederation( - com.google.cloud.metastore.v1beta.UpdateFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateFederationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public com.google.longrunning.Operation deleteFederation( - com.google.cloud.metastore.v1beta.DeleteFederationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteFederationMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service - * DataprocMetastoreFederation. - * - *
-   * Configures and manages metastore federation services.
-   * Dataproc Metastore Federation Service allows federating a collection of
-   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
-   * Metastores. The Federation Service exposes a gRPC URL through which metadata
-   * from the backend metastores are served at query time.
-   * The Dataproc Metastore Federation API defines the following resource model:
-   * * The service works with a collection of Google Cloud projects.
-   * * Each project has a collection of available locations.
-   * * Each location has a collection of federations.
-   * * Dataproc Metastore Federations are resources with names of the
-   * form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- */ - public static final class DataprocMetastoreFederationFutureStub - extends io.grpc.stub.AbstractFutureStub { - private DataprocMetastoreFederationFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFederationFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFederationFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists federations in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.ListFederationsResponse> - listFederations(com.google.cloud.metastore.v1beta.ListFederationsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListFederationsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a single federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.Federation> - getFederation(com.google.cloud.metastore.v1beta.GetFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a metastore federation in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createFederation(com.google.cloud.metastore.v1beta.CreateFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the fields of a federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateFederation(com.google.cloud.metastore.v1beta.UpdateFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single federation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteFederation(com.google.cloud.metastore.v1beta.DeleteFederationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_FEDERATIONS = 0; - private static final int METHODID_GET_FEDERATION = 1; - private static final int METHODID_CREATE_FEDERATION = 2; - private static final int METHODID_UPDATE_FEDERATION = 3; - private static final int METHODID_DELETE_FEDERATION = 4; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_FEDERATIONS: - serviceImpl.listFederations( - (com.google.cloud.metastore.v1beta.ListFederationsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.metastore.v1beta.ListFederationsResponse>) - responseObserver); - break; - case METHODID_GET_FEDERATION: - serviceImpl.getFederation( - (com.google.cloud.metastore.v1beta.GetFederationRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_FEDERATION: - serviceImpl.createFederation( - (com.google.cloud.metastore.v1beta.CreateFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_FEDERATION: - serviceImpl.updateFederation( - (com.google.cloud.metastore.v1beta.UpdateFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_FEDERATION: - serviceImpl.deleteFederation( - (com.google.cloud.metastore.v1beta.DeleteFederationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListFederationsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.ListFederationsRequest, - com.google.cloud.metastore.v1beta.ListFederationsResponse>( - service, METHODID_LIST_FEDERATIONS))) - .addMethod( - getGetFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.GetFederationRequest, - com.google.cloud.metastore.v1beta.Federation>( - service, METHODID_GET_FEDERATION))) - .addMethod( - getCreateFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.CreateFederationRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_FEDERATION))) - .addMethod( - getUpdateFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.UpdateFederationRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_FEDERATION))) - .addMethod( - getDeleteFederationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.DeleteFederationRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_FEDERATION))) - .build(); - } - - private abstract static class DataprocMetastoreFederationBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DataprocMetastoreFederationBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DataprocMetastoreFederation"); - } - } - - private static final class DataprocMetastoreFederationFileDescriptorSupplier - extends DataprocMetastoreFederationBaseDescriptorSupplier { - DataprocMetastoreFederationFileDescriptorSupplier() {} - } - - private static final class DataprocMetastoreFederationMethodDescriptorSupplier - extends DataprocMetastoreFederationBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - DataprocMetastoreFederationMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DataprocMetastoreFederationGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DataprocMetastoreFederationFileDescriptorSupplier()) - .addMethod(getListFederationsMethod()) - .addMethod(getGetFederationMethod()) - .addMethod(getCreateFederationMethod()) - .addMethod(getUpdateFederationMethod()) - .addMethod(getDeleteFederationMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreGrpc.java b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreGrpc.java deleted file mode 100644 index 4e2a425982d9..000000000000 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreGrpc.java +++ /dev/null @@ -1,2574 +0,0 @@ -/* - * Copyright 2020 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.v1beta; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * 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:
- * * The service works with a collection of Google Cloud projects, named:
- * `/projects/*`
- * * Each project has a collection of available locations, named: `/locations/*`
- *   (a location must refer to a Google Cloud `region`)
- * * Each location has a collection of services, named: `/services/*`
- * * Dataproc Metastore services are resources with names of the form:
- *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/metastore/v1beta/metastore.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class DataprocMetastoreGrpc { - - private DataprocMetastoreGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.metastore.v1beta.DataprocMetastore"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListServicesRequest, - com.google.cloud.metastore.v1beta.ListServicesResponse> - getListServicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListServices", - requestType = com.google.cloud.metastore.v1beta.ListServicesRequest.class, - responseType = com.google.cloud.metastore.v1beta.ListServicesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListServicesRequest, - com.google.cloud.metastore.v1beta.ListServicesResponse> - getListServicesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListServicesRequest, - com.google.cloud.metastore.v1beta.ListServicesResponse> - getListServicesMethod; - if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { - DataprocMetastoreGrpc.getListServicesMethod = - getListServicesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ListServicesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ListServicesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListServices")) - .build(); - } - } - } - return getListServicesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetServiceRequest, - com.google.cloud.metastore.v1beta.Service> - getGetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetService", - requestType = com.google.cloud.metastore.v1beta.GetServiceRequest.class, - responseType = com.google.cloud.metastore.v1beta.Service.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetServiceRequest, - com.google.cloud.metastore.v1beta.Service> - getGetServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetServiceRequest, - com.google.cloud.metastore.v1beta.Service> - getGetServiceMethod; - if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { - DataprocMetastoreGrpc.getGetServiceMethod = - getGetServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.GetServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.Service.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetService")) - .build(); - } - } - } - return getGetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateServiceRequest, com.google.longrunning.Operation> - getCreateServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateService", - requestType = com.google.cloud.metastore.v1beta.CreateServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateServiceRequest, com.google.longrunning.Operation> - getCreateServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateServiceRequest, - com.google.longrunning.Operation> - getCreateServiceMethod; - if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { - DataprocMetastoreGrpc.getCreateServiceMethod = - getCreateServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.CreateServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateService")) - .build(); - } - } - } - return getCreateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateServiceRequest, com.google.longrunning.Operation> - getUpdateServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateService", - requestType = com.google.cloud.metastore.v1beta.UpdateServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateServiceRequest, com.google.longrunning.Operation> - getUpdateServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateServiceRequest, - com.google.longrunning.Operation> - getUpdateServiceMethod; - if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { - DataprocMetastoreGrpc.getUpdateServiceMethod = - getUpdateServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.UpdateServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("UpdateService")) - .build(); - } - } - } - return getUpdateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteServiceRequest, com.google.longrunning.Operation> - getDeleteServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteService", - requestType = com.google.cloud.metastore.v1beta.DeleteServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteServiceRequest, com.google.longrunning.Operation> - getDeleteServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteServiceRequest, - com.google.longrunning.Operation> - getDeleteServiceMethod; - if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { - DataprocMetastoreGrpc.getDeleteServiceMethod = - getDeleteServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.DeleteServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("DeleteService")) - .build(); - } - } - } - return getDeleteServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest, - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse> - getListMetadataImportsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListMetadataImports", - requestType = com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.class, - responseType = com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest, - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse> - getListMetadataImportsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest, - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse> - getListMetadataImportsMethod; - if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) - == null) { - DataprocMetastoreGrpc.getListMetadataImportsMethod = - getListMetadataImportsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListMetadataImports")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListMetadataImports")) - .build(); - } - } - } - return getListMetadataImportsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetMetadataImportRequest, - com.google.cloud.metastore.v1beta.MetadataImport> - getGetMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetMetadataImport", - requestType = com.google.cloud.metastore.v1beta.GetMetadataImportRequest.class, - responseType = com.google.cloud.metastore.v1beta.MetadataImport.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetMetadataImportRequest, - com.google.cloud.metastore.v1beta.MetadataImport> - getGetMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetMetadataImportRequest, - com.google.cloud.metastore.v1beta.MetadataImport> - getGetMetadataImportMethod; - if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getGetMetadataImportMethod = - getGetMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.GetMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.MetadataImport - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetMetadataImport")) - .build(); - } - } - } - return getGetMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateMetadataImport", - requestType = com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest, - com.google.longrunning.Operation> - getCreateMetadataImportMethod; - if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getCreateMetadataImportMethod = - getCreateMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateMetadataImport")) - .build(); - } - } - } - return getCreateMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateMetadataImport", - requestType = com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest, - com.google.longrunning.Operation> - getUpdateMetadataImportMethod; - if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) - == null) { - DataprocMetastoreGrpc.getUpdateMetadataImportMethod = - getUpdateMetadataImportMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "UpdateMetadataImport")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("UpdateMetadataImport")) - .build(); - } - } - } - return getUpdateMetadataImportMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ExportMetadataRequest, com.google.longrunning.Operation> - getExportMetadataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ExportMetadata", - requestType = com.google.cloud.metastore.v1beta.ExportMetadataRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ExportMetadataRequest, com.google.longrunning.Operation> - getExportMetadataMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ExportMetadataRequest, - com.google.longrunning.Operation> - getExportMetadataMethod; - if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { - DataprocMetastoreGrpc.getExportMetadataMethod = - getExportMetadataMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportMetadata")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ExportMetadataRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ExportMetadata")) - .build(); - } - } - } - return getExportMetadataMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.RestoreServiceRequest, com.google.longrunning.Operation> - getRestoreServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RestoreService", - requestType = com.google.cloud.metastore.v1beta.RestoreServiceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.RestoreServiceRequest, com.google.longrunning.Operation> - getRestoreServiceMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.RestoreServiceRequest, - com.google.longrunning.Operation> - getRestoreServiceMethod; - if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { - DataprocMetastoreGrpc.getRestoreServiceMethod = - getRestoreServiceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.RestoreServiceRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("RestoreService")) - .build(); - } - } - } - return getRestoreServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListBackupsRequest, - com.google.cloud.metastore.v1beta.ListBackupsResponse> - getListBackupsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListBackups", - requestType = com.google.cloud.metastore.v1beta.ListBackupsRequest.class, - responseType = com.google.cloud.metastore.v1beta.ListBackupsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListBackupsRequest, - com.google.cloud.metastore.v1beta.ListBackupsResponse> - getListBackupsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.ListBackupsRequest, - com.google.cloud.metastore.v1beta.ListBackupsResponse> - getListBackupsMethod; - if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { - DataprocMetastoreGrpc.getListBackupsMethod = - getListBackupsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ListBackupsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.ListBackupsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("ListBackups")) - .build(); - } - } - } - return getListBackupsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetBackupRequest, - com.google.cloud.metastore.v1beta.Backup> - getGetBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBackup", - requestType = com.google.cloud.metastore.v1beta.GetBackupRequest.class, - responseType = com.google.cloud.metastore.v1beta.Backup.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetBackupRequest, - com.google.cloud.metastore.v1beta.Backup> - getGetBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.GetBackupRequest, - com.google.cloud.metastore.v1beta.Backup> - getGetBackupMethod; - if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { - DataprocMetastoreGrpc.getGetBackupMethod = - getGetBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.GetBackupRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.Backup.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("GetBackup")) - .build(); - } - } - } - return getGetBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateBackupRequest, com.google.longrunning.Operation> - getCreateBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateBackup", - requestType = com.google.cloud.metastore.v1beta.CreateBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateBackupRequest, com.google.longrunning.Operation> - getCreateBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.CreateBackupRequest, com.google.longrunning.Operation> - getCreateBackupMethod; - if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { - DataprocMetastoreGrpc.getCreateBackupMethod = - getCreateBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.CreateBackupRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("CreateBackup")) - .build(); - } - } - } - return getCreateBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteBackupRequest, com.google.longrunning.Operation> - getDeleteBackupMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", - requestType = com.google.cloud.metastore.v1beta.DeleteBackupRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteBackupRequest, com.google.longrunning.Operation> - getDeleteBackupMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.DeleteBackupRequest, com.google.longrunning.Operation> - getDeleteBackupMethod; - if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { - DataprocMetastoreGrpc.getDeleteBackupMethod = - getDeleteBackupMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.DeleteBackupRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("DeleteBackup")) - .build(); - } - } - } - return getDeleteBackupMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest, - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse> - getRemoveIamPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveIamPolicy", - requestType = com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.class, - responseType = com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest, - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse> - getRemoveIamPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest, - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse> - getRemoveIamPolicyMethod; - if ((getRemoveIamPolicyMethod = DataprocMetastoreGrpc.getRemoveIamPolicyMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getRemoveIamPolicyMethod = DataprocMetastoreGrpc.getRemoveIamPolicyMethod) == null) { - DataprocMetastoreGrpc.getRemoveIamPolicyMethod = - getRemoveIamPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveIamPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("RemoveIamPolicy")) - .build(); - } - } - } - return getRemoveIamPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.QueryMetadataRequest, com.google.longrunning.Operation> - getQueryMetadataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "QueryMetadata", - requestType = com.google.cloud.metastore.v1beta.QueryMetadataRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.QueryMetadataRequest, com.google.longrunning.Operation> - getQueryMetadataMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.QueryMetadataRequest, - com.google.longrunning.Operation> - getQueryMetadataMethod; - if ((getQueryMetadataMethod = DataprocMetastoreGrpc.getQueryMetadataMethod) == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getQueryMetadataMethod = DataprocMetastoreGrpc.getQueryMetadataMethod) == null) { - DataprocMetastoreGrpc.getQueryMetadataMethod = - getQueryMetadataMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryMetadata")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.QueryMetadataRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("QueryMetadata")) - .build(); - } - } - } - return getQueryMetadataMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest, - com.google.longrunning.Operation> - getMoveTableToDatabaseMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "MoveTableToDatabase", - requestType = com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest, - com.google.longrunning.Operation> - getMoveTableToDatabaseMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest, - com.google.longrunning.Operation> - getMoveTableToDatabaseMethod; - if ((getMoveTableToDatabaseMethod = DataprocMetastoreGrpc.getMoveTableToDatabaseMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getMoveTableToDatabaseMethod = DataprocMetastoreGrpc.getMoveTableToDatabaseMethod) - == null) { - DataprocMetastoreGrpc.getMoveTableToDatabaseMethod = - getMoveTableToDatabaseMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "MoveTableToDatabase")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier("MoveTableToDatabase")) - .build(); - } - } - } - return getMoveTableToDatabaseMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest, - com.google.longrunning.Operation> - getAlterMetadataResourceLocationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AlterMetadataResourceLocation", - requestType = com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest, - com.google.longrunning.Operation> - getAlterMetadataResourceLocationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest, - com.google.longrunning.Operation> - getAlterMetadataResourceLocationMethod; - if ((getAlterMetadataResourceLocationMethod = - DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod) - == null) { - synchronized (DataprocMetastoreGrpc.class) { - if ((getAlterMetadataResourceLocationMethod = - DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod) - == null) { - DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod = - getAlterMetadataResourceLocationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "AlterMetadataResourceLocation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new DataprocMetastoreMethodDescriptorSupplier( - "AlterMetadataResourceLocation")) - .build(); - } - } - } - return getAlterMetadataResourceLocationMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static DataprocMetastoreStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreStub(channel, callOptions); - } - }; - return DataprocMetastoreStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DataprocMetastoreBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreBlockingStub(channel, callOptions); - } - }; - return DataprocMetastoreBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static DataprocMetastoreFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DataprocMetastoreFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFutureStub(channel, callOptions); - } - }; - return DataprocMetastoreFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - default void listServices( - com.google.cloud.metastore.v1beta.ListServicesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListServicesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - default void getService( - com.google.cloud.metastore.v1beta.GetServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - default void createService( - com.google.cloud.metastore.v1beta.CreateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - default void updateService( - com.google.cloud.metastore.v1beta.UpdateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - default void deleteService( - com.google.cloud.metastore.v1beta.DeleteServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - default void listMetadataImports( - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListMetadataImportsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - default void getMetadataImport( - com.google.cloud.metastore.v1beta.GetMetadataImportRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - default void createMetadataImport( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - default void updateMetadataImport( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateMetadataImportMethod(), responseObserver); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - default void exportMetadata( - com.google.cloud.metastore.v1beta.ExportMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getExportMetadataMethod(), responseObserver); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - default void restoreService( - com.google.cloud.metastore.v1beta.RestoreServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRestoreServiceMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - default void listBackups( - com.google.cloud.metastore.v1beta.ListBackupsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListBackupsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - default void getBackup( - com.google.cloud.metastore.v1beta.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - default void createBackup( - com.google.cloud.metastore.v1beta.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateBackupMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - default void deleteBackup( - com.google.cloud.metastore.v1beta.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteBackupMethod(), responseObserver); - } - - /** - * - * - *
-     * Removes the attached IAM policies for a resource
-     * 
- */ - default void removeIamPolicy( - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRemoveIamPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Query DPMS metadata.
-     * 
- */ - default void queryMetadata( - com.google.cloud.metastore.v1beta.QueryMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getQueryMetadataMethod(), responseObserver); - } - - /** - * - * - *
-     * Move a table to another database.
-     * 
- */ - default void moveTableToDatabase( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getMoveTableToDatabaseMethod(), responseObserver); - } - - /** - * - * - *
-     * Alter metadata resource location. The metadata resource can be a database,
-     * table, or partition. This functionality only updates the parent directory
-     * for the respective metadata resource and does not transfer any existing
-     * data to the new location.
-     * 
- */ - default void alterMetadataResourceLocation( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getAlterMetadataResourceLocationMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public abstract static class DataprocMetastoreImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return DataprocMetastoreGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreStub - extends io.grpc.stub.AbstractAsyncStub { - private DataprocMetastoreStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public void listServices( - com.google.cloud.metastore.v1beta.ListServicesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public void getService( - com.google.cloud.metastore.v1beta.GetServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public void createService( - com.google.cloud.metastore.v1beta.CreateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public void updateService( - com.google.cloud.metastore.v1beta.UpdateServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public void deleteService( - com.google.cloud.metastore.v1beta.DeleteServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public void listMetadataImports( - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public void getMetadataImport( - com.google.cloud.metastore.v1beta.GetMetadataImportRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public void createMetadataImport( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public void updateMetadataImport( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public void exportMetadata( - com.google.cloud.metastore.v1beta.ExportMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getExportMetadataMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public void restoreService( - com.google.cloud.metastore.v1beta.RestoreServiceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public void listBackups( - com.google.cloud.metastore.v1beta.ListBackupsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public void getBackup( - com.google.cloud.metastore.v1beta.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public void createBackup( - com.google.cloud.metastore.v1beta.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public void deleteBackup( - com.google.cloud.metastore.v1beta.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Removes the attached IAM policies for a resource
-     * 
- */ - public void removeIamPolicy( - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Query DPMS metadata.
-     * 
- */ - public void queryMetadata( - com.google.cloud.metastore.v1beta.QueryMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getQueryMetadataMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Move a table to another database.
-     * 
- */ - public void moveTableToDatabase( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getMoveTableToDatabaseMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Alter metadata resource location. The metadata resource can be a database,
-     * table, or partition. This functionality only updates the parent directory
-     * for the respective metadata resource and does not transfer any existing
-     * data to the new location.
-     * 
- */ - public void alterMetadataResourceLocation( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private DataprocMetastoreBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public com.google.cloud.metastore.v1beta.ListServicesResponse listServices( - com.google.cloud.metastore.v1beta.ListServicesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListServicesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public com.google.cloud.metastore.v1beta.Service getService( - com.google.cloud.metastore.v1beta.GetServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public com.google.longrunning.Operation createService( - com.google.cloud.metastore.v1beta.CreateServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public com.google.longrunning.Operation updateService( - com.google.cloud.metastore.v1beta.UpdateServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public com.google.longrunning.Operation deleteService( - com.google.cloud.metastore.v1beta.DeleteServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse listMetadataImports( - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListMetadataImportsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport( - com.google.cloud.metastore.v1beta.GetMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public com.google.longrunning.Operation createMetadataImport( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public com.google.longrunning.Operation updateMetadataImport( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateMetadataImportMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public com.google.longrunning.Operation exportMetadata( - com.google.cloud.metastore.v1beta.ExportMetadataRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getExportMetadataMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public com.google.longrunning.Operation restoreService( - com.google.cloud.metastore.v1beta.RestoreServiceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRestoreServiceMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public com.google.cloud.metastore.v1beta.ListBackupsResponse listBackups( - com.google.cloud.metastore.v1beta.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListBackupsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public com.google.cloud.metastore.v1beta.Backup getBackup( - com.google.cloud.metastore.v1beta.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBackupMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public com.google.longrunning.Operation createBackup( - com.google.cloud.metastore.v1beta.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateBackupMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public com.google.longrunning.Operation deleteBackup( - com.google.cloud.metastore.v1beta.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteBackupMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Removes the attached IAM policies for a resource
-     * 
- */ - public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse removeIamPolicy( - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveIamPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Query DPMS metadata.
-     * 
- */ - public com.google.longrunning.Operation queryMetadata( - com.google.cloud.metastore.v1beta.QueryMetadataRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getQueryMetadataMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Move a table to another database.
-     * 
- */ - public com.google.longrunning.Operation moveTableToDatabase( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMoveTableToDatabaseMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Alter metadata resource location. The metadata resource can be a database,
-     * table, or partition. This functionality only updates the parent directory
-     * for the respective metadata resource and does not transfer any existing
-     * data to the new location.
-     * 
- */ - public com.google.longrunning.Operation alterMetadataResourceLocation( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAlterMetadataResourceLocationMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastore. - * - *
-   * 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:
-   * * The service works with a collection of Google Cloud projects, named:
-   * `/projects/*`
-   * * Each project has a collection of available locations, named: `/locations/*`
-   *   (a location must refer to a Google Cloud `region`)
-   * * Each location has a collection of services, named: `/services/*`
-   * * Dataproc Metastore services are resources with names of the form:
-   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- */ - public static final class DataprocMetastoreFutureStub - extends io.grpc.stub.AbstractFutureStub { - private DataprocMetastoreFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DataprocMetastoreFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DataprocMetastoreFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists services in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.ListServicesResponse> - listServices(com.google.cloud.metastore.v1beta.ListServicesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the details of a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.Service> - getService(com.google.cloud.metastore.v1beta.GetServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a metastore service in a project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createService(com.google.cloud.metastore.v1beta.CreateServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates the parameters of a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateService(com.google.cloud.metastore.v1beta.UpdateServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteService(com.google.cloud.metastore.v1beta.DeleteServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists imports in a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse> - listMetadataImports(com.google.cloud.metastore.v1beta.ListMetadataImportsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets details of a single import.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.MetadataImport> - getMetadataImport(com.google.cloud.metastore.v1beta.GetMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new MetadataImport in a given project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createMetadataImport( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a single import.
-     * Only the description field of MetadataImport is supported to be updated.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateMetadataImport( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Exports metadata from a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - exportMetadata(com.google.cloud.metastore.v1beta.ExportMetadataRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Restores a service from a backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - restoreService(com.google.cloud.metastore.v1beta.RestoreServiceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists backups in a service.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.ListBackupsResponse> - listBackups(com.google.cloud.metastore.v1beta.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets details of a single backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.Backup> - getBackup(com.google.cloud.metastore.v1beta.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new backup in a given project and location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createBackup(com.google.cloud.metastore.v1beta.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a single backup.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteBackup(com.google.cloud.metastore.v1beta.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Removes the attached IAM policies for a resource
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse> - removeIamPolicy(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Query DPMS metadata.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - queryMetadata(com.google.cloud.metastore.v1beta.QueryMetadataRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getQueryMetadataMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Move a table to another database.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - moveTableToDatabase(com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMoveTableToDatabaseMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Alter metadata resource location. The metadata resource can be a database,
-     * table, or partition. This functionality only updates the parent directory
-     * for the respective metadata resource and does not transfer any existing
-     * data to the new location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - alterMetadataResourceLocation( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), - request); - } - } - - private static final int METHODID_LIST_SERVICES = 0; - private static final int METHODID_GET_SERVICE = 1; - private static final int METHODID_CREATE_SERVICE = 2; - private static final int METHODID_UPDATE_SERVICE = 3; - private static final int METHODID_DELETE_SERVICE = 4; - private static final int METHODID_LIST_METADATA_IMPORTS = 5; - private static final int METHODID_GET_METADATA_IMPORT = 6; - private static final int METHODID_CREATE_METADATA_IMPORT = 7; - private static final int METHODID_UPDATE_METADATA_IMPORT = 8; - private static final int METHODID_EXPORT_METADATA = 9; - private static final int METHODID_RESTORE_SERVICE = 10; - private static final int METHODID_LIST_BACKUPS = 11; - private static final int METHODID_GET_BACKUP = 12; - private static final int METHODID_CREATE_BACKUP = 13; - private static final int METHODID_DELETE_BACKUP = 14; - private static final int METHODID_REMOVE_IAM_POLICY = 15; - private static final int METHODID_QUERY_METADATA = 16; - private static final int METHODID_MOVE_TABLE_TO_DATABASE = 17; - private static final int METHODID_ALTER_METADATA_RESOURCE_LOCATION = 18; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_SERVICES: - serviceImpl.listServices( - (com.google.cloud.metastore.v1beta.ListServicesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_SERVICE: - serviceImpl.getService( - (com.google.cloud.metastore.v1beta.GetServiceRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_SERVICE: - serviceImpl.createService( - (com.google.cloud.metastore.v1beta.CreateServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SERVICE: - serviceImpl.updateService( - (com.google.cloud.metastore.v1beta.UpdateServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SERVICE: - serviceImpl.deleteService( - (com.google.cloud.metastore.v1beta.DeleteServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_METADATA_IMPORTS: - serviceImpl.listMetadataImports( - (com.google.cloud.metastore.v1beta.ListMetadataImportsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse>) - responseObserver); - break; - case METHODID_GET_METADATA_IMPORT: - serviceImpl.getMetadataImport( - (com.google.cloud.metastore.v1beta.GetMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_METADATA_IMPORT: - serviceImpl.createMetadataImport( - (com.google.cloud.metastore.v1beta.CreateMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_METADATA_IMPORT: - serviceImpl.updateMetadataImport( - (com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_EXPORT_METADATA: - serviceImpl.exportMetadata( - (com.google.cloud.metastore.v1beta.ExportMetadataRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_RESTORE_SERVICE: - serviceImpl.restoreService( - (com.google.cloud.metastore.v1beta.RestoreServiceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_BACKUPS: - serviceImpl.listBackups( - (com.google.cloud.metastore.v1beta.ListBackupsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_BACKUP: - serviceImpl.getBackup( - (com.google.cloud.metastore.v1beta.GetBackupRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_BACKUP: - serviceImpl.createBackup( - (com.google.cloud.metastore.v1beta.CreateBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_BACKUP: - serviceImpl.deleteBackup( - (com.google.cloud.metastore.v1beta.DeleteBackupRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_IAM_POLICY: - serviceImpl.removeIamPolicy( - (com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse>) - responseObserver); - break; - case METHODID_QUERY_METADATA: - serviceImpl.queryMetadata( - (com.google.cloud.metastore.v1beta.QueryMetadataRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_MOVE_TABLE_TO_DATABASE: - serviceImpl.moveTableToDatabase( - (com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ALTER_METADATA_RESOURCE_LOCATION: - serviceImpl.alterMetadataResourceLocation( - (com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListServicesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.ListServicesRequest, - com.google.cloud.metastore.v1beta.ListServicesResponse>( - service, METHODID_LIST_SERVICES))) - .addMethod( - getGetServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.GetServiceRequest, - com.google.cloud.metastore.v1beta.Service>(service, METHODID_GET_SERVICE))) - .addMethod( - getCreateServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.CreateServiceRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_SERVICE))) - .addMethod( - getUpdateServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.UpdateServiceRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_SERVICE))) - .addMethod( - getDeleteServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.DeleteServiceRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_SERVICE))) - .addMethod( - getListMetadataImportsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest, - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse>( - service, METHODID_LIST_METADATA_IMPORTS))) - .addMethod( - getGetMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.GetMetadataImportRequest, - com.google.cloud.metastore.v1beta.MetadataImport>( - service, METHODID_GET_METADATA_IMPORT))) - .addMethod( - getCreateMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_METADATA_IMPORT))) - .addMethod( - getUpdateMetadataImportMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest, - com.google.longrunning.Operation>(service, METHODID_UPDATE_METADATA_IMPORT))) - .addMethod( - getExportMetadataMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.ExportMetadataRequest, - com.google.longrunning.Operation>(service, METHODID_EXPORT_METADATA))) - .addMethod( - getRestoreServiceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.RestoreServiceRequest, - com.google.longrunning.Operation>(service, METHODID_RESTORE_SERVICE))) - .addMethod( - getListBackupsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.ListBackupsRequest, - com.google.cloud.metastore.v1beta.ListBackupsResponse>( - service, METHODID_LIST_BACKUPS))) - .addMethod( - getGetBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.GetBackupRequest, - com.google.cloud.metastore.v1beta.Backup>(service, METHODID_GET_BACKUP))) - .addMethod( - getCreateBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.CreateBackupRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_BACKUP))) - .addMethod( - getDeleteBackupMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.DeleteBackupRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP))) - .addMethod( - getRemoveIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest, - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse>( - service, METHODID_REMOVE_IAM_POLICY))) - .addMethod( - getQueryMetadataMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.QueryMetadataRequest, - com.google.longrunning.Operation>(service, METHODID_QUERY_METADATA))) - .addMethod( - getMoveTableToDatabaseMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest, - com.google.longrunning.Operation>(service, METHODID_MOVE_TABLE_TO_DATABASE))) - .addMethod( - getAlterMetadataResourceLocationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest, - com.google.longrunning.Operation>( - service, METHODID_ALTER_METADATA_RESOURCE_LOCATION))) - .build(); - } - - private abstract static class DataprocMetastoreBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DataprocMetastoreBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DataprocMetastore"); - } - } - - private static final class DataprocMetastoreFileDescriptorSupplier - extends DataprocMetastoreBaseDescriptorSupplier { - DataprocMetastoreFileDescriptorSupplier() {} - } - - private static final class DataprocMetastoreMethodDescriptorSupplier - extends DataprocMetastoreBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - DataprocMetastoreMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DataprocMetastoreGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DataprocMetastoreFileDescriptorSupplier()) - .addMethod(getListServicesMethod()) - .addMethod(getGetServiceMethod()) - .addMethod(getCreateServiceMethod()) - .addMethod(getUpdateServiceMethod()) - .addMethod(getDeleteServiceMethod()) - .addMethod(getListMetadataImportsMethod()) - .addMethod(getGetMetadataImportMethod()) - .addMethod(getCreateMetadataImportMethod()) - .addMethod(getUpdateMetadataImportMethod()) - .addMethod(getExportMetadataMethod()) - .addMethod(getRestoreServiceMethod()) - .addMethod(getListBackupsMethod()) - .addMethod(getGetBackupMethod()) - .addMethod(getCreateBackupMethod()) - .addMethod(getDeleteBackupMethod()) - .addMethod(getRemoveIamPolicyMethod()) - .addMethod(getQueryMetadataMethod()) - .addMethod(getMoveTableToDatabaseMethod()) - .addMethod(getAlterMetadataResourceLocationMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastore.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastore.java deleted file mode 100644 index e868675cd056..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastore.java +++ /dev/null @@ -1,976 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Represents a backend metastore for the federation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.BackendMetastore} - */ -public final class BackendMetastore extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.BackendMetastore) - BackendMetastoreOrBuilder { - private static final long serialVersionUID = 0L; - // Use BackendMetastore.newBuilder() to construct. - private BackendMetastore(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BackendMetastore() { - name_ = ""; - metastoreType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BackendMetastore(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_BackendMetastore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.BackendMetastore.class, - com.google.cloud.metastore.v1.BackendMetastore.Builder.class); - } - - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.BackendMetastore.MetastoreType} - */ - public enum MetastoreType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The metastore type is not set.
-     * 
- * - * METASTORE_TYPE_UNSPECIFIED = 0; - */ - METASTORE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * The backend metastore is Dataproc Metastore.
-     * 
- * - * DATAPROC_METASTORE = 3; - */ - DATAPROC_METASTORE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The metastore type is not set.
-     * 
- * - * METASTORE_TYPE_UNSPECIFIED = 0; - */ - public static final int METASTORE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The backend metastore is Dataproc Metastore.
-     * 
- * - * DATAPROC_METASTORE = 3; - */ - public static final int DATAPROC_METASTORE_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetastoreType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MetastoreType forNumber(int value) { - switch (value) { - case 0: - return METASTORE_TYPE_UNSPECIFIED; - case 3: - return DATAPROC_METASTORE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MetastoreType findValueByNumber(int number) { - return MetastoreType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.BackendMetastore.getDescriptor().getEnumTypes().get(0); - } - - private static final MetastoreType[] VALUES = values(); - - public static MetastoreType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MetastoreType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.BackendMetastore.MetastoreType) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METASTORE_TYPE_FIELD_NUMBER = 2; - private int metastoreType_ = 0; - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The enum numeric value on the wire for metastoreType. - */ - @java.lang.Override - public int getMetastoreTypeValue() { - return metastoreType_; - } - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The metastoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.BackendMetastore.MetastoreType getMetastoreType() { - com.google.cloud.metastore.v1.BackendMetastore.MetastoreType result = - com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.forNumber(metastoreType_); - return result == null - ? com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (metastoreType_ - != com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.METASTORE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, metastoreType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (metastoreType_ - != com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.METASTORE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, metastoreType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.BackendMetastore)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.BackendMetastore other = - (com.google.cloud.metastore.v1.BackendMetastore) obj; - - if (!getName().equals(other.getName())) return false; - if (metastoreType_ != other.metastoreType_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + METASTORE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + metastoreType_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.BackendMetastore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents a backend metastore for the federation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.BackendMetastore} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.BackendMetastore) - com.google.cloud.metastore.v1.BackendMetastoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_BackendMetastore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.BackendMetastore.class, - com.google.cloud.metastore.v1.BackendMetastore.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.BackendMetastore.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - metastoreType_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.BackendMetastore getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.BackendMetastore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.BackendMetastore build() { - com.google.cloud.metastore.v1.BackendMetastore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.BackendMetastore buildPartial() { - com.google.cloud.metastore.v1.BackendMetastore result = - new com.google.cloud.metastore.v1.BackendMetastore(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.BackendMetastore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metastoreType_ = metastoreType_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.BackendMetastore) { - return mergeFrom((com.google.cloud.metastore.v1.BackendMetastore) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.BackendMetastore other) { - if (other == com.google.cloud.metastore.v1.BackendMetastore.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.metastoreType_ != 0) { - setMetastoreTypeValue(other.getMetastoreTypeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - metastoreType_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int metastoreType_ = 0; - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The enum numeric value on the wire for metastoreType. - */ - @java.lang.Override - public int getMetastoreTypeValue() { - return metastoreType_; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @param value The enum numeric value on the wire for metastoreType to set. - * @return This builder for chaining. - */ - public Builder setMetastoreTypeValue(int value) { - metastoreType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The metastoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.BackendMetastore.MetastoreType getMetastoreType() { - com.google.cloud.metastore.v1.BackendMetastore.MetastoreType result = - com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.forNumber(metastoreType_); - return result == null - ? com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @param value The metastoreType to set. - * @return This builder for chaining. - */ - public Builder setMetastoreType( - com.google.cloud.metastore.v1.BackendMetastore.MetastoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - metastoreType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return This builder for chaining. - */ - public Builder clearMetastoreType() { - bitField0_ = (bitField0_ & ~0x00000002); - metastoreType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.BackendMetastore) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.BackendMetastore) - private static final com.google.cloud.metastore.v1.BackendMetastore DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.BackendMetastore(); - } - - public static com.google.cloud.metastore.v1.BackendMetastore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BackendMetastore parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.BackendMetastore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastoreOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastoreOrBuilder.java deleted file mode 100644 index d0f52e3e2809..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastoreOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public interface BackendMetastoreOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.BackendMetastore) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The enum numeric value on the wire for metastoreType. - */ - int getMetastoreTypeValue(); - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The metastoreType. - */ - com.google.cloud.metastore.v1.BackendMetastore.MetastoreType getMetastoreType(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Backup.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Backup.java deleted file mode 100644 index 00ab3e9b57fd..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Backup.java +++ /dev/null @@ -1,2327 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * The details of a backup resource.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Backup} - */ -public final class Backup extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Backup) - BackupOrBuilder { - private static final long serialVersionUID = 0L; - // Use Backup.newBuilder() to construct. - private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Backup() { - name_ = ""; - state_ = 0; - description_ = ""; - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Backup(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Backup_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Backup.class, - com.google.cloud.metastore.v1.Backup.Builder.class); - } - - /** - * - * - *
-   * The current state of the backup.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.Backup.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the backup is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The backup is being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The backup is being deleted.
-     * 
- * - * DELETING = 2; - */ - DELETING(2), - /** - * - * - *
-     * The backup is active and ready to use.
-     * 
- * - * ACTIVE = 3; - */ - ACTIVE(3), - /** - * - * - *
-     * The backup failed.
-     * 
- * - * FAILED = 4; - */ - FAILED(4), - /** - * - * - *
-     * The backup is being restored.
-     * 
- * - * RESTORING = 5; - */ - RESTORING(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the backup is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The backup is being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The backup is being deleted.
-     * 
- * - * DELETING = 2; - */ - public static final int DELETING_VALUE = 2; - /** - * - * - *
-     * The backup is active and ready to use.
-     * 
- * - * ACTIVE = 3; - */ - public static final int ACTIVE_VALUE = 3; - /** - * - * - *
-     * The backup failed.
-     * 
- * - * FAILED = 4; - */ - public static final int FAILED_VALUE = 4; - /** - * - * - *
-     * The backup is being restored.
-     * 
- * - * RESTORING = 5; - */ - public static final int RESTORING_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return DELETING; - case 3: - return ACTIVE; - case 4: - return FAILED; - case 5: - return RESTORING; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.Backup.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Backup.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 4; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Backup.State getState() { - com.google.cloud.metastore.v1.Backup.State result = - com.google.cloud.metastore.v1.Backup.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1.Backup.State.UNRECOGNIZED : result; - } - - public static final int SERVICE_REVISION_FIELD_NUMBER = 5; - private com.google.cloud.metastore.v1.Service serviceRevision_; - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - @java.lang.Override - public boolean hasServiceRevision() { - return serviceRevision_ != null; - } - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service getServiceRevision() { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1.Service.getDefaultInstance() - : serviceRevision_; - } - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder() { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1.Service.getDefaultInstance() - : serviceRevision_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESTORING_SERVICES_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList restoringServices_; - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - public com.google.protobuf.ProtocolStringList getRestoringServicesList() { - return restoringServices_; - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - public int getRestoringServicesCount() { - return restoringServices_.size(); - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - public java.lang.String getRestoringServices(int index) { - return restoringServices_.get(index); - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - public com.google.protobuf.ByteString getRestoringServicesBytes(int index) { - return restoringServices_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(3, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, state_); - } - if (serviceRevision_ != null) { - output.writeMessage(5, getServiceRevision()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - for (int i = 0; i < restoringServices_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, restoringServices_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); - } - if (serviceRevision_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getServiceRevision()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - { - int dataSize = 0; - for (int i = 0; i < restoringServices_.size(); i++) { - dataSize += computeStringSizeNoTag(restoringServices_.getRaw(i)); - } - size += dataSize; - size += 1 * getRestoringServicesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.Backup)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.Backup other = (com.google.cloud.metastore.v1.Backup) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (hasServiceRevision() != other.hasServiceRevision()) return false; - if (hasServiceRevision()) { - if (!getServiceRevision().equals(other.getServiceRevision())) return false; - } - if (!getDescription().equals(other.getDescription())) return false; - if (!getRestoringServicesList().equals(other.getRestoringServicesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasServiceRevision()) { - hash = (37 * hash) + SERVICE_REVISION_FIELD_NUMBER; - hash = (53 * hash) + getServiceRevision().hashCode(); - } - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getRestoringServicesCount() > 0) { - hash = (37 * hash) + RESTORING_SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getRestoringServicesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.Backup parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Backup parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Backup parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Backup parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.Backup prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a backup resource.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Backup} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Backup) - com.google.cloud.metastore.v1.BackupOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Backup_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Backup.class, - com.google.cloud.metastore.v1.Backup.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.Backup.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - serviceRevision_ = null; - if (serviceRevisionBuilder_ != null) { - serviceRevisionBuilder_.dispose(); - serviceRevisionBuilder_ = null; - } - description_ = ""; - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Backup_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Backup getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.Backup.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Backup build() { - com.google.cloud.metastore.v1.Backup result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Backup buildPartial() { - com.google.cloud.metastore.v1.Backup result = new com.google.cloud.metastore.v1.Backup(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.Backup result) { - if (((bitField0_ & 0x00000040) != 0)) { - restoringServices_ = restoringServices_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.restoringServices_ = restoringServices_; - } - - private void buildPartial0(com.google.cloud.metastore.v1.Backup result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.serviceRevision_ = - serviceRevisionBuilder_ == null ? serviceRevision_ : serviceRevisionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.description_ = description_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.Backup) { - return mergeFrom((com.google.cloud.metastore.v1.Backup) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.Backup other) { - if (other == com.google.cloud.metastore.v1.Backup.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasServiceRevision()) { - mergeServiceRevision(other.getServiceRevision()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.restoringServices_.isEmpty()) { - if (restoringServices_.isEmpty()) { - restoringServices_ = other.restoringServices_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureRestoringServicesIsMutable(); - restoringServices_.addAll(other.restoringServices_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: - { - input.readMessage(getServiceRevisionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureRestoringServicesIsMutable(); - restoringServices_.add(s); - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000004); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Backup.State getState() { - com.google.cloud.metastore.v1.Backup.State result = - com.google.cloud.metastore.v1.Backup.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1.Backup.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1.Backup.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000008); - state_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.Service serviceRevision_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder> - serviceRevisionBuilder_; - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - public boolean hasServiceRevision() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - public com.google.cloud.metastore.v1.Service getServiceRevision() { - if (serviceRevisionBuilder_ == null) { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1.Service.getDefaultInstance() - : serviceRevision_; - } else { - return serviceRevisionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setServiceRevision(com.google.cloud.metastore.v1.Service value) { - if (serviceRevisionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceRevision_ = value; - } else { - serviceRevisionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setServiceRevision( - com.google.cloud.metastore.v1.Service.Builder builderForValue) { - if (serviceRevisionBuilder_ == null) { - serviceRevision_ = builderForValue.build(); - } else { - serviceRevisionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeServiceRevision(com.google.cloud.metastore.v1.Service value) { - if (serviceRevisionBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && serviceRevision_ != null - && serviceRevision_ != com.google.cloud.metastore.v1.Service.getDefaultInstance()) { - getServiceRevisionBuilder().mergeFrom(value); - } else { - serviceRevision_ = value; - } - } else { - serviceRevisionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearServiceRevision() { - bitField0_ = (bitField0_ & ~0x00000010); - serviceRevision_ = null; - if (serviceRevisionBuilder_ != null) { - serviceRevisionBuilder_.dispose(); - serviceRevisionBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.Service.Builder getServiceRevisionBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getServiceRevisionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder() { - if (serviceRevisionBuilder_ != null) { - return serviceRevisionBuilder_.getMessageOrBuilder(); - } else { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1.Service.getDefaultInstance() - : serviceRevision_; - } - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder> - getServiceRevisionFieldBuilder() { - if (serviceRevisionBuilder_ == null) { - serviceRevisionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder>( - getServiceRevision(), getParentForChildren(), isClean()); - serviceRevision_ = null; - } - return serviceRevisionBuilder_; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList restoringServices_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureRestoringServicesIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - restoringServices_ = new com.google.protobuf.LazyStringArrayList(restoringServices_); - bitField0_ |= 0x00000040; - } - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - public com.google.protobuf.ProtocolStringList getRestoringServicesList() { - return restoringServices_.getUnmodifiableView(); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - public int getRestoringServicesCount() { - return restoringServices_.size(); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - public java.lang.String getRestoringServices(int index) { - return restoringServices_.get(index); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - public com.google.protobuf.ByteString getRestoringServicesBytes(int index) { - return restoringServices_.getByteString(index); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index to set the value at. - * @param value The restoringServices to set. - * @return This builder for chaining. - */ - public Builder setRestoringServices(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoringServicesIsMutable(); - restoringServices_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The restoringServices to add. - * @return This builder for chaining. - */ - public Builder addRestoringServices(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoringServicesIsMutable(); - restoringServices_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param values The restoringServices to add. - * @return This builder for chaining. - */ - public Builder addAllRestoringServices(java.lang.Iterable values) { - ensureRestoringServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restoringServices_); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearRestoringServices() { - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes of the restoringServices to add. - * @return This builder for chaining. - */ - public Builder addRestoringServicesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRestoringServicesIsMutable(); - restoringServices_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Backup) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Backup) - private static final com.google.cloud.metastore.v1.Backup DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Backup(); - } - - public static com.google.cloud.metastore.v1.Backup getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Backup parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Backup getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupOrBuilder.java deleted file mode 100644 index e761c18cf7f2..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupOrBuilder.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface BackupOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Backup) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1.Backup.State getState(); - - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - boolean hasServiceRevision(); - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - com.google.cloud.metastore.v1.Service getServiceRevision(); - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder(); - - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - java.util.List getRestoringServicesList(); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - int getRestoringServicesCount(); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - java.lang.String getRestoringServices(int index); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - com.google.protobuf.ByteString getRestoringServicesBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java deleted file mode 100644 index 449063622d24..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java +++ /dev/null @@ -1,1396 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.CreateBackupRequest} - */ -public final class CreateBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateBackupRequest) - CreateBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateBackupRequest.newBuilder() to construct. - private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateBackupRequest() { - parent_ = ""; - backupId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.CreateBackupRequest.class, - com.google.cloud.metastore.v1.CreateBackupRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a backup
-   * of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a backup
-   * of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - @java.lang.Override - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backupId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backupId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1.Backup 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.
-   * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - @java.lang.Override - public boolean hasBackup() { - return backup_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Backup getBackup() { - return backup_ == null ? com.google.cloud.metastore.v1.Backup.getDefaultInstance() : 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.
-   * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder() { - return backup_ == null ? com.google.cloud.metastore.v1.Backup.getDefaultInstance() : backup_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); - } - if (backup_ != null) { - output.writeMessage(3, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); - } - if (backup_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.CreateBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.CreateBackupRequest other = - (com.google.cloud.metastore.v1.CreateBackupRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getBackupId().equals(other.getBackupId())) return false; - if (hasBackup() != other.hasBackup()) return false; - if (hasBackup()) { - if (!getBackup().equals(other.getBackup())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; - hash = (53 * hash) + getBackupId().hashCode(); - if (hasBackup()) { - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.CreateBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.CreateBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.CreateBackupRequest) - com.google.cloud.metastore.v1.CreateBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.CreateBackupRequest.class, - com.google.cloud.metastore.v1.CreateBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.CreateBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - backupId_ = ""; - backup_ = null; - if (backupBuilder_ != null) { - backupBuilder_.dispose(); - backupBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.CreateBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateBackupRequest build() { - com.google.cloud.metastore.v1.CreateBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateBackupRequest buildPartial() { - com.google.cloud.metastore.v1.CreateBackupRequest result = - new com.google.cloud.metastore.v1.CreateBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.CreateBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.backupId_ = backupId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.backup_ = backupBuilder_ == null ? backup_ : backupBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.CreateBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1.CreateBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.CreateBackupRequest other) { - if (other == com.google.cloud.metastore.v1.CreateBackupRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBackupId().isEmpty()) { - backupId_ = other.backupId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasBackup()) { - mergeBackup(other.getBackup()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - backupId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a backup
-     * of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a backup
-     * of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a backup
-     * of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a backup
-     * of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a backup
-     * of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backupId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - public com.google.protobuf.ByteString getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backupId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backupId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearBackupId() { - backupId_ = getDefaultInstance().getBackupId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backupId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Backup, - com.google.cloud.metastore.v1.Backup.Builder, - com.google.cloud.metastore.v1.BackupOrBuilder> - backupBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - public boolean hasBackup() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - public com.google.cloud.metastore.v1.Backup getBackup() { - if (backupBuilder_ == null) { - return backup_ == null - ? com.google.cloud.metastore.v1.Backup.getDefaultInstance() - : backup_; - } else { - return backupBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBackup(com.google.cloud.metastore.v1.Backup value) { - if (backupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - } else { - backupBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBackup(com.google.cloud.metastore.v1.Backup.Builder builderForValue) { - if (backupBuilder_ == null) { - backup_ = builderForValue.build(); - } else { - backupBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeBackup(com.google.cloud.metastore.v1.Backup value) { - if (backupBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && backup_ != null - && backup_ != com.google.cloud.metastore.v1.Backup.getDefaultInstance()) { - getBackupBuilder().mergeFrom(value); - } else { - backup_ = value; - } - } else { - backupBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearBackup() { - bitField0_ = (bitField0_ & ~0x00000004); - backup_ = null; - if (backupBuilder_ != null) { - backupBuilder_.dispose(); - backupBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.Backup.Builder getBackupBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBackupFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder() { - if (backupBuilder_ != null) { - return backupBuilder_.getMessageOrBuilder(); - } else { - return backup_ == null - ? com.google.cloud.metastore.v1.Backup.getDefaultInstance() - : 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.
-     * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Backup, - com.google.cloud.metastore.v1.Backup.Builder, - com.google.cloud.metastore.v1.BackupOrBuilder> - getBackupFieldBuilder() { - if (backupBuilder_ == null) { - backupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Backup, - com.google.cloud.metastore.v1.Backup.Builder, - com.google.cloud.metastore.v1.BackupOrBuilder>( - getBackup(), getParentForChildren(), isClean()); - backup_ = null; - } - return backupBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateBackupRequest) - private static final com.google.cloud.metastore.v1.CreateBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateBackupRequest(); - } - - public static com.google.cloud.metastore.v1.CreateBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequestOrBuilder.java deleted file mode 100644 index 0d4df773af06..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequestOrBuilder.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface CreateBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.CreateBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a backup
-   * of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a backup
-   * of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - java.lang.String getBackupId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - com.google.protobuf.ByteString getBackupIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - boolean hasBackup(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - com.google.cloud.metastore.v1.Backup getBackup(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequest.java deleted file mode 100644 index 6879f6727a6d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequest.java +++ /dev/null @@ -1,1425 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for CreateFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.CreateFederationRequest} - */ -public final class CreateFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateFederationRequest) - CreateFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateFederationRequest.newBuilder() to construct. - private CreateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateFederationRequest() { - parent_ = ""; - federationId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_CreateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.CreateFederationRequest.class, - com.google.cloud.metastore.v1.CreateFederationRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a federation
-   * service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a federation
-   * service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEDERATION_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - @java.lang.Override - public java.lang.String getFederationId() { - java.lang.Object ref = federationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - federationId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFederationIdBytes() { - java.lang.Object ref = federationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - federationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEDERATION_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1.Federation 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.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - @java.lang.Override - public boolean hasFederation() { - return federation_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Federation getFederation() { - return federation_ == null - ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder() { - return federation_ == null - ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() - : federation_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, federationId_); - } - if (federation_ != null) { - output.writeMessage(3, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, federationId_); - } - if (federation_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.CreateFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.CreateFederationRequest other = - (com.google.cloud.metastore.v1.CreateFederationRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getFederationId().equals(other.getFederationId())) return false; - if (hasFederation() != other.hasFederation()) return false; - if (hasFederation()) { - if (!getFederation().equals(other.getFederation())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FEDERATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getFederationId().hashCode(); - if (hasFederation()) { - hash = (37 * hash) + FEDERATION_FIELD_NUMBER; - hash = (53 * hash) + getFederation().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.CreateFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for CreateFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.CreateFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.CreateFederationRequest) - com.google.cloud.metastore.v1.CreateFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_CreateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.CreateFederationRequest.class, - com.google.cloud.metastore.v1.CreateFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.CreateFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - federationId_ = ""; - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.CreateFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateFederationRequest build() { - com.google.cloud.metastore.v1.CreateFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateFederationRequest buildPartial() { - com.google.cloud.metastore.v1.CreateFederationRequest result = - new com.google.cloud.metastore.v1.CreateFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.CreateFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.federationId_ = federationId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.federation_ = federationBuilder_ == null ? federation_ : federationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.CreateFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1.CreateFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.CreateFederationRequest other) { - if (other == com.google.cloud.metastore.v1.CreateFederationRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFederationId().isEmpty()) { - federationId_ = other.federationId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasFederation()) { - mergeFederation(other.getFederation()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - federationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getFederationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a federation
-     * service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a federation
-     * service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a federation
-     * service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a federation
-     * service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a federation
-     * service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - public java.lang.String getFederationId() { - java.lang.Object ref = federationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - federationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - public com.google.protobuf.ByteString getFederationIdBytes() { - java.lang.Object ref = federationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - federationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The federationId to set. - * @return This builder for chaining. - */ - public Builder setFederationId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - federationId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearFederationId() { - federationId_ = getDefaultInstance().getFederationId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for federationId to set. - * @return This builder for chaining. - */ - public Builder setFederationIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - federationId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.Federation federation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder> - federationBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - public boolean hasFederation() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - public com.google.cloud.metastore.v1.Federation getFederation() { - if (federationBuilder_ == null) { - return federation_ == null - ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() - : federation_; - } else { - return federationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation(com.google.cloud.metastore.v1.Federation value) { - if (federationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - federation_ = value; - } else { - federationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation(com.google.cloud.metastore.v1.Federation.Builder builderForValue) { - if (federationBuilder_ == null) { - federation_ = builderForValue.build(); - } else { - federationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeFederation(com.google.cloud.metastore.v1.Federation value) { - if (federationBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && federation_ != null - && federation_ != com.google.cloud.metastore.v1.Federation.getDefaultInstance()) { - getFederationBuilder().mergeFrom(value); - } else { - federation_ = value; - } - } else { - federationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearFederation() { - bitField0_ = (bitField0_ & ~0x00000004); - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.Federation.Builder getFederationBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getFederationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder() { - if (federationBuilder_ != null) { - return federationBuilder_.getMessageOrBuilder(); - } else { - return federation_ == null - ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder> - getFederationFieldBuilder() { - if (federationBuilder_ == null) { - federationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder>( - getFederation(), getParentForChildren(), isClean()); - federation_ = null; - } - return federationBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateFederationRequest) - private static final com.google.cloud.metastore.v1.CreateFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateFederationRequest(); - } - - public static com.google.cloud.metastore.v1.CreateFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequestOrBuilder.java deleted file mode 100644 index ab11e2ec5a8e..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequestOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public interface CreateFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.CreateFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a federation
-   * service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a federation
-   * service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - java.lang.String getFederationId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - com.google.protobuf.ByteString getFederationIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - boolean hasFederation(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - com.google.cloud.metastore.v1.Federation getFederation(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequest.java deleted file mode 100644 index 0988ff724c65..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequest.java +++ /dev/null @@ -1,1428 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.CreateMetadataImportRequest} - */ -public final class CreateMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateMetadataImportRequest) - CreateMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateMetadataImportRequest.newBuilder() to construct. - private CreateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateMetadataImportRequest() { - parent_ = ""; - metadataImportId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.CreateMetadataImportRequest.class, - com.google.cloud.metastore.v1.CreateMetadataImportRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a metastore
-   * import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a metastore
-   * import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_IMPORT_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - @java.lang.Override - public java.lang.String getMetadataImportId() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metadataImportId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMetadataImportIdBytes() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metadataImportId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_IMPORT_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1.MetadataImport 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.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - @java.lang.Override - public boolean hasMetadataImport() { - return metadataImport_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport getMetadataImport() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() - : metadataImport_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metadataImportId_); - } - if (metadataImport_ != null) { - output.writeMessage(3, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metadataImportId_); - } - if (metadataImport_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.CreateMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.CreateMetadataImportRequest other = - (com.google.cloud.metastore.v1.CreateMetadataImportRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getMetadataImportId().equals(other.getMetadataImportId())) return false; - if (hasMetadataImport() != other.hasMetadataImport()) return false; - if (hasMetadataImport()) { - if (!getMetadataImport().equals(other.getMetadataImport())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + METADATA_IMPORT_ID_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImportId().hashCode(); - if (hasMetadataImport()) { - hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImport().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.CreateMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.CreateMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.CreateMetadataImportRequest) - com.google.cloud.metastore.v1.CreateMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.CreateMetadataImportRequest.class, - com.google.cloud.metastore.v1.CreateMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.CreateMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - metadataImportId_ = ""; - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateMetadataImportRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.CreateMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateMetadataImportRequest build() { - com.google.cloud.metastore.v1.CreateMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1.CreateMetadataImportRequest result = - new com.google.cloud.metastore.v1.CreateMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.CreateMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadataImportId_ = metadataImportId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadataImport_ = - metadataImportBuilder_ == null ? metadataImport_ : metadataImportBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.CreateMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1.CreateMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.CreateMetadataImportRequest other) { - if (other == com.google.cloud.metastore.v1.CreateMetadataImportRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getMetadataImportId().isEmpty()) { - metadataImportId_ = other.metadataImportId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasMetadataImport()) { - mergeMetadataImport(other.getMetadataImport()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - metadataImportId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getMetadataImportFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a metastore
-     * import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a metastore
-     * import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a metastore
-     * import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a metastore
-     * import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a metastore
-     * import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - public java.lang.String getMetadataImportId() { - java.lang.Object ref = metadataImportId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metadataImportId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - public com.google.protobuf.ByteString getMetadataImportIdBytes() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metadataImportId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The metadataImportId to set. - * @return This builder for chaining. - */ - public Builder setMetadataImportId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - metadataImportId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMetadataImportId() { - metadataImportId_ = getDefaultInstance().getMetadataImportId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for metadataImportId to set. - * @return This builder for chaining. - */ - public Builder setMetadataImportIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - metadataImportId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.MetadataImport metadataImport_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder> - metadataImportBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - public boolean hasMetadataImport() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - public com.google.cloud.metastore.v1.MetadataImport getMetadataImport() { - if (metadataImportBuilder_ == null) { - return metadataImport_ == null - ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() - : metadataImport_; - } else { - return metadataImportBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport(com.google.cloud.metastore.v1.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataImport_ = value; - } else { - metadataImportBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport( - com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { - if (metadataImportBuilder_ == null) { - metadataImport_ = builderForValue.build(); - } else { - metadataImportBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeMetadataImport(com.google.cloud.metastore.v1.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && metadataImport_ != null - && metadataImport_ - != com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()) { - getMetadataImportBuilder().mergeFrom(value); - } else { - metadataImport_ = value; - } - } else { - metadataImportBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearMetadataImport() { - bitField0_ = (bitField0_ & ~0x00000004); - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.MetadataImport.Builder getMetadataImportBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataImportFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder() { - if (metadataImportBuilder_ != null) { - return metadataImportBuilder_.getMessageOrBuilder(); - } else { - return metadataImport_ == null - ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder> - getMetadataImportFieldBuilder() { - if (metadataImportBuilder_ == null) { - metadataImportBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder>( - getMetadataImport(), getParentForChildren(), isClean()); - metadataImport_ = null; - } - return metadataImportBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateMetadataImportRequest) - private static final com.google.cloud.metastore.v1.CreateMetadataImportRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1.CreateMetadataImportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateMetadataImportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequestOrBuilder.java deleted file mode 100644 index 4b1e59cc7315..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface CreateMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.CreateMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a metastore
-   * import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a metastore
-   * import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - java.lang.String getMetadataImportId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - com.google.protobuf.ByteString getMetadataImportIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - boolean hasMetadataImport(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - com.google.cloud.metastore.v1.MetadataImport getMetadataImport(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequest.java deleted file mode 100644 index 702b1fee2e88..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequest.java +++ /dev/null @@ -1,1417 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.CreateServiceRequest} - */ -public final class CreateServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateServiceRequest) - CreateServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateServiceRequest.newBuilder() to construct. - private CreateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateServiceRequest() { - parent_ = ""; - serviceId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.CreateServiceRequest.class, - com.google.cloud.metastore.v1.CreateServiceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - @java.lang.Override - public java.lang.String getServiceId() { - java.lang.Object ref = serviceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceIdBytes() { - java.lang.Object ref = serviceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1.Service 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.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - @java.lang.Override - public boolean hasService() { - return service_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service getService() { - return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : 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.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder() { - return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceId_); - } - if (service_ != null) { - output.writeMessage(3, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceId_); - } - if (service_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.CreateServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.CreateServiceRequest other = - (com.google.cloud.metastore.v1.CreateServiceRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getServiceId().equals(other.getServiceId())) return false; - if (hasService() != other.hasService()) return false; - if (hasService()) { - if (!getService().equals(other.getService())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - if (hasService()) { - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.CreateServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.CreateServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.CreateServiceRequest) - com.google.cloud.metastore.v1.CreateServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.CreateServiceRequest.class, - com.google.cloud.metastore.v1.CreateServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.CreateServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - serviceId_ = ""; - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_CreateServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.CreateServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateServiceRequest build() { - com.google.cloud.metastore.v1.CreateServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateServiceRequest buildPartial() { - com.google.cloud.metastore.v1.CreateServiceRequest result = - new com.google.cloud.metastore.v1.CreateServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.CreateServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.serviceId_ = serviceId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.service_ = serviceBuilder_ == null ? service_ : serviceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.CreateServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1.CreateServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.CreateServiceRequest other) { - if (other == com.google.cloud.metastore.v1.CreateServiceRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getServiceId().isEmpty()) { - serviceId_ = other.serviceId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasService()) { - mergeService(other.getService()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - serviceId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getServiceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - public java.lang.String getServiceId() { - java.lang.Object ref = serviceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - public com.google.protobuf.ByteString getServiceIdBytes() { - java.lang.Object ref = serviceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The serviceId to set. - * @return This builder for chaining. - */ - public Builder setServiceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearServiceId() { - serviceId_ = getDefaultInstance().getServiceId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for serviceId to set. - * @return This builder for chaining. - */ - public Builder setServiceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.Service service_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder> - serviceBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - public boolean hasService() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - public com.google.cloud.metastore.v1.Service getService() { - if (serviceBuilder_ == null) { - return service_ == null - ? com.google.cloud.metastore.v1.Service.getDefaultInstance() - : service_; - } else { - return serviceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1.Service value) { - if (serviceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - } else { - serviceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1.Service.Builder builderForValue) { - if (serviceBuilder_ == null) { - service_ = builderForValue.build(); - } else { - serviceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeService(com.google.cloud.metastore.v1.Service value) { - if (serviceBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && service_ != null - && service_ != com.google.cloud.metastore.v1.Service.getDefaultInstance()) { - getServiceBuilder().mergeFrom(value); - } else { - service_ = value; - } - } else { - serviceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearService() { - bitField0_ = (bitField0_ & ~0x00000004); - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.Service.Builder getServiceBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getServiceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder() { - if (serviceBuilder_ != null) { - return serviceBuilder_.getMessageOrBuilder(); - } else { - return service_ == null - ? com.google.cloud.metastore.v1.Service.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder> - getServiceFieldBuilder() { - if (serviceBuilder_ == null) { - serviceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder>( - getService(), getParentForChildren(), isClean()); - service_ = null; - } - return serviceBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateServiceRequest) - private static final com.google.cloud.metastore.v1.CreateServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateServiceRequest(); - } - - public static com.google.cloud.metastore.v1.CreateServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.CreateServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequestOrBuilder.java deleted file mode 100644 index 1b5d420eeb9e..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequestOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface CreateServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.CreateServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - java.lang.String getServiceId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - com.google.protobuf.ByteString getServiceIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - boolean hasService(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - com.google.cloud.metastore.v1.Service getService(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java deleted file mode 100644 index 0d9d46d652c7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java +++ /dev/null @@ -1,592 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * The specification of database dump to import from or export to.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.DatabaseDumpSpec} - */ -public final class DatabaseDumpSpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DatabaseDumpSpec) - DatabaseDumpSpecOrBuilder { - private static final long serialVersionUID = 0L; - // Use DatabaseDumpSpec.newBuilder() to construct. - private DatabaseDumpSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DatabaseDumpSpec() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DatabaseDumpSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.DatabaseDumpSpec.class, - com.google.cloud.metastore.v1.DatabaseDumpSpec.Builder.class); - } - - /** - * - * - *
-   * The type of the database dump.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.DatabaseDumpSpec.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The type of the database dump is unknown.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Database dump is a MySQL dump file.
-     * 
- * - * MYSQL = 1; - */ - MYSQL(1), - /** - * - * - *
-     * Database dump contains Avro files.
-     * 
- * - * AVRO = 2; - */ - AVRO(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The type of the database dump is unknown.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Database dump is a MySQL dump file.
-     * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - /** - * - * - *
-     * Database dump contains Avro files.
-     * 
- * - * AVRO = 2; - */ - public static final int AVRO_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return MYSQL; - case 2: - return AVRO; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.DatabaseDumpSpec.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.DatabaseDumpSpec.Type) - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.DatabaseDumpSpec)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.DatabaseDumpSpec other = - (com.google.cloud.metastore.v1.DatabaseDumpSpec) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.DatabaseDumpSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The specification of database dump to import from or export to.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.DatabaseDumpSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.DatabaseDumpSpec) - com.google.cloud.metastore.v1.DatabaseDumpSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.DatabaseDumpSpec.class, - com.google.cloud.metastore.v1.DatabaseDumpSpec.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.DatabaseDumpSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.DatabaseDumpSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec build() { - com.google.cloud.metastore.v1.DatabaseDumpSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec buildPartial() { - com.google.cloud.metastore.v1.DatabaseDumpSpec result = - new com.google.cloud.metastore.v1.DatabaseDumpSpec(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.DatabaseDumpSpec) { - return mergeFrom((com.google.cloud.metastore.v1.DatabaseDumpSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.DatabaseDumpSpec other) { - if (other == com.google.cloud.metastore.v1.DatabaseDumpSpec.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DatabaseDumpSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DatabaseDumpSpec) - private static final com.google.cloud.metastore.v1.DatabaseDumpSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DatabaseDumpSpec(); - } - - public static com.google.cloud.metastore.v1.DatabaseDumpSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DatabaseDumpSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpecOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpecOrBuilder.java deleted file mode 100644 index f54c4c6e2891..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpecOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface DatabaseDumpSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.DatabaseDumpSpec) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java deleted file mode 100644 index 8caa3890bcfc..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java +++ /dev/null @@ -1,902 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.DeleteBackupRequest} - */ -public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DeleteBackupRequest) - DeleteBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteBackupRequest.newBuilder() to construct. - private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteBackupRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.DeleteBackupRequest.class, - com.google.cloud.metastore.v1.DeleteBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.DeleteBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.DeleteBackupRequest other = - (com.google.cloud.metastore.v1.DeleteBackupRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.DeleteBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.DeleteBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.DeleteBackupRequest) - com.google.cloud.metastore.v1.DeleteBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.DeleteBackupRequest.class, - com.google.cloud.metastore.v1.DeleteBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.DeleteBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.DeleteBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteBackupRequest build() { - com.google.cloud.metastore.v1.DeleteBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteBackupRequest buildPartial() { - com.google.cloud.metastore.v1.DeleteBackupRequest result = - new com.google.cloud.metastore.v1.DeleteBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.DeleteBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.DeleteBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1.DeleteBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.DeleteBackupRequest other) { - if (other == com.google.cloud.metastore.v1.DeleteBackupRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DeleteBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DeleteBackupRequest) - private static final com.google.cloud.metastore.v1.DeleteBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DeleteBackupRequest(); - } - - public static com.google.cloud.metastore.v1.DeleteBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequestOrBuilder.java deleted file mode 100644 index b31eb9532764..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface DeleteBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.DeleteBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequest.java deleted file mode 100644 index 79b1dcf404c5..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequest.java +++ /dev/null @@ -1,903 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for DeleteFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.DeleteFederationRequest} - */ -public final class DeleteFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DeleteFederationRequest) - DeleteFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteFederationRequest.newBuilder() to construct. - private DeleteFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteFederationRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_DeleteFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.DeleteFederationRequest.class, - com.google.cloud.metastore.v1.DeleteFederationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.DeleteFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.DeleteFederationRequest other = - (com.google.cloud.metastore.v1.DeleteFederationRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.DeleteFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for DeleteFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.DeleteFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.DeleteFederationRequest) - com.google.cloud.metastore.v1.DeleteFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_DeleteFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.DeleteFederationRequest.class, - com.google.cloud.metastore.v1.DeleteFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.DeleteFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.DeleteFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteFederationRequest build() { - com.google.cloud.metastore.v1.DeleteFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteFederationRequest buildPartial() { - com.google.cloud.metastore.v1.DeleteFederationRequest result = - new com.google.cloud.metastore.v1.DeleteFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.DeleteFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.DeleteFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1.DeleteFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.DeleteFederationRequest other) { - if (other == com.google.cloud.metastore.v1.DeleteFederationRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DeleteFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DeleteFederationRequest) - private static final com.google.cloud.metastore.v1.DeleteFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DeleteFederationRequest(); - } - - public static com.google.cloud.metastore.v1.DeleteFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequestOrBuilder.java deleted file mode 100644 index dda9d816457a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public interface DeleteFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.DeleteFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequest.java deleted file mode 100644 index cd066aa4b533..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequest.java +++ /dev/null @@ -1,902 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.DeleteServiceRequest} - */ -public final class DeleteServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DeleteServiceRequest) - DeleteServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteServiceRequest.newBuilder() to construct. - private DeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteServiceRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.DeleteServiceRequest.class, - com.google.cloud.metastore.v1.DeleteServiceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.DeleteServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.DeleteServiceRequest other = - (com.google.cloud.metastore.v1.DeleteServiceRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.DeleteServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.DeleteServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.DeleteServiceRequest) - com.google.cloud.metastore.v1.DeleteServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.DeleteServiceRequest.class, - com.google.cloud.metastore.v1.DeleteServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.DeleteServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.DeleteServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteServiceRequest build() { - com.google.cloud.metastore.v1.DeleteServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteServiceRequest buildPartial() { - com.google.cloud.metastore.v1.DeleteServiceRequest result = - new com.google.cloud.metastore.v1.DeleteServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.DeleteServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.DeleteServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1.DeleteServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.DeleteServiceRequest other) { - if (other == com.google.cloud.metastore.v1.DeleteServiceRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DeleteServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DeleteServiceRequest) - private static final com.google.cloud.metastore.v1.DeleteServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DeleteServiceRequest(); - } - - public static com.google.cloud.metastore.v1.DeleteServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.DeleteServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequestOrBuilder.java deleted file mode 100644 index ebaf4fc65bf3..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface DeleteServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.DeleteServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfig.java deleted file mode 100644 index 187d51627f69..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfig.java +++ /dev/null @@ -1,642 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Encryption settings for the service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.EncryptionConfig} - */ -public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.EncryptionConfig) - EncryptionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use EncryptionConfig.newBuilder() to construct. - private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private EncryptionConfig() { - kmsKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EncryptionConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.EncryptionConfig.class, - com.google.cloud.metastore.v1.EncryptionConfig.Builder.class); - } - - public static final int KMS_KEY_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object kmsKey_ = ""; - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - @java.lang.Override - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } - } - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.EncryptionConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.EncryptionConfig other = - (com.google.cloud.metastore.v1.EncryptionConfig) obj; - - if (!getKmsKey().equals(other.getKmsKey())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; - hash = (53 * hash) + getKmsKey().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.EncryptionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Encryption settings for the service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.EncryptionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.EncryptionConfig) - com.google.cloud.metastore.v1.EncryptionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.EncryptionConfig.class, - com.google.cloud.metastore.v1.EncryptionConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.EncryptionConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - kmsKey_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_EncryptionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.EncryptionConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.EncryptionConfig build() { - com.google.cloud.metastore.v1.EncryptionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.EncryptionConfig buildPartial() { - com.google.cloud.metastore.v1.EncryptionConfig result = - new com.google.cloud.metastore.v1.EncryptionConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.EncryptionConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.kmsKey_ = kmsKey_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.EncryptionConfig) { - return mergeFrom((com.google.cloud.metastore.v1.EncryptionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.EncryptionConfig other) { - if (other == com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance()) return this; - if (!other.getKmsKey().isEmpty()) { - kmsKey_ = other.kmsKey_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - kmsKey_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object kmsKey_ = ""; - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - public com.google.protobuf.ByteString getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @param value The kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - kmsKey_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return This builder for chaining. - */ - public Builder clearKmsKey() { - kmsKey_ = getDefaultInstance().getKmsKey(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @param value The bytes for kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - kmsKey_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.EncryptionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.EncryptionConfig) - private static final com.google.cloud.metastore.v1.EncryptionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.EncryptionConfig(); - } - - public static com.google.cloud.metastore.v1.EncryptionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EncryptionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.EncryptionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfigOrBuilder.java deleted file mode 100644 index 71a735e78923..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfigOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface EncryptionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.EncryptionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - java.lang.String getKmsKey(); - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - com.google.protobuf.ByteString getKmsKeyBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequest.java deleted file mode 100644 index 6b66aa099037..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequest.java +++ /dev/null @@ -1,1400 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ExportMetadataRequest} - */ -public final class ExportMetadataRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ExportMetadataRequest) - ExportMetadataRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportMetadataRequest.newBuilder() to construct. - private ExportMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportMetadataRequest() { - service_ = ""; - requestId_ = ""; - databaseDumpType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportMetadataRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ExportMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ExportMetadataRequest.class, - com.google.cloud.metastore.v1.ExportMetadataRequest.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DESTINATION_GCS_FOLDER(2), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 2: - return DESTINATION_GCS_FOLDER; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int DESTINATION_GCS_FOLDER_FIELD_NUMBER = 2; - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - public boolean hasDestinationGcsFolder() { - return destinationCase_ == 2; - } - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - public java.lang.String getDestinationGcsFolder() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 2) { - destination_ = s; - } - return s; - } - } - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - public com.google.protobuf.ByteString getDestinationGcsFolderBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 2) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run export, in the
-   * following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run export, in the
-   * following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 4; - private int databaseDumpType_ = 0; - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (destinationCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, databaseDumpType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (destinationCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, databaseDumpType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ExportMetadataRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ExportMetadataRequest other = - (com.google.cloud.metastore.v1.ExportMetadataRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (databaseDumpType_ != other.databaseDumpType_) return false; - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 2: - if (!getDestinationGcsFolder().equals(other.getDestinationGcsFolder())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseDumpType_; - switch (destinationCase_) { - case 2: - hash = (37 * hash) + DESTINATION_GCS_FOLDER_FIELD_NUMBER; - hash = (53 * hash) + getDestinationGcsFolder().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.ExportMetadataRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ExportMetadataRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ExportMetadataRequest) - com.google.cloud.metastore.v1.ExportMetadataRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ExportMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ExportMetadataRequest.class, - com.google.cloud.metastore.v1.ExportMetadataRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ExportMetadataRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - requestId_ = ""; - databaseDumpType_ = 0; - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ExportMetadataRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ExportMetadataRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ExportMetadataRequest build() { - com.google.cloud.metastore.v1.ExportMetadataRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ExportMetadataRequest buildPartial() { - com.google.cloud.metastore.v1.ExportMetadataRequest result = - new com.google.cloud.metastore.v1.ExportMetadataRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ExportMetadataRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.databaseDumpType_ = databaseDumpType_; - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1.ExportMetadataRequest result) { - result.destinationCase_ = destinationCase_; - result.destination_ = this.destination_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ExportMetadataRequest) { - return mergeFrom((com.google.cloud.metastore.v1.ExportMetadataRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ExportMetadataRequest other) { - if (other == com.google.cloud.metastore.v1.ExportMetadataRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.databaseDumpType_ != 0) { - setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); - } - switch (other.getDestinationCase()) { - case DESTINATION_GCS_FOLDER: - { - destinationCase_ = 2; - destination_ = other.destination_; - onChanged(); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 2; - destination_ = s; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - databaseDumpType_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - @java.lang.Override - public boolean hasDestinationGcsFolder() { - return destinationCase_ == 2; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - @java.lang.Override - public java.lang.String getDestinationGcsFolder() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 2) { - destination_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDestinationGcsFolderBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 2) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @param value The destinationGcsFolder to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsFolder(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationCase_ = 2; - destination_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return This builder for chaining. - */ - public Builder clearDestinationGcsFolder() { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @param value The bytes for destinationGcsFolder to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsFolderBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - destinationCase_ = 2; - destination_ = value; - onChanged(); - return this; - } - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run export, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run export, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run export, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run export, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run export, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int databaseDumpType_ = 0; - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpTypeValue(int value) { - databaseDumpType_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpType(com.google.cloud.metastore.v1.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - databaseDumpType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseDumpType() { - bitField0_ = (bitField0_ & ~0x00000008); - databaseDumpType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ExportMetadataRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ExportMetadataRequest) - private static final com.google.cloud.metastore.v1.ExportMetadataRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ExportMetadataRequest(); - } - - public static com.google.cloud.metastore.v1.ExportMetadataRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportMetadataRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ExportMetadataRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequestOrBuilder.java deleted file mode 100644 index 07dbfe9bc78a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequestOrBuilder.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface ExportMetadataRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ExportMetadataRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - boolean hasDestinationGcsFolder(); - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - java.lang.String getDestinationGcsFolder(); - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - com.google.protobuf.ByteString getDestinationGcsFolderBytes(); - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run export, in the
-   * following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run export, in the
-   * following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); - - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - int getDatabaseDumpTypeValue(); - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType(); - - public com.google.cloud.metastore.v1.ExportMetadataRequest.DestinationCase getDestinationCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Federation.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Federation.java deleted file mode 100644 index 65f05485663b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Federation.java +++ /dev/null @@ -1,3060 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Represents a federation of multiple backend metastores.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Federation} - */ -public final class Federation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Federation) - FederationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Federation.newBuilder() to construct. - private Federation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Federation() { - name_ = ""; - version_ = ""; - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - uid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Federation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_Federation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - case 6: - return internalGetBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_Federation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Federation.class, - com.google.cloud.metastore.v1.Federation.Builder.class); - } - - /** - * - * - *
-   * The current state of the federation.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.Federation.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metastore federation is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metastore federation is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The metastore federation is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - ACTIVE(2), - /** - * - * - *
-     * The metastore federation is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 3; - */ - UPDATING(3), - /** - * - * - *
-     * The metastore federation is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - /** - * - * - *
-     * The metastore federation has encountered an error and cannot be used. The
-     * metastore federation should be deleted.
-     * 
- * - * ERROR = 5; - */ - ERROR(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metastore federation is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metastore federation is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The metastore federation is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - public static final int ACTIVE_VALUE = 2; - /** - * - * - *
-     * The metastore federation is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 3; - */ - public static final int UPDATING_VALUE = 3; - /** - * - * - *
-     * The metastore federation is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - /** - * - * - *
-     * The metastore federation has encountered an error and cannot be used. The
-     * metastore federation should be deleted.
-     * 
- * - * ERROR = 5; - */ - public static final int ERROR_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return ACTIVE; - case 3: - return UPDATING; - case 4: - return DELETING; - case 5: - return ERROR; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.Federation.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Federation.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int VERSION_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-   * versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-   * versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKEND_METASTORES_FIELD_NUMBER = 6; - - private static final class BackendMetastoresDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.metastore.v1.BackendMetastore.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> - backendMetastores_; - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> - internalGetBackendMetastores() { - if (backendMetastores_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - return backendMetastores_; - } - - public int getBackendMetastoresCount() { - return internalGetBackendMetastores().getMap().size(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public boolean containsBackendMetastores(int key) { - - return internalGetBackendMetastores().getMap().containsKey(key); - } - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getBackendMetastores() { - return getBackendMetastoresMap(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public java.util.Map - getBackendMetastoresMap() { - return internalGetBackendMetastores().getMap(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1.BackendMetastore - getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1.BackendMetastore defaultValue) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrThrow(int key) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 8; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Federation.State getState() { - com.google.cloud.metastore.v1.Federation.State result = - com.google.cloud.metastore.v1.Federation.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1.Federation.State.UNRECOGNIZED : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private volatile java.lang.Object stateMessage_ = ""; - /** - * - * - *
-   * Output only. Additional information about the current state of the metastore federation,
-   * if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - @java.lang.Override - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Additional information about the current state of the metastore federation,
-   * if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UID_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private volatile java.lang.Object uid_ = ""; - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); - } - com.google.protobuf.GeneratedMessageV3.serializeIntegerMapTo( - output, - internalGetBackendMetastores(), - BackendMetastoresDefaultEntryHolder.defaultEntry, - 6); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, endpointUri_); - } - if (state_ != com.google.cloud.metastore.v1.Federation.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(8, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, uid_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); - } - for (java.util.Map.Entry - entry : internalGetBackendMetastores().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> - backendMetastores__ = - BackendMetastoresDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, backendMetastores__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, endpointUri_); - } - if (state_ != com.google.cloud.metastore.v1.Federation.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, uid_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.Federation)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.Federation other = (com.google.cloud.metastore.v1.Federation) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getVersion().equals(other.getVersion())) return false; - if (!internalGetBackendMetastores().equals(other.internalGetBackendMetastores())) return false; - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (state_ != other.state_) return false; - if (!getStateMessage().equals(other.getStateMessage())) return false; - if (!getUid().equals(other.getUid())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetBackendMetastores().getMap().isEmpty()) { - hash = (37 * hash) + BACKEND_METASTORES_FIELD_NUMBER; - hash = (53 * hash) + internalGetBackendMetastores().hashCode(); - } - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.Federation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Federation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Federation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Federation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.Federation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents a federation of multiple backend metastores.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Federation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Federation) - com.google.cloud.metastore.v1.FederationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_Federation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - case 6: - return internalGetBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - case 6: - return internalGetMutableBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_Federation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Federation.class, - com.google.cloud.metastore.v1.Federation.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.Federation.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - version_ = ""; - internalGetMutableBackendMetastores().clear(); - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - uid_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_Federation_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Federation getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.Federation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Federation build() { - com.google.cloud.metastore.v1.Federation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Federation buildPartial() { - com.google.cloud.metastore.v1.Federation result = - new com.google.cloud.metastore.v1.Federation(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.Federation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.backendMetastores_ = internalGetBackendMetastores(); - result.backendMetastores_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.endpointUri_ = endpointUri_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.stateMessage_ = stateMessage_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.uid_ = uid_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.Federation) { - return mergeFrom((com.google.cloud.metastore.v1.Federation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.Federation other) { - if (other == com.google.cloud.metastore.v1.Federation.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000008; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000010; - onChanged(); - } - internalGetMutableBackendMetastores().mergeFrom(other.internalGetBackendMetastores()); - bitField0_ |= 0x00000020; - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - bitField0_ |= 0x00000200; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> - backendMetastores__ = - input.readMessage( - BackendMetastoresDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableBackendMetastores() - .getMutableMap() - .put(backendMetastores__.getKey(), backendMetastores__.getValue()); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 64: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 74: - { - stateMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: - { - uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - break; - } // case 82 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000008; - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; - return this; - } - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-     * versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-     * versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-     * versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-     * versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-     * versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> - backendMetastores_; - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> - internalGetBackendMetastores() { - if (backendMetastores_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - return backendMetastores_; - } - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> - internalGetMutableBackendMetastores() { - if (backendMetastores_ == null) { - backendMetastores_ = - com.google.protobuf.MapField.newMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - if (!backendMetastores_.isMutable()) { - backendMetastores_ = backendMetastores_.copy(); - } - bitField0_ |= 0x00000020; - onChanged(); - return backendMetastores_; - } - - public int getBackendMetastoresCount() { - return internalGetBackendMetastores().getMap().size(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public boolean containsBackendMetastores(int key) { - - return internalGetBackendMetastores().getMap().containsKey(key); - } - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getBackendMetastores() { - return getBackendMetastoresMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public java.util.Map - getBackendMetastoresMap() { - return internalGetBackendMetastores().getMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1.BackendMetastore - getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1.BackendMetastore defaultValue) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrThrow(int key) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearBackendMetastores() { - bitField0_ = (bitField0_ & ~0x00000020); - internalGetMutableBackendMetastores().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - public Builder removeBackendMetastores(int key) { - - internalGetMutableBackendMetastores().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableBackendMetastores() { - bitField0_ |= 0x00000020; - return internalGetMutableBackendMetastores().getMutableMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - public Builder putBackendMetastores( - int key, com.google.cloud.metastore.v1.BackendMetastore value) { - - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableBackendMetastores().getMutableMap().put(key, value); - bitField0_ |= 0x00000020; - return this; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - public Builder putAllBackendMetastores( - java.util.Map values) { - internalGetMutableBackendMetastores().getMutableMap().putAll(values); - bitField0_ |= 0x00000020; - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Federation.State getState() { - com.google.cloud.metastore.v1.Federation.State result = - com.google.cloud.metastore.v1.Federation.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1.Federation.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1.Federation.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000080); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object stateMessage_ = ""; - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore federation,
-     * if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore federation,
-     * if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore federation,
-     * if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - stateMessage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore federation,
-     * if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - stateMessage_ = getDefaultInstance().getStateMessage(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore federation,
-     * if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - stateMessage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private java.lang.Object uid_ = ""; - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uid_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uid_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Federation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Federation) - private static final com.google.cloud.metastore.v1.Federation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Federation(); - } - - public static com.google.cloud.metastore.v1.Federation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Federation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Federation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationOrBuilder.java deleted file mode 100644 index 0e1bbfb7975c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationOrBuilder.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public interface FederationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Federation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - int getLabelsCount(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-   * versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend metastore
-   * versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - int getBackendMetastoresCount(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - boolean containsBackendMetastores(int key); - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getBackendMetastores(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - java.util.Map - getBackendMetastoresMap(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - /* nullable */ - com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1.BackendMetastore defaultValue); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; - * - */ - com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrThrow(int key); - - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1.Federation.State getState(); - - /** - * - * - *
-   * Output only. Additional information about the current state of the metastore federation,
-   * if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - * - * - *
-   * Output only. Additional information about the current state of the metastore federation,
-   * if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString getStateMessageBytes(); - - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - java.lang.String getUid(); - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - com.google.protobuf.ByteString getUidBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequest.java deleted file mode 100644 index 634bb2890bd4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequest.java +++ /dev/null @@ -1,656 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.GetBackupRequest} - */ -public final class GetBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.GetBackupRequest) - GetBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBackupRequest.newBuilder() to construct. - private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetBackupRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.GetBackupRequest.class, - com.google.cloud.metastore.v1.GetBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.GetBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.GetBackupRequest other = - (com.google.cloud.metastore.v1.GetBackupRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.GetBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.GetBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.GetBackupRequest) - com.google.cloud.metastore.v1.GetBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.GetBackupRequest.class, - com.google.cloud.metastore.v1.GetBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.GetBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.GetBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetBackupRequest build() { - com.google.cloud.metastore.v1.GetBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetBackupRequest buildPartial() { - com.google.cloud.metastore.v1.GetBackupRequest result = - new com.google.cloud.metastore.v1.GetBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.GetBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.GetBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1.GetBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.GetBackupRequest other) { - if (other == com.google.cloud.metastore.v1.GetBackupRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.GetBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.GetBackupRequest) - private static final com.google.cloud.metastore.v1.GetBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.GetBackupRequest(); - } - - public static com.google.cloud.metastore.v1.GetBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequestOrBuilder.java deleted file mode 100644 index 1c8e6a4d7288..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface GetBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.GetBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequest.java deleted file mode 100644 index 107fc1a84344..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequest.java +++ /dev/null @@ -1,657 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for GetFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.GetFederationRequest} - */ -public final class GetFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.GetFederationRequest) - GetFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetFederationRequest.newBuilder() to construct. - private GetFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetFederationRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_GetFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.GetFederationRequest.class, - com.google.cloud.metastore.v1.GetFederationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.GetFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.GetFederationRequest other = - (com.google.cloud.metastore.v1.GetFederationRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.GetFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for GetFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.GetFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.GetFederationRequest) - com.google.cloud.metastore.v1.GetFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_GetFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.GetFederationRequest.class, - com.google.cloud.metastore.v1.GetFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.GetFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.GetFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetFederationRequest build() { - com.google.cloud.metastore.v1.GetFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetFederationRequest buildPartial() { - com.google.cloud.metastore.v1.GetFederationRequest result = - new com.google.cloud.metastore.v1.GetFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.GetFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.GetFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1.GetFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.GetFederationRequest other) { - if (other == com.google.cloud.metastore.v1.GetFederationRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.GetFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.GetFederationRequest) - private static final com.google.cloud.metastore.v1.GetFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.GetFederationRequest(); - } - - public static com.google.cloud.metastore.v1.GetFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequestOrBuilder.java deleted file mode 100644 index 223ad38f22da..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public interface GetFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.GetFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequest.java deleted file mode 100644 index 706dbd5c105c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequest.java +++ /dev/null @@ -1,658 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.GetMetadataImportRequest} - */ -public final class GetMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.GetMetadataImportRequest) - GetMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetMetadataImportRequest.newBuilder() to construct. - private GetMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetMetadataImportRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.GetMetadataImportRequest.class, - com.google.cloud.metastore.v1.GetMetadataImportRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.GetMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.GetMetadataImportRequest other = - (com.google.cloud.metastore.v1.GetMetadataImportRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.GetMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.GetMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.GetMetadataImportRequest) - com.google.cloud.metastore.v1.GetMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.GetMetadataImportRequest.class, - com.google.cloud.metastore.v1.GetMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.GetMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetMetadataImportRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.GetMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetMetadataImportRequest build() { - com.google.cloud.metastore.v1.GetMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1.GetMetadataImportRequest result = - new com.google.cloud.metastore.v1.GetMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.GetMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.GetMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1.GetMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.GetMetadataImportRequest other) { - if (other == com.google.cloud.metastore.v1.GetMetadataImportRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.GetMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.GetMetadataImportRequest) - private static final com.google.cloud.metastore.v1.GetMetadataImportRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.GetMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1.GetMetadataImportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetMetadataImportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequestOrBuilder.java deleted file mode 100644 index ec145b8e1099..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface GetMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.GetMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequest.java deleted file mode 100644 index a50a40c0ead5..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequest.java +++ /dev/null @@ -1,657 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.GetServiceRequest} - */ -public final class GetServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.GetServiceRequest) - GetServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetServiceRequest.newBuilder() to construct. - private GetServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetServiceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.GetServiceRequest.class, - com.google.cloud.metastore.v1.GetServiceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.GetServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.GetServiceRequest other = - (com.google.cloud.metastore.v1.GetServiceRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.GetServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.GetServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.GetServiceRequest) - com.google.cloud.metastore.v1.GetServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.GetServiceRequest.class, - com.google.cloud.metastore.v1.GetServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.GetServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_GetServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.GetServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetServiceRequest build() { - com.google.cloud.metastore.v1.GetServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetServiceRequest buildPartial() { - com.google.cloud.metastore.v1.GetServiceRequest result = - new com.google.cloud.metastore.v1.GetServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.GetServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.GetServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1.GetServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.GetServiceRequest other) { - if (other == com.google.cloud.metastore.v1.GetServiceRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object 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}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.GetServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.GetServiceRequest) - private static final com.google.cloud.metastore.v1.GetServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.GetServiceRequest(); - } - - public static com.google.cloud.metastore.v1.GetServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.GetServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequestOrBuilder.java deleted file mode 100644 index 493adba598e2..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface GetServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.GetServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfig.java deleted file mode 100644 index 2627cf056863..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfig.java +++ /dev/null @@ -1,1328 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Specifies configuration information specific to running Hive metastore
- * software as the metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.HiveMetastoreConfig} - */ -public final class HiveMetastoreConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.HiveMetastoreConfig) - HiveMetastoreConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use HiveMetastoreConfig.newBuilder() to construct. - private HiveMetastoreConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HiveMetastoreConfig() { - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HiveMetastoreConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.HiveMetastoreConfig.class, - com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; - - private static final class ConfigOverridesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_ConfigOverridesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int KERBEROS_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1.KerberosConfig kerberosConfig_; - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - @java.lang.Override - public boolean hasKerberosConfig() { - return kerberosConfig_ != null; - } - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.KerberosConfig getKerberosConfig() { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetConfigOverrides(), ConfigOverridesDefaultEntryHolder.defaultEntry, 2); - if (kerberosConfig_ != null) { - output.writeMessage(3, getKerberosConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - for (java.util.Map.Entry entry : - internalGetConfigOverrides().getMap().entrySet()) { - com.google.protobuf.MapEntry configOverrides__ = - ConfigOverridesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, configOverrides__); - } - if (kerberosConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKerberosConfig()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.HiveMetastoreConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.HiveMetastoreConfig other = - (com.google.cloud.metastore.v1.HiveMetastoreConfig) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!internalGetConfigOverrides().equals(other.internalGetConfigOverrides())) return false; - if (hasKerberosConfig() != other.hasKerberosConfig()) return false; - if (hasKerberosConfig()) { - if (!getKerberosConfig().equals(other.getKerberosConfig())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetConfigOverrides().getMap().isEmpty()) { - hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; - hash = (53 * hash) + internalGetConfigOverrides().hashCode(); - } - if (hasKerberosConfig()) { - hash = (37 * hash) + KERBEROS_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getKerberosConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.HiveMetastoreConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.HiveMetastoreConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.HiveMetastoreConfig) - com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.HiveMetastoreConfig.class, - com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.HiveMetastoreConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - internalGetMutableConfigOverrides().clear(); - kerberosConfig_ = null; - if (kerberosConfigBuilder_ != null) { - kerberosConfigBuilder_.dispose(); - kerberosConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.HiveMetastoreConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.HiveMetastoreConfig build() { - com.google.cloud.metastore.v1.HiveMetastoreConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.HiveMetastoreConfig buildPartial() { - com.google.cloud.metastore.v1.HiveMetastoreConfig result = - new com.google.cloud.metastore.v1.HiveMetastoreConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.HiveMetastoreConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.configOverrides_ = internalGetConfigOverrides(); - result.configOverrides_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.kerberosConfig_ = - kerberosConfigBuilder_ == null ? kerberosConfig_ : kerberosConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.HiveMetastoreConfig) { - return mergeFrom((com.google.cloud.metastore.v1.HiveMetastoreConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.HiveMetastoreConfig other) { - if (other == com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance()) - return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableConfigOverrides().mergeFrom(other.internalGetConfigOverrides()); - bitField0_ |= 0x00000002; - if (other.hasKerberosConfig()) { - mergeKerberosConfig(other.getKerberosConfig()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.MapEntry configOverrides__ = - input.readMessage( - ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableConfigOverrides() - .getMutableMap() - .put(configOverrides__.getKey(), configOverrides__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getKerberosConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - private com.google.protobuf.MapField - internalGetMutableConfigOverrides() { - if (configOverrides_ == null) { - configOverrides_ = - com.google.protobuf.MapField.newMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - if (!configOverrides_.isMutable()) { - configOverrides_ = configOverrides_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearConfigOverrides() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableConfigOverrides().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder removeConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableConfigOverrides().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableConfigOverrides() { - bitField0_ |= 0x00000002; - return internalGetMutableConfigOverrides().getMutableMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putConfigOverrides(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableConfigOverrides().getMutableMap().put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putAllConfigOverrides(java.util.Map values) { - internalGetMutableConfigOverrides().getMutableMap().putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private com.google.cloud.metastore.v1.KerberosConfig kerberosConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.KerberosConfig, - com.google.cloud.metastore.v1.KerberosConfig.Builder, - com.google.cloud.metastore.v1.KerberosConfigOrBuilder> - kerberosConfigBuilder_; - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - public boolean hasKerberosConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - public com.google.cloud.metastore.v1.KerberosConfig getKerberosConfig() { - if (kerberosConfigBuilder_ == null) { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } else { - return kerberosConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - public Builder setKerberosConfig(com.google.cloud.metastore.v1.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kerberosConfig_ = value; - } else { - kerberosConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - public Builder setKerberosConfig( - com.google.cloud.metastore.v1.KerberosConfig.Builder builderForValue) { - if (kerberosConfigBuilder_ == null) { - kerberosConfig_ = builderForValue.build(); - } else { - kerberosConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - public Builder mergeKerberosConfig(com.google.cloud.metastore.v1.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && kerberosConfig_ != null - && kerberosConfig_ - != com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance()) { - getKerberosConfigBuilder().mergeFrom(value); - } else { - kerberosConfig_ = value; - } - } else { - kerberosConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - public Builder clearKerberosConfig() { - bitField0_ = (bitField0_ & ~0x00000004); - kerberosConfig_ = null; - if (kerberosConfigBuilder_ != null) { - kerberosConfigBuilder_.dispose(); - kerberosConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - public com.google.cloud.metastore.v1.KerberosConfig.Builder getKerberosConfigBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getKerberosConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - public com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - if (kerberosConfigBuilder_ != null) { - return kerberosConfigBuilder_.getMessageOrBuilder(); - } else { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.KerberosConfig, - com.google.cloud.metastore.v1.KerberosConfig.Builder, - com.google.cloud.metastore.v1.KerberosConfigOrBuilder> - getKerberosConfigFieldBuilder() { - if (kerberosConfigBuilder_ == null) { - kerberosConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.KerberosConfig, - com.google.cloud.metastore.v1.KerberosConfig.Builder, - com.google.cloud.metastore.v1.KerberosConfigOrBuilder>( - getKerberosConfig(), getParentForChildren(), isClean()); - kerberosConfig_ = null; - } - return kerberosConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.HiveMetastoreConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.HiveMetastoreConfig) - private static final com.google.cloud.metastore.v1.HiveMetastoreConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.HiveMetastoreConfig(); - } - - public static com.google.cloud.metastore.v1.HiveMetastoreConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HiveMetastoreConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.HiveMetastoreConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfigOrBuilder.java deleted file mode 100644 index d1d8edcdac32..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfigOrBuilder.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface HiveMetastoreConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.HiveMetastoreConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - int getConfigOverridesCount(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - boolean containsConfigOverrides(java.lang.String key); - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getConfigOverrides(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.util.Map getConfigOverridesMap(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - /* nullable */ - java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.lang.String getConfigOverridesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - boolean hasKerberosConfig(); - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - com.google.cloud.metastore.v1.KerberosConfig getKerberosConfig(); - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; - */ - com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfig.java deleted file mode 100644 index bc2c7f48751b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfig.java +++ /dev/null @@ -1,1110 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Configuration information for a Kerberos principal.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.KerberosConfig} - */ -public final class KerberosConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.KerberosConfig) - KerberosConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use KerberosConfig.newBuilder() to construct. - private KerberosConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private KerberosConfig() { - principal_ = ""; - krb5ConfigGcsUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new KerberosConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.KerberosConfig.class, - com.google.cloud.metastore.v1.KerberosConfig.Builder.class); - } - - public static final int KEYTAB_FIELD_NUMBER = 1; - private com.google.cloud.metastore.v1.Secret keytab_; - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - @java.lang.Override - public boolean hasKeytab() { - return keytab_ != null; - } - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - * - * @return The keytab. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Secret getKeytab() { - return keytab_ == null ? com.google.cloud.metastore.v1.Secret.getDefaultInstance() : keytab_; - } - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.SecretOrBuilder getKeytabOrBuilder() { - return keytab_ == null ? com.google.cloud.metastore.v1.Secret.getDefaultInstance() : keytab_; - } - - public static final int PRINCIPAL_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object principal_ = ""; - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The principal. - */ - @java.lang.Override - public java.lang.String getPrincipal() { - java.lang.Object ref = principal_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principal_ = s; - return s; - } - } - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrincipalBytes() { - java.lang.Object ref = principal_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - principal_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KRB5_CONFIG_GCS_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object krb5ConfigGcsUri_ = ""; - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - @java.lang.Override - public java.lang.String getKrb5ConfigGcsUri() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - krb5ConfigGcsUri_ = s; - return s; - } - } - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - krb5ConfigGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (keytab_ != null) { - output.writeMessage(1, getKeytab()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, principal_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, krb5ConfigGcsUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (keytab_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKeytab()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, principal_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, krb5ConfigGcsUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.KerberosConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.KerberosConfig other = - (com.google.cloud.metastore.v1.KerberosConfig) obj; - - if (hasKeytab() != other.hasKeytab()) return false; - if (hasKeytab()) { - if (!getKeytab().equals(other.getKeytab())) return false; - } - if (!getPrincipal().equals(other.getPrincipal())) return false; - if (!getKrb5ConfigGcsUri().equals(other.getKrb5ConfigGcsUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKeytab()) { - hash = (37 * hash) + KEYTAB_FIELD_NUMBER; - hash = (53 * hash) + getKeytab().hashCode(); - } - hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; - hash = (53 * hash) + getPrincipal().hashCode(); - hash = (37 * hash) + KRB5_CONFIG_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getKrb5ConfigGcsUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.KerberosConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Configuration information for a Kerberos principal.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.KerberosConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.KerberosConfig) - com.google.cloud.metastore.v1.KerberosConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.KerberosConfig.class, - com.google.cloud.metastore.v1.KerberosConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.KerberosConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - keytab_ = null; - if (keytabBuilder_ != null) { - keytabBuilder_.dispose(); - keytabBuilder_ = null; - } - principal_ = ""; - krb5ConfigGcsUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_KerberosConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.KerberosConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.KerberosConfig build() { - com.google.cloud.metastore.v1.KerberosConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.KerberosConfig buildPartial() { - com.google.cloud.metastore.v1.KerberosConfig result = - new com.google.cloud.metastore.v1.KerberosConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.KerberosConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.keytab_ = keytabBuilder_ == null ? keytab_ : keytabBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.principal_ = principal_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.krb5ConfigGcsUri_ = krb5ConfigGcsUri_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.KerberosConfig) { - return mergeFrom((com.google.cloud.metastore.v1.KerberosConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.KerberosConfig other) { - if (other == com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance()) return this; - if (other.hasKeytab()) { - mergeKeytab(other.getKeytab()); - } - if (!other.getPrincipal().isEmpty()) { - principal_ = other.principal_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getKrb5ConfigGcsUri().isEmpty()) { - krb5ConfigGcsUri_ = other.krb5ConfigGcsUri_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getKeytabFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - principal_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - krb5ConfigGcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.metastore.v1.Secret keytab_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Secret, - com.google.cloud.metastore.v1.Secret.Builder, - com.google.cloud.metastore.v1.SecretOrBuilder> - keytabBuilder_; - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - public boolean hasKeytab() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - * - * @return The keytab. - */ - public com.google.cloud.metastore.v1.Secret getKeytab() { - if (keytabBuilder_ == null) { - return keytab_ == null - ? com.google.cloud.metastore.v1.Secret.getDefaultInstance() - : keytab_; - } else { - return keytabBuilder_.getMessage(); - } - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - public Builder setKeytab(com.google.cloud.metastore.v1.Secret value) { - if (keytabBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - keytab_ = value; - } else { - keytabBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - public Builder setKeytab(com.google.cloud.metastore.v1.Secret.Builder builderForValue) { - if (keytabBuilder_ == null) { - keytab_ = builderForValue.build(); - } else { - keytabBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - public Builder mergeKeytab(com.google.cloud.metastore.v1.Secret value) { - if (keytabBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && keytab_ != null - && keytab_ != com.google.cloud.metastore.v1.Secret.getDefaultInstance()) { - getKeytabBuilder().mergeFrom(value); - } else { - keytab_ = value; - } - } else { - keytabBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - public Builder clearKeytab() { - bitField0_ = (bitField0_ & ~0x00000001); - keytab_ = null; - if (keytabBuilder_ != null) { - keytabBuilder_.dispose(); - keytabBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - public com.google.cloud.metastore.v1.Secret.Builder getKeytabBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getKeytabFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - public com.google.cloud.metastore.v1.SecretOrBuilder getKeytabOrBuilder() { - if (keytabBuilder_ != null) { - return keytabBuilder_.getMessageOrBuilder(); - } else { - return keytab_ == null - ? com.google.cloud.metastore.v1.Secret.getDefaultInstance() - : keytab_; - } - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Secret, - com.google.cloud.metastore.v1.Secret.Builder, - com.google.cloud.metastore.v1.SecretOrBuilder> - getKeytabFieldBuilder() { - if (keytabBuilder_ == null) { - keytabBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Secret, - com.google.cloud.metastore.v1.Secret.Builder, - com.google.cloud.metastore.v1.SecretOrBuilder>( - getKeytab(), getParentForChildren(), isClean()); - keytab_ = null; - } - return keytabBuilder_; - } - - private java.lang.Object principal_ = ""; - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return The principal. - */ - public java.lang.String getPrincipal() { - java.lang.Object ref = principal_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principal_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - public com.google.protobuf.ByteString getPrincipalBytes() { - java.lang.Object ref = principal_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - principal_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @param value The principal to set. - * @return This builder for chaining. - */ - public Builder setPrincipal(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - principal_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return This builder for chaining. - */ - public Builder clearPrincipal() { - principal_ = getDefaultInstance().getPrincipal(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @param value The bytes for principal to set. - * @return This builder for chaining. - */ - public Builder setPrincipalBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - principal_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object krb5ConfigGcsUri_ = ""; - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - public java.lang.String getKrb5ConfigGcsUri() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - krb5ConfigGcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - public com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - krb5ConfigGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @param value The krb5ConfigGcsUri to set. - * @return This builder for chaining. - */ - public Builder setKrb5ConfigGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - krb5ConfigGcsUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return This builder for chaining. - */ - public Builder clearKrb5ConfigGcsUri() { - krb5ConfigGcsUri_ = getDefaultInstance().getKrb5ConfigGcsUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @param value The bytes for krb5ConfigGcsUri to set. - * @return This builder for chaining. - */ - public Builder setKrb5ConfigGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - krb5ConfigGcsUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.KerberosConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.KerberosConfig) - private static final com.google.cloud.metastore.v1.KerberosConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.KerberosConfig(); - } - - public static com.google.cloud.metastore.v1.KerberosConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KerberosConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.KerberosConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfigOrBuilder.java deleted file mode 100644 index ebff6682ad9a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfigOrBuilder.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface KerberosConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.KerberosConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - boolean hasKeytab(); - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - * - * @return The keytab. - */ - com.google.cloud.metastore.v1.Secret getKeytab(); - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1.Secret keytab = 1; - */ - com.google.cloud.metastore.v1.SecretOrBuilder getKeytabOrBuilder(); - - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The principal. - */ - java.lang.String getPrincipal(); - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - com.google.protobuf.ByteString getPrincipalBytes(); - - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - java.lang.String getKrb5ConfigGcsUri(); - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequest.java deleted file mode 100644 index a21933b73400..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequest.java +++ /dev/null @@ -1,1353 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListBackupsRequest} - */ -public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListBackupsRequest) - ListBackupsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListBackupsRequest.newBuilder() to construct. - private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListBackupsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListBackupsRequest.class, - com.google.cloud.metastore.v1.ListBackupsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of backups to return. The response may contain less
-   * than the maximum number. If unspecified, no more than 500 backups are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ListBackupsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ListBackupsRequest other = - (com.google.cloud.metastore.v1.ListBackupsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.ListBackupsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListBackupsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListBackupsRequest) - com.google.cloud.metastore.v1.ListBackupsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListBackupsRequest.class, - com.google.cloud.metastore.v1.ListBackupsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ListBackupsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListBackupsRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ListBackupsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListBackupsRequest build() { - com.google.cloud.metastore.v1.ListBackupsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListBackupsRequest buildPartial() { - com.google.cloud.metastore.v1.ListBackupsRequest result = - new com.google.cloud.metastore.v1.ListBackupsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ListBackupsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ListBackupsRequest) { - return mergeFrom((com.google.cloud.metastore.v1.ListBackupsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ListBackupsRequest other) { - if (other == com.google.cloud.metastore.v1.ListBackupsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListBackupsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListBackupsRequest) - private static final com.google.cloud.metastore.v1.ListBackupsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListBackupsRequest(); - } - - public static com.google.cloud.metastore.v1.ListBackupsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListBackupsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequestOrBuilder.java deleted file mode 100644 index 91ef4eedd391..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequestOrBuilder.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface ListBackupsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListBackupsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of backups to return. The response may contain less
-   * than the maximum number. If unspecified, no more than 500 backups are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponse.java deleted file mode 100644 index 808dc3fd6ea3..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponse.java +++ /dev/null @@ -1,1400 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Response message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListBackupsResponse} - */ -public final class ListBackupsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListBackupsResponse) - ListBackupsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListBackupsResponse.newBuilder() to construct. - private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListBackupsResponse() { - backups_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListBackupsResponse.class, - com.google.cloud.metastore.v1.ListBackupsResponse.Builder.class); - } - - public static final int BACKUPS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List backups_; - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - @java.lang.Override - public java.util.List getBackupsList() { - return backups_; - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - @java.lang.Override - public java.util.List - getBackupsOrBuilderList() { - return backups_; - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - @java.lang.Override - public int getBackupsCount() { - return backups_.size(); - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Backup getBackups(int index) { - return backups_.get(index); - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.BackupOrBuilder getBackupsOrBuilder(int index) { - return backups_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < backups_.size(); i++) { - output.writeMessage(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < backups_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ListBackupsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ListBackupsResponse other = - (com.google.cloud.metastore.v1.ListBackupsResponse) obj; - - if (!getBackupsList().equals(other.getBackupsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getBackupsCount() > 0) { - hash = (37 * hash) + BACKUPS_FIELD_NUMBER; - hash = (53 * hash) + getBackupsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.ListBackupsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListBackupsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListBackupsResponse) - com.google.cloud.metastore.v1.ListBackupsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListBackupsResponse.class, - com.google.cloud.metastore.v1.ListBackupsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ListBackupsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - } else { - backups_ = null; - backupsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListBackupsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListBackupsResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ListBackupsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListBackupsResponse build() { - com.google.cloud.metastore.v1.ListBackupsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListBackupsResponse buildPartial() { - com.google.cloud.metastore.v1.ListBackupsResponse result = - new com.google.cloud.metastore.v1.ListBackupsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1.ListBackupsResponse result) { - if (backupsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - backups_ = java.util.Collections.unmodifiableList(backups_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.backups_ = backups_; - } else { - result.backups_ = backupsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ListBackupsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ListBackupsResponse) { - return mergeFrom((com.google.cloud.metastore.v1.ListBackupsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ListBackupsResponse other) { - if (other == com.google.cloud.metastore.v1.ListBackupsResponse.getDefaultInstance()) - return this; - if (backupsBuilder_ == null) { - if (!other.backups_.isEmpty()) { - if (backups_.isEmpty()) { - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBackupsIsMutable(); - backups_.addAll(other.backups_); - } - onChanged(); - } - } else { - if (!other.backups_.isEmpty()) { - if (backupsBuilder_.isEmpty()) { - backupsBuilder_.dispose(); - backupsBuilder_ = null; - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - backupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBackupsFieldBuilder() - : null; - } else { - backupsBuilder_.addAllMessages(other.backups_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1.Backup m = - input.readMessage( - com.google.cloud.metastore.v1.Backup.parser(), extensionRegistry); - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(m); - } else { - backupsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List backups_ = - java.util.Collections.emptyList(); - - private void ensureBackupsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - backups_ = new java.util.ArrayList(backups_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Backup, - com.google.cloud.metastore.v1.Backup.Builder, - com.google.cloud.metastore.v1.BackupOrBuilder> - backupsBuilder_; - - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public java.util.List getBackupsList() { - if (backupsBuilder_ == null) { - return java.util.Collections.unmodifiableList(backups_); - } else { - return backupsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public int getBackupsCount() { - if (backupsBuilder_ == null) { - return backups_.size(); - } else { - return backupsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public com.google.cloud.metastore.v1.Backup getBackups(int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); - } else { - return backupsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder setBackups(int index, com.google.cloud.metastore.v1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.set(index, value); - onChanged(); - } else { - backupsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder setBackups( - int index, com.google.cloud.metastore.v1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.set(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder addBackups(com.google.cloud.metastore.v1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(value); - onChanged(); - } else { - backupsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder addBackups(int index, com.google.cloud.metastore.v1.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(index, value); - onChanged(); - } else { - backupsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder addBackups(com.google.cloud.metastore.v1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder addBackups( - int index, com.google.cloud.metastore.v1.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder addAllBackups( - java.lang.Iterable values) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backups_); - onChanged(); - } else { - backupsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder clearBackups() { - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - backupsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public Builder removeBackups(int index) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.remove(index); - onChanged(); - } else { - backupsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public com.google.cloud.metastore.v1.Backup.Builder getBackupsBuilder(int index) { - return getBackupsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public com.google.cloud.metastore.v1.BackupOrBuilder getBackupsOrBuilder(int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); - } else { - return backupsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public java.util.List - getBackupsOrBuilderList() { - if (backupsBuilder_ != null) { - return backupsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(backups_); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public com.google.cloud.metastore.v1.Backup.Builder addBackupsBuilder() { - return getBackupsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1.Backup.getDefaultInstance()); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public com.google.cloud.metastore.v1.Backup.Builder addBackupsBuilder(int index) { - return getBackupsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1.Backup.getDefaultInstance()); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - public java.util.List getBackupsBuilderList() { - return getBackupsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Backup, - com.google.cloud.metastore.v1.Backup.Builder, - com.google.cloud.metastore.v1.BackupOrBuilder> - getBackupsFieldBuilder() { - if (backupsBuilder_ == null) { - backupsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Backup, - com.google.cloud.metastore.v1.Backup.Builder, - com.google.cloud.metastore.v1.BackupOrBuilder>( - backups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - backups_ = null; - } - return backupsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListBackupsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListBackupsResponse) - private static final com.google.cloud.metastore.v1.ListBackupsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListBackupsResponse(); - } - - public static com.google.cloud.metastore.v1.ListBackupsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListBackupsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponseOrBuilder.java deleted file mode 100644 index cdd290dc0797..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponseOrBuilder.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface ListBackupsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListBackupsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - java.util.List getBackupsList(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - com.google.cloud.metastore.v1.Backup getBackups(int index); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - int getBackupsCount(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - java.util.List getBackupsOrBuilderList(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.Backup backups = 1; - */ - com.google.cloud.metastore.v1.BackupOrBuilder getBackupsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequest.java deleted file mode 100644 index 3907999690ef..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequest.java +++ /dev/null @@ -1,1353 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for ListFederations.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListFederationsRequest} - */ -public final class ListFederationsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListFederationsRequest) - ListFederationsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListFederationsRequest.newBuilder() to construct. - private ListFederationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListFederationsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListFederationsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListFederationsRequest.class, - com.google.cloud.metastore.v1.ListFederationsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location of metastore federations
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location of metastore federations
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of federations to return. The response may contain less
-   * than the maximum number. If unspecified, no more than 500 services are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ListFederationsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ListFederationsRequest other = - (com.google.cloud.metastore.v1.ListFederationsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.ListFederationsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for ListFederations.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListFederationsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListFederationsRequest) - com.google.cloud.metastore.v1.ListFederationsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListFederationsRequest.class, - com.google.cloud.metastore.v1.ListFederationsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ListFederationsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListFederationsRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ListFederationsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListFederationsRequest build() { - com.google.cloud.metastore.v1.ListFederationsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListFederationsRequest buildPartial() { - com.google.cloud.metastore.v1.ListFederationsRequest result = - new com.google.cloud.metastore.v1.ListFederationsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ListFederationsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ListFederationsRequest) { - return mergeFrom((com.google.cloud.metastore.v1.ListFederationsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ListFederationsRequest other) { - if (other == com.google.cloud.metastore.v1.ListFederationsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location of metastore federations
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore federations
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore federations
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore federations
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore federations
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 services are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 services are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 services are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListFederationsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListFederationsRequest) - private static final com.google.cloud.metastore.v1.ListFederationsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListFederationsRequest(); - } - - public static com.google.cloud.metastore.v1.ListFederationsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFederationsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListFederationsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequestOrBuilder.java deleted file mode 100644 index a5da5c025eb9..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequestOrBuilder.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public interface ListFederationsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListFederationsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location of metastore federations
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location of metastore federations
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of federations to return. The response may contain less
-   * than the maximum number. If unspecified, no more than 500 services are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponse.java deleted file mode 100644 index 244662160719..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponse.java +++ /dev/null @@ -1,1404 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Response message for ListFederations
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListFederationsResponse} - */ -public final class ListFederationsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListFederationsResponse) - ListFederationsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListFederationsResponse.newBuilder() to construct. - private ListFederationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListFederationsResponse() { - federations_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListFederationsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListFederationsResponse.class, - com.google.cloud.metastore.v1.ListFederationsResponse.Builder.class); - } - - public static final int FEDERATIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List federations_; - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - @java.lang.Override - public java.util.List getFederationsList() { - return federations_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - @java.lang.Override - public java.util.List - getFederationsOrBuilderList() { - return federations_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - @java.lang.Override - public int getFederationsCount() { - return federations_.size(); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Federation getFederations(int index) { - return federations_.get(index); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.FederationOrBuilder getFederationsOrBuilder(int index) { - return federations_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < federations_.size(); i++) { - output.writeMessage(1, federations_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < federations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, federations_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ListFederationsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ListFederationsResponse other = - (com.google.cloud.metastore.v1.ListFederationsResponse) obj; - - if (!getFederationsList().equals(other.getFederationsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFederationsCount() > 0) { - hash = (37 * hash) + FEDERATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFederationsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.ListFederationsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for ListFederations
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListFederationsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListFederationsResponse) - com.google.cloud.metastore.v1.ListFederationsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListFederationsResponse.class, - com.google.cloud.metastore.v1.ListFederationsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ListFederationsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (federationsBuilder_ == null) { - federations_ = java.util.Collections.emptyList(); - } else { - federations_ = null; - federationsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListFederationsResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ListFederationsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListFederationsResponse build() { - com.google.cloud.metastore.v1.ListFederationsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListFederationsResponse buildPartial() { - com.google.cloud.metastore.v1.ListFederationsResponse result = - new com.google.cloud.metastore.v1.ListFederationsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1.ListFederationsResponse result) { - if (federationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - federations_ = java.util.Collections.unmodifiableList(federations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.federations_ = federations_; - } else { - result.federations_ = federationsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ListFederationsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ListFederationsResponse) { - return mergeFrom((com.google.cloud.metastore.v1.ListFederationsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ListFederationsResponse other) { - if (other == com.google.cloud.metastore.v1.ListFederationsResponse.getDefaultInstance()) - return this; - if (federationsBuilder_ == null) { - if (!other.federations_.isEmpty()) { - if (federations_.isEmpty()) { - federations_ = other.federations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFederationsIsMutable(); - federations_.addAll(other.federations_); - } - onChanged(); - } - } else { - if (!other.federations_.isEmpty()) { - if (federationsBuilder_.isEmpty()) { - federationsBuilder_.dispose(); - federationsBuilder_ = null; - federations_ = other.federations_; - bitField0_ = (bitField0_ & ~0x00000001); - federationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFederationsFieldBuilder() - : null; - } else { - federationsBuilder_.addAllMessages(other.federations_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1.Federation m = - input.readMessage( - com.google.cloud.metastore.v1.Federation.parser(), extensionRegistry); - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(m); - } else { - federationsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List federations_ = - java.util.Collections.emptyList(); - - private void ensureFederationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - federations_ = - new java.util.ArrayList(federations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder> - federationsBuilder_; - - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public java.util.List getFederationsList() { - if (federationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(federations_); - } else { - return federationsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public int getFederationsCount() { - if (federationsBuilder_ == null) { - return federations_.size(); - } else { - return federationsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public com.google.cloud.metastore.v1.Federation getFederations(int index) { - if (federationsBuilder_ == null) { - return federations_.get(index); - } else { - return federationsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder setFederations(int index, com.google.cloud.metastore.v1.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.set(index, value); - onChanged(); - } else { - federationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder setFederations( - int index, com.google.cloud.metastore.v1.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.set(index, builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder addFederations(com.google.cloud.metastore.v1.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.add(value); - onChanged(); - } else { - federationsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder addFederations(int index, com.google.cloud.metastore.v1.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.add(index, value); - onChanged(); - } else { - federationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder addFederations( - com.google.cloud.metastore.v1.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder addFederations( - int index, com.google.cloud.metastore.v1.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(index, builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder addAllFederations( - java.lang.Iterable values) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, federations_); - onChanged(); - } else { - federationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder clearFederations() { - if (federationsBuilder_ == null) { - federations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - federationsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public Builder removeFederations(int index) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.remove(index); - onChanged(); - } else { - federationsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public com.google.cloud.metastore.v1.Federation.Builder getFederationsBuilder(int index) { - return getFederationsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public com.google.cloud.metastore.v1.FederationOrBuilder getFederationsOrBuilder(int index) { - if (federationsBuilder_ == null) { - return federations_.get(index); - } else { - return federationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public java.util.List - getFederationsOrBuilderList() { - if (federationsBuilder_ != null) { - return federationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(federations_); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public com.google.cloud.metastore.v1.Federation.Builder addFederationsBuilder() { - return getFederationsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1.Federation.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public com.google.cloud.metastore.v1.Federation.Builder addFederationsBuilder(int index) { - return getFederationsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1.Federation.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - public java.util.List - getFederationsBuilderList() { - return getFederationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder> - getFederationsFieldBuilder() { - if (federationsBuilder_ == null) { - federationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder>( - federations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - federations_ = null; - } - return federationsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListFederationsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListFederationsResponse) - private static final com.google.cloud.metastore.v1.ListFederationsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListFederationsResponse(); - } - - public static com.google.cloud.metastore.v1.ListFederationsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFederationsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListFederationsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponseOrBuilder.java deleted file mode 100644 index ac2910584c11..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public interface ListFederationsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListFederationsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - java.util.List getFederationsList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - com.google.cloud.metastore.v1.Federation getFederations(int index); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - int getFederationsCount(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - java.util.List - getFederationsOrBuilderList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Federation federations = 1; - */ - com.google.cloud.metastore.v1.FederationOrBuilder getFederationsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequest.java deleted file mode 100644 index 41baac20e2c4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequest.java +++ /dev/null @@ -1,1354 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListMetadataImportsRequest} - */ -public final class ListMetadataImportsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListMetadataImportsRequest) - ListMetadataImportsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListMetadataImportsRequest.newBuilder() to construct. - private ListMetadataImportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListMetadataImportsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListMetadataImportsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListMetadataImportsRequest.class, - com.google.cloud.metastore.v1.ListMetadataImportsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of imports to return. The response may contain less
-   * than the maximum number. If unspecified, no more than 500 imports are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ListMetadataImportsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ListMetadataImportsRequest other = - (com.google.cloud.metastore.v1.ListMetadataImportsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.ListMetadataImportsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListMetadataImportsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListMetadataImportsRequest) - com.google.cloud.metastore.v1.ListMetadataImportsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListMetadataImportsRequest.class, - com.google.cloud.metastore.v1.ListMetadataImportsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ListMetadataImportsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListMetadataImportsRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ListMetadataImportsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListMetadataImportsRequest build() { - com.google.cloud.metastore.v1.ListMetadataImportsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListMetadataImportsRequest buildPartial() { - com.google.cloud.metastore.v1.ListMetadataImportsRequest result = - new com.google.cloud.metastore.v1.ListMetadataImportsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ListMetadataImportsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ListMetadataImportsRequest) { - return mergeFrom((com.google.cloud.metastore.v1.ListMetadataImportsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ListMetadataImportsRequest other) { - if (other == com.google.cloud.metastore.v1.ListMetadataImportsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListMetadataImportsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListMetadataImportsRequest) - private static final com.google.cloud.metastore.v1.ListMetadataImportsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListMetadataImportsRequest(); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListMetadataImportsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListMetadataImportsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequestOrBuilder.java deleted file mode 100644 index e466ddad30d6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequestOrBuilder.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface ListMetadataImportsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListMetadataImportsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of imports to return. The response may contain less
-   * than the maximum number. If unspecified, no more than 500 imports are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponse.java deleted file mode 100644 index 811e7377ef70..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponse.java +++ /dev/null @@ -1,1413 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Response message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListMetadataImportsResponse} - */ -public final class ListMetadataImportsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListMetadataImportsResponse) - ListMetadataImportsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListMetadataImportsResponse.newBuilder() to construct. - private ListMetadataImportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListMetadataImportsResponse() { - metadataImports_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListMetadataImportsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListMetadataImportsResponse.class, - com.google.cloud.metastore.v1.ListMetadataImportsResponse.Builder.class); - } - - public static final int METADATA_IMPORTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List metadataImports_; - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public java.util.List getMetadataImportsList() { - return metadataImports_; - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public java.util.List - getMetadataImportsOrBuilderList() { - return metadataImports_; - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public int getMetadataImportsCount() { - return metadataImports_.size(); - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport getMetadataImports(int index) { - return metadataImports_.get(index); - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportsOrBuilder( - int index) { - return metadataImports_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < metadataImports_.size(); i++) { - output.writeMessage(1, metadataImports_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < metadataImports_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metadataImports_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ListMetadataImportsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ListMetadataImportsResponse other = - (com.google.cloud.metastore.v1.ListMetadataImportsResponse) obj; - - if (!getMetadataImportsList().equals(other.getMetadataImportsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getMetadataImportsCount() > 0) { - hash = (37 * hash) + METADATA_IMPORTS_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImportsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.ListMetadataImportsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListMetadataImportsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListMetadataImportsResponse) - com.google.cloud.metastore.v1.ListMetadataImportsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListMetadataImportsResponse.class, - com.google.cloud.metastore.v1.ListMetadataImportsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ListMetadataImportsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (metadataImportsBuilder_ == null) { - metadataImports_ = java.util.Collections.emptyList(); - } else { - metadataImports_ = null; - metadataImportsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListMetadataImportsResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ListMetadataImportsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListMetadataImportsResponse build() { - com.google.cloud.metastore.v1.ListMetadataImportsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListMetadataImportsResponse buildPartial() { - com.google.cloud.metastore.v1.ListMetadataImportsResponse result = - new com.google.cloud.metastore.v1.ListMetadataImportsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1.ListMetadataImportsResponse result) { - if (metadataImportsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - metadataImports_ = java.util.Collections.unmodifiableList(metadataImports_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.metadataImports_ = metadataImports_; - } else { - result.metadataImports_ = metadataImportsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ListMetadataImportsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ListMetadataImportsResponse) { - return mergeFrom((com.google.cloud.metastore.v1.ListMetadataImportsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ListMetadataImportsResponse other) { - if (other == com.google.cloud.metastore.v1.ListMetadataImportsResponse.getDefaultInstance()) - return this; - if (metadataImportsBuilder_ == null) { - if (!other.metadataImports_.isEmpty()) { - if (metadataImports_.isEmpty()) { - metadataImports_ = other.metadataImports_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMetadataImportsIsMutable(); - metadataImports_.addAll(other.metadataImports_); - } - onChanged(); - } - } else { - if (!other.metadataImports_.isEmpty()) { - if (metadataImportsBuilder_.isEmpty()) { - metadataImportsBuilder_.dispose(); - metadataImportsBuilder_ = null; - metadataImports_ = other.metadataImports_; - bitField0_ = (bitField0_ & ~0x00000001); - metadataImportsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMetadataImportsFieldBuilder() - : null; - } else { - metadataImportsBuilder_.addAllMessages(other.metadataImports_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1.MetadataImport m = - input.readMessage( - com.google.cloud.metastore.v1.MetadataImport.parser(), extensionRegistry); - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(m); - } else { - metadataImportsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List metadataImports_ = - java.util.Collections.emptyList(); - - private void ensureMetadataImportsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - metadataImports_ = - new java.util.ArrayList(metadataImports_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder> - metadataImportsBuilder_; - - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public java.util.List getMetadataImportsList() { - if (metadataImportsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metadataImports_); - } else { - return metadataImportsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public int getMetadataImportsCount() { - if (metadataImportsBuilder_ == null) { - return metadataImports_.size(); - } else { - return metadataImportsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1.MetadataImport getMetadataImports(int index) { - if (metadataImportsBuilder_ == null) { - return metadataImports_.get(index); - } else { - return metadataImportsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder setMetadataImports( - int index, com.google.cloud.metastore.v1.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.set(index, value); - onChanged(); - } else { - metadataImportsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder setMetadataImports( - int index, com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.set(index, builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports(com.google.cloud.metastore.v1.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.add(value); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - int index, com.google.cloud.metastore.v1.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.add(index, value); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - int index, com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(index, builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder addAllMetadataImports( - java.lang.Iterable values) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metadataImports_); - onChanged(); - } else { - metadataImportsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder clearMetadataImports() { - if (metadataImportsBuilder_ == null) { - metadataImports_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - metadataImportsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public Builder removeMetadataImports(int index) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.remove(index); - onChanged(); - } else { - metadataImportsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1.MetadataImport.Builder getMetadataImportsBuilder( - int index) { - return getMetadataImportsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportsOrBuilder( - int index) { - if (metadataImportsBuilder_ == null) { - return metadataImports_.get(index); - } else { - return metadataImportsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public java.util.List - getMetadataImportsOrBuilderList() { - if (metadataImportsBuilder_ != null) { - return metadataImportsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metadataImports_); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1.MetadataImport.Builder addMetadataImportsBuilder() { - return getMetadataImportsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1.MetadataImport.Builder addMetadataImportsBuilder( - int index) { - return getMetadataImportsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - public java.util.List - getMetadataImportsBuilderList() { - return getMetadataImportsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder> - getMetadataImportsFieldBuilder() { - if (metadataImportsBuilder_ == null) { - metadataImportsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder>( - metadataImports_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - metadataImports_ = null; - } - return metadataImportsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListMetadataImportsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListMetadataImportsResponse) - private static final com.google.cloud.metastore.v1.ListMetadataImportsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListMetadataImportsResponse(); - } - - public static com.google.cloud.metastore.v1.ListMetadataImportsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListMetadataImportsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListMetadataImportsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponseOrBuilder.java deleted file mode 100644 index 13f1bad52b15..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface ListMetadataImportsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListMetadataImportsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - java.util.List getMetadataImportsList(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - com.google.cloud.metastore.v1.MetadataImport getMetadataImports(int index); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - int getMetadataImportsCount(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - java.util.List - getMetadataImportsOrBuilderList(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; - */ - com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequest.java deleted file mode 100644 index a8badaabcb75..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequest.java +++ /dev/null @@ -1,1353 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListServicesRequest} - */ -public final class ListServicesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListServicesRequest) - ListServicesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListServicesRequest.newBuilder() to construct. - private ListServicesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListServicesRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListServicesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListServicesRequest.class, - com.google.cloud.metastore.v1.ListServicesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of services to return. The response may contain less
-   * than the maximum number. If unspecified, no more than 500 services are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ListServicesRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ListServicesRequest other = - (com.google.cloud.metastore.v1.ListServicesRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.ListServicesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListServicesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListServicesRequest) - com.google.cloud.metastore.v1.ListServicesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListServicesRequest.class, - com.google.cloud.metastore.v1.ListServicesRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ListServicesRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListServicesRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ListServicesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListServicesRequest build() { - com.google.cloud.metastore.v1.ListServicesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListServicesRequest buildPartial() { - com.google.cloud.metastore.v1.ListServicesRequest result = - new com.google.cloud.metastore.v1.ListServicesRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ListServicesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ListServicesRequest) { - return mergeFrom((com.google.cloud.metastore.v1.ListServicesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ListServicesRequest other) { - if (other == com.google.cloud.metastore.v1.ListServicesRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 services are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 services are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may contain less
-     * than the maximum number. If unspecified, no more than 500 services are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListServicesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListServicesRequest) - private static final com.google.cloud.metastore.v1.ListServicesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListServicesRequest(); - } - - public static com.google.cloud.metastore.v1.ListServicesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListServicesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListServicesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequestOrBuilder.java deleted file mode 100644 index 1b4290208820..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequestOrBuilder.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface ListServicesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListServicesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of services to return. The response may contain less
-   * than the maximum number. If unspecified, no more than 500 services are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponse.java deleted file mode 100644 index 91d2da873144..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponse.java +++ /dev/null @@ -1,1400 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Response message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListServicesResponse} - */ -public final class ListServicesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListServicesResponse) - ListServicesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListServicesResponse.newBuilder() to construct. - private ListServicesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListServicesResponse() { - services_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListServicesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListServicesResponse.class, - com.google.cloud.metastore.v1.ListServicesResponse.Builder.class); - } - - public static final int SERVICES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List services_; - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - @java.lang.Override - public java.util.List getServicesList() { - return services_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - @java.lang.Override - public java.util.List - getServicesOrBuilderList() { - return services_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - @java.lang.Override - public int getServicesCount() { - return services_.size(); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service getServices(int index) { - return services_.get(index); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.ServiceOrBuilder getServicesOrBuilder(int index) { - return services_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < services_.size(); i++) { - output.writeMessage(1, services_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < services_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.ListServicesResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.ListServicesResponse other = - (com.google.cloud.metastore.v1.ListServicesResponse) obj; - - if (!getServicesList().equals(other.getServicesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getServicesCount() > 0) { - hash = (37 * hash) + SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getServicesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.ListServicesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.ListServicesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListServicesResponse) - com.google.cloud.metastore.v1.ListServicesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.ListServicesResponse.class, - com.google.cloud.metastore.v1.ListServicesResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.ListServicesResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - } else { - services_ = null; - servicesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_ListServicesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListServicesResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.ListServicesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListServicesResponse build() { - com.google.cloud.metastore.v1.ListServicesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListServicesResponse buildPartial() { - com.google.cloud.metastore.v1.ListServicesResponse result = - new com.google.cloud.metastore.v1.ListServicesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1.ListServicesResponse result) { - if (servicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - services_ = java.util.Collections.unmodifiableList(services_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.services_ = services_; - } else { - result.services_ = servicesBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1.ListServicesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.ListServicesResponse) { - return mergeFrom((com.google.cloud.metastore.v1.ListServicesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.ListServicesResponse other) { - if (other == com.google.cloud.metastore.v1.ListServicesResponse.getDefaultInstance()) - return this; - if (servicesBuilder_ == null) { - if (!other.services_.isEmpty()) { - if (services_.isEmpty()) { - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServicesIsMutable(); - services_.addAll(other.services_); - } - onChanged(); - } - } else { - if (!other.services_.isEmpty()) { - if (servicesBuilder_.isEmpty()) { - servicesBuilder_.dispose(); - servicesBuilder_ = null; - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - servicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getServicesFieldBuilder() - : null; - } else { - servicesBuilder_.addAllMessages(other.services_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1.Service m = - input.readMessage( - com.google.cloud.metastore.v1.Service.parser(), extensionRegistry); - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(m); - } else { - servicesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List services_ = - java.util.Collections.emptyList(); - - private void ensureServicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - services_ = new java.util.ArrayList(services_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder> - servicesBuilder_; - - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public java.util.List getServicesList() { - if (servicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(services_); - } else { - return servicesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public int getServicesCount() { - if (servicesBuilder_ == null) { - return services_.size(); - } else { - return servicesBuilder_.getCount(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public com.google.cloud.metastore.v1.Service getServices(int index) { - if (servicesBuilder_ == null) { - return services_.get(index); - } else { - return servicesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder setServices(int index, com.google.cloud.metastore.v1.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.set(index, value); - onChanged(); - } else { - servicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder setServices( - int index, com.google.cloud.metastore.v1.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.set(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder addServices(com.google.cloud.metastore.v1.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(value); - onChanged(); - } else { - servicesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder addServices(int index, com.google.cloud.metastore.v1.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(index, value); - onChanged(); - } else { - servicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder addServices(com.google.cloud.metastore.v1.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder addServices( - int index, com.google.cloud.metastore.v1.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder addAllServices( - java.lang.Iterable values) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, services_); - onChanged(); - } else { - servicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder clearServices() { - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - servicesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public Builder removeServices(int index) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.remove(index); - onChanged(); - } else { - servicesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public com.google.cloud.metastore.v1.Service.Builder getServicesBuilder(int index) { - return getServicesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public com.google.cloud.metastore.v1.ServiceOrBuilder getServicesOrBuilder(int index) { - if (servicesBuilder_ == null) { - return services_.get(index); - } else { - return servicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public java.util.List - getServicesOrBuilderList() { - if (servicesBuilder_ != null) { - return servicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(services_); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public com.google.cloud.metastore.v1.Service.Builder addServicesBuilder() { - return getServicesFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1.Service.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public com.google.cloud.metastore.v1.Service.Builder addServicesBuilder(int index) { - return getServicesFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1.Service.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - public java.util.List getServicesBuilderList() { - return getServicesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder> - getServicesFieldBuilder() { - if (servicesBuilder_ == null) { - servicesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder>( - services_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - services_ = null; - } - return servicesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListServicesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListServicesResponse) - private static final com.google.cloud.metastore.v1.ListServicesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListServicesResponse(); - } - - public static com.google.cloud.metastore.v1.ListServicesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListServicesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.ListServicesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponseOrBuilder.java deleted file mode 100644 index 6d7e4ef44fd9..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface ListServicesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListServicesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - java.util.List getServicesList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - com.google.cloud.metastore.v1.Service getServices(int index); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - int getServicesCount(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - java.util.List - getServicesOrBuilderList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1.Service services = 1; - */ - com.google.cloud.metastore.v1.ServiceOrBuilder getServicesOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadata.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadata.java deleted file mode 100644 index 6185d9e7868f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadata.java +++ /dev/null @@ -1,1842 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Metadata about the service in a location.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.LocationMetadata} - */ -public final class LocationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.LocationMetadata) - LocationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use LocationMetadata.newBuilder() to construct. - private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private LocationMetadata() { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new LocationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.LocationMetadata.class, - com.google.cloud.metastore.v1.LocationMetadata.Builder.class); - } - - public interface HiveMetastoreVersionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-     * Whether `version` will be chosen by the server if a metastore service is
-     * created with a `HiveMetastoreConfig` that omits the `version`.
-     * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - boolean getIsDefault(); - } - /** - * - * - *
-   * A specification of a supported version of the Hive Metastore software.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} - */ - public static final class HiveMetastoreVersion extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) - HiveMetastoreVersionOrBuilder { - private static final long serialVersionUID = 0L; - // Use HiveMetastoreVersion.newBuilder() to construct. - private HiveMetastoreVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HiveMetastoreVersion() { - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HiveMetastoreVersion(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.class, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IS_DEFAULT_FIELD_NUMBER = 2; - private boolean isDefault_ = false; - /** - * - * - *
-     * Whether `version` will be chosen by the server if a metastore service is
-     * created with a `HiveMetastoreConfig` that omits the `version`.
-     * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - @java.lang.Override - public boolean getIsDefault() { - return isDefault_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (isDefault_ != false) { - output.writeBool(2, isDefault_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (isDefault_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isDefault_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion other = - (com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (getIsDefault() != other.getIsDefault()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A specification of a supported version of the Hive Metastore software.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.class, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder.class); - } - - // Construct using - // com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - isDefault_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion build() { - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion buildPartial() { - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion result = - new com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.isDefault_ = isDefault_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) { - return mergeFrom( - (com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion other) { - if (other - == com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getIsDefault() != false) { - setIsDefault(other.getIsDefault()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - isDefault_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private boolean isDefault_; - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - @java.lang.Override - public boolean getIsDefault() { - return isDefault_; - } - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @param value The isDefault to set. - * @return This builder for chaining. - */ - public Builder setIsDefault(boolean value) { - - isDefault_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @return This builder for chaining. - */ - public Builder clearIsDefault() { - bitField0_ = (bitField0_ & ~0x00000002); - isDefault_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) - private static final com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion(); - } - - public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HiveMetastoreVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List - supportedHiveMetastoreVersions_; - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public java.util.List - getSupportedHiveMetastoreVersionsList() { - return supportedHiveMetastoreVersions_; - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList() { - return supportedHiveMetastoreVersions_; - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public int getSupportedHiveMetastoreVersionsCount() { - return supportedHiveMetastoreVersions_.size(); - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index) { - return supportedHiveMetastoreVersions_.get(index); - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index) { - return supportedHiveMetastoreVersions_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { - output.writeMessage(1, supportedHiveMetastoreVersions_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, supportedHiveMetastoreVersions_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.LocationMetadata)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.LocationMetadata other = - (com.google.cloud.metastore.v1.LocationMetadata) obj; - - if (!getSupportedHiveMetastoreVersionsList() - .equals(other.getSupportedHiveMetastoreVersionsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSupportedHiveMetastoreVersionsCount() > 0) { - hash = (37 * hash) + SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getSupportedHiveMetastoreVersionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.LocationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Metadata about the service in a location.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.LocationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.LocationMetadata) - com.google.cloud.metastore.v1.LocationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.LocationMetadata.class, - com.google.cloud.metastore.v1.LocationMetadata.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.LocationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - } else { - supportedHiveMetastoreVersions_ = null; - supportedHiveMetastoreVersionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_LocationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.LocationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata build() { - com.google.cloud.metastore.v1.LocationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata buildPartial() { - com.google.cloud.metastore.v1.LocationMetadata result = - new com.google.cloud.metastore.v1.LocationMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.LocationMetadata result) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - supportedHiveMetastoreVersions_ = - java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersions_; - } else { - result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersionsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.metastore.v1.LocationMetadata result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.LocationMetadata) { - return mergeFrom((com.google.cloud.metastore.v1.LocationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.LocationMetadata other) { - if (other == com.google.cloud.metastore.v1.LocationMetadata.getDefaultInstance()) return this; - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (!other.supportedHiveMetastoreVersions_.isEmpty()) { - if (supportedHiveMetastoreVersions_.isEmpty()) { - supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.addAll(other.supportedHiveMetastoreVersions_); - } - onChanged(); - } - } else { - if (!other.supportedHiveMetastoreVersions_.isEmpty()) { - if (supportedHiveMetastoreVersionsBuilder_.isEmpty()) { - supportedHiveMetastoreVersionsBuilder_.dispose(); - supportedHiveMetastoreVersionsBuilder_ = null; - supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - supportedHiveMetastoreVersionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSupportedHiveMetastoreVersionsFieldBuilder() - : null; - } else { - supportedHiveMetastoreVersionsBuilder_.addAllMessages( - other.supportedHiveMetastoreVersions_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion m = - input.readMessage( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - .parser(), - extensionRegistry); - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(m); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - - private void ensureSupportedHiveMetastoreVersionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - supportedHiveMetastoreVersions_ = - new java.util.ArrayList< - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion>( - supportedHiveMetastoreVersions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder> - supportedHiveMetastoreVersionsBuilder_; - - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List - getSupportedHiveMetastoreVersionsList() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public int getSupportedHiveMetastoreVersionsCount() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.size(); - } else { - return supportedHiveMetastoreVersionsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.get(index); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder setSupportedHiveMetastoreVersions( - int index, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.set(index, value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder setSupportedHiveMetastoreVersions( - int index, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.set(index, builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - int index, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(index, value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - int index, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(index, builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addAllSupportedHiveMetastoreVersions( - java.lang.Iterable< - ? extends com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion> - values) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, supportedHiveMetastoreVersions_); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder clearSupportedHiveMetastoreVersions() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder removeSupportedHiveMetastoreVersions(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.remove(index); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder - getSupportedHiveMetastoreVersionsBuilder(int index) { - return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.get(index); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList() { - if (supportedHiveMetastoreVersionsBuilder_ != null) { - return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder - addSupportedHiveMetastoreVersionsBuilder() { - return getSupportedHiveMetastoreVersionsFieldBuilder() - .addBuilder( - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder - addSupportedHiveMetastoreVersionsBuilder(int index) { - return getSupportedHiveMetastoreVersionsFieldBuilder() - .addBuilder( - index, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List< - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder> - getSupportedHiveMetastoreVersionsBuilderList() { - return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsFieldBuilder() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder>( - supportedHiveMetastoreVersions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - supportedHiveMetastoreVersions_ = null; - } - return supportedHiveMetastoreVersionsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.LocationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.LocationMetadata) - private static final com.google.cloud.metastore.v1.LocationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.LocationMetadata(); - } - - public static com.google.cloud.metastore.v1.LocationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.LocationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadataOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadataOrBuilder.java deleted file mode 100644 index caa251fa33ad..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadataOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface LocationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.LocationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - java.util.List - getSupportedHiveMetastoreVersionsList(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - int getSupportedHiveMetastoreVersionsCount(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - java.util.List< - ? extends com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindow.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindow.java deleted file mode 100644 index 5f3b27f47b49..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindow.java +++ /dev/null @@ -1,855 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Maintenance window. This specifies when Dataproc Metastore
- * may perform system maintenance operation to the service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MaintenanceWindow} - */ -public final class MaintenanceWindow extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MaintenanceWindow) - MaintenanceWindowOrBuilder { - private static final long serialVersionUID = 0L; - // Use MaintenanceWindow.newBuilder() to construct. - private MaintenanceWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MaintenanceWindow() { - dayOfWeek_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MaintenanceWindow(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MaintenanceWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MaintenanceWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MaintenanceWindow.class, - com.google.cloud.metastore.v1.MaintenanceWindow.Builder.class); - } - - public static final int HOUR_OF_DAY_FIELD_NUMBER = 1; - private com.google.protobuf.Int32Value hourOfDay_; - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - @java.lang.Override - public boolean hasHourOfDay() { - return hourOfDay_ != null; - } - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - @java.lang.Override - public com.google.protobuf.Int32Value getHourOfDay() { - return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; - } - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - @java.lang.Override - public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { - return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; - } - - public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; - private int dayOfWeek_ = 0; - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - @java.lang.Override - public int getDayOfWeekValue() { - return dayOfWeek_; - } - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - @java.lang.Override - public com.google.type.DayOfWeek getDayOfWeek() { - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (hourOfDay_ != null) { - output.writeMessage(1, getHourOfDay()); - } - if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { - output.writeEnum(2, dayOfWeek_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hourOfDay_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHourOfDay()); - } - if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, dayOfWeek_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.MaintenanceWindow)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.MaintenanceWindow other = - (com.google.cloud.metastore.v1.MaintenanceWindow) obj; - - if (hasHourOfDay() != other.hasHourOfDay()) return false; - if (hasHourOfDay()) { - if (!getHourOfDay().equals(other.getHourOfDay())) return false; - } - if (dayOfWeek_ != other.dayOfWeek_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHourOfDay()) { - hash = (37 * hash) + HOUR_OF_DAY_FIELD_NUMBER; - hash = (53 * hash) + getHourOfDay().hashCode(); - } - hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; - hash = (53 * hash) + dayOfWeek_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.MaintenanceWindow prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Maintenance window. This specifies when Dataproc Metastore
-   * may perform system maintenance operation to the service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MaintenanceWindow} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MaintenanceWindow) - com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MaintenanceWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MaintenanceWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MaintenanceWindow.class, - com.google.cloud.metastore.v1.MaintenanceWindow.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.MaintenanceWindow.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hourOfDay_ = null; - if (hourOfDayBuilder_ != null) { - hourOfDayBuilder_.dispose(); - hourOfDayBuilder_ = null; - } - dayOfWeek_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MaintenanceWindow_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MaintenanceWindow getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MaintenanceWindow build() { - com.google.cloud.metastore.v1.MaintenanceWindow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MaintenanceWindow buildPartial() { - com.google.cloud.metastore.v1.MaintenanceWindow result = - new com.google.cloud.metastore.v1.MaintenanceWindow(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.MaintenanceWindow result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hourOfDay_ = hourOfDayBuilder_ == null ? hourOfDay_ : hourOfDayBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dayOfWeek_ = dayOfWeek_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.MaintenanceWindow) { - return mergeFrom((com.google.cloud.metastore.v1.MaintenanceWindow) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.MaintenanceWindow other) { - if (other == com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance()) - return this; - if (other.hasHourOfDay()) { - mergeHourOfDay(other.getHourOfDay()); - } - if (other.dayOfWeek_ != 0) { - setDayOfWeekValue(other.getDayOfWeekValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getHourOfDayFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - dayOfWeek_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Int32Value hourOfDay_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder> - hourOfDayBuilder_; - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - public boolean hasHourOfDay() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - public com.google.protobuf.Int32Value getHourOfDay() { - if (hourOfDayBuilder_ == null) { - return hourOfDay_ == null - ? com.google.protobuf.Int32Value.getDefaultInstance() - : hourOfDay_; - } else { - return hourOfDayBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder setHourOfDay(com.google.protobuf.Int32Value value) { - if (hourOfDayBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hourOfDay_ = value; - } else { - hourOfDayBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder setHourOfDay(com.google.protobuf.Int32Value.Builder builderForValue) { - if (hourOfDayBuilder_ == null) { - hourOfDay_ = builderForValue.build(); - } else { - hourOfDayBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder mergeHourOfDay(com.google.protobuf.Int32Value value) { - if (hourOfDayBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && hourOfDay_ != null - && hourOfDay_ != com.google.protobuf.Int32Value.getDefaultInstance()) { - getHourOfDayBuilder().mergeFrom(value); - } else { - hourOfDay_ = value; - } - } else { - hourOfDayBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder clearHourOfDay() { - bitField0_ = (bitField0_ & ~0x00000001); - hourOfDay_ = null; - if (hourOfDayBuilder_ != null) { - hourOfDayBuilder_.dispose(); - hourOfDayBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public com.google.protobuf.Int32Value.Builder getHourOfDayBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHourOfDayFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { - if (hourOfDayBuilder_ != null) { - return hourOfDayBuilder_.getMessageOrBuilder(); - } else { - return hourOfDay_ == null - ? com.google.protobuf.Int32Value.getDefaultInstance() - : hourOfDay_; - } - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder> - getHourOfDayFieldBuilder() { - if (hourOfDayBuilder_ == null) { - hourOfDayBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder>( - getHourOfDay(), getParentForChildren(), isClean()); - hourOfDay_ = null; - } - return hourOfDayBuilder_; - } - - private int dayOfWeek_ = 0; - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - @java.lang.Override - public int getDayOfWeekValue() { - return dayOfWeek_; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @param value The enum numeric value on the wire for dayOfWeek to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeekValue(int value) { - dayOfWeek_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - @java.lang.Override - public com.google.type.DayOfWeek getDayOfWeek() { - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @param value The dayOfWeek to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeek(com.google.type.DayOfWeek value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - dayOfWeek_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return This builder for chaining. - */ - public Builder clearDayOfWeek() { - bitField0_ = (bitField0_ & ~0x00000002); - dayOfWeek_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MaintenanceWindow) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MaintenanceWindow) - private static final com.google.cloud.metastore.v1.MaintenanceWindow DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MaintenanceWindow(); - } - - public static com.google.cloud.metastore.v1.MaintenanceWindow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MaintenanceWindow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MaintenanceWindow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindowOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindowOrBuilder.java deleted file mode 100644 index 5b7868dd03c0..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindowOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface MaintenanceWindowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MaintenanceWindow) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - boolean hasHourOfDay(); - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - com.google.protobuf.Int32Value getHourOfDay(); - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder(); - - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - int getDayOfWeekValue(); - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - com.google.type.DayOfWeek getDayOfWeek(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExport.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExport.java deleted file mode 100644 index da683cade811..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExport.java +++ /dev/null @@ -1,1849 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * The details of a metadata export operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MetadataExport} - */ -public final class MetadataExport extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MetadataExport) - MetadataExportOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataExport.newBuilder() to construct. - private MetadataExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataExport() { - state_ = 0; - databaseDumpType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataExport(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataExport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataExport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MetadataExport.class, - com.google.cloud.metastore.v1.MetadataExport.Builder.class); - } - - /** - * - * - *
-   * The current state of the metadata export.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.MetadataExport.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata export is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata export is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata export completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata export failed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - * - * - *
-     * The metadata export is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata export is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata export is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata export completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata export failed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - * - * - *
-     * The metadata export is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return FAILED; - case 4: - return CANCELLED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetadataExport.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.MetadataExport.State) - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DESTINATION_GCS_URI(4), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 4: - return DESTINATION_GCS_URI; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int DESTINATION_GCS_URI_FIELD_NUMBER = 4; - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-   * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - public boolean hasDestinationGcsUri() { - return destinationCase_ == 4; - } - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-   * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - public java.lang.String getDestinationGcsUri() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 4) { - destination_ = s; - } - return s; - } - } - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-   * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - public com.google.protobuf.ByteString getDestinationGcsUriBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 4) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataExport.State getState() { - com.google.cloud.metastore.v1.MetadataExport.State result = - com.google.cloud.metastore.v1.MetadataExport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1.MetadataExport.State.UNRECOGNIZED - : result; - } - - public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 5; - private int databaseDumpType_ = 0; - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (state_ - != com.google.cloud.metastore.v1.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (destinationCase_ == 4) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destination_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, databaseDumpType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (state_ - != com.google.cloud.metastore.v1.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); - } - if (destinationCase_ == 4) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destination_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, databaseDumpType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.MetadataExport)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.MetadataExport other = - (com.google.cloud.metastore.v1.MetadataExport) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (databaseDumpType_ != other.databaseDumpType_) return false; - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 4: - if (!getDestinationGcsUri().equals(other.getDestinationGcsUri())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseDumpType_; - switch (destinationCase_) { - case 4: - hash = (37 * hash) + DESTINATION_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getDestinationGcsUri().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataExport parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.MetadataExport prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a metadata export operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MetadataExport} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MetadataExport) - com.google.cloud.metastore.v1.MetadataExportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataExport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataExport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MetadataExport.class, - com.google.cloud.metastore.v1.MetadataExport.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.MetadataExport.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - databaseDumpType_ = 0; - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataExport_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataExport getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.MetadataExport.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataExport build() { - com.google.cloud.metastore.v1.MetadataExport result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataExport buildPartial() { - com.google.cloud.metastore.v1.MetadataExport result = - new com.google.cloud.metastore.v1.MetadataExport(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.MetadataExport result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.databaseDumpType_ = databaseDumpType_; - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1.MetadataExport result) { - result.destinationCase_ = destinationCase_; - result.destination_ = this.destination_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.MetadataExport) { - return mergeFrom((com.google.cloud.metastore.v1.MetadataExport) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataExport other) { - if (other == com.google.cloud.metastore.v1.MetadataExport.getDefaultInstance()) return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.databaseDumpType_ != 0) { - setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); - } - switch (other.getDestinationCase()) { - case DESTINATION_GCS_URI: - { - destinationCase_ = 4; - destination_ = other.destination_; - onChanged(); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 24: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 24 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 4; - destination_ = s; - break; - } // case 34 - case 40: - { - databaseDumpType_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-     * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - @java.lang.Override - public boolean hasDestinationGcsUri() { - return destinationCase_ == 4; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-     * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - @java.lang.Override - public java.lang.String getDestinationGcsUri() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 4) { - destination_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-     * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDestinationGcsUriBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 4) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-     * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The destinationGcsUri to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationCase_ = 4; - destination_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-     * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDestinationGcsUri() { - if (destinationCase_ == 4) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-     * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for destinationGcsUri to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - destinationCase_ = 4; - destination_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && startTime_ != null - && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000002); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000004); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataExport.State getState() { - com.google.cloud.metastore.v1.MetadataExport.State result = - com.google.cloud.metastore.v1.MetadataExport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1.MetadataExport.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1.MetadataExport.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000008); - state_ = 0; - onChanged(); - return this; - } - - private int databaseDumpType_ = 0; - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpTypeValue(int value) { - databaseDumpType_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpType(com.google.cloud.metastore.v1.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - databaseDumpType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseDumpType() { - bitField0_ = (bitField0_ & ~0x00000010); - databaseDumpType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MetadataExport) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MetadataExport) - private static final com.google.cloud.metastore.v1.MetadataExport DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MetadataExport(); - } - - public static com.google.cloud.metastore.v1.MetadataExport getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataExport parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataExport getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExportOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExportOrBuilder.java deleted file mode 100644 index 5c8f8e5725cf..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExportOrBuilder.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface MetadataExportOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MetadataExport) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-   * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - boolean hasDestinationGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-   * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - java.lang.String getDestinationGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
-   * form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - com.google.protobuf.ByteString getDestinationGcsUriBytes(); - - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1.MetadataExport.State getState(); - - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - int getDatabaseDumpTypeValue(); - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType(); - - public com.google.cloud.metastore.v1.MetadataExport.DestinationCase getDestinationCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImport.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImport.java deleted file mode 100644 index 225c4792083f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImport.java +++ /dev/null @@ -1,3647 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * A metastore resource that imports metadata.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MetadataImport} - */ -public final class MetadataImport extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MetadataImport) - MetadataImportOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataImport.newBuilder() to construct. - private MetadataImport(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataImport() { - name_ = ""; - description_ = ""; - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataImport(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MetadataImport.class, - com.google.cloud.metastore.v1.MetadataImport.Builder.class); - } - - /** - * - * - *
-   * The current state of the metadata import.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.MetadataImport.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata import is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata import is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata import completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata import is being updated.
-     * 
- * - * UPDATING = 3; - */ - UPDATING(3), - /** - * - * - *
-     * The metadata import failed, and attempted metadata changes were rolled
-     * back.
-     * 
- * - * FAILED = 4; - */ - FAILED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata import is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata import is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata import completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata import is being updated.
-     * 
- * - * UPDATING = 3; - */ - public static final int UPDATING_VALUE = 3; - /** - * - * - *
-     * The metadata import failed, and attempted metadata changes were rolled
-     * back.
-     * 
- * - * FAILED = 4; - */ - public static final int FAILED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return UPDATING; - case 4: - return FAILED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetadataImport.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.MetadataImport.State) - } - - public interface DatabaseDumpOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MetadataImport.DatabaseDump) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Deprecated - int getDatabaseTypeValue(); - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @return The databaseType. - */ - @java.lang.Deprecated - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType getDatabaseType(); - - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - java.lang.String getGcsUri(); - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - com.google.protobuf.ByteString getGcsUriBytes(); - - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getType(); - } - /** - * - * - *
-   * A specification of the location of and metadata about a database dump from
-   * a relational database management system.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MetadataImport.DatabaseDump} - */ - public static final class DatabaseDump extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MetadataImport.DatabaseDump) - DatabaseDumpOrBuilder { - private static final long serialVersionUID = 0L; - // Use DatabaseDump.newBuilder() to construct. - private DatabaseDump(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DatabaseDump() { - databaseType_ = 0; - gcsUri_ = ""; - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DatabaseDump(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.class, - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder.class); - } - - /** - * - * - *
-     * The type of the database.
-     * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType} - */ - public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * The type of the source database is unknown.
-       * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - DATABASE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-       * The type of the source database is MySQL.
-       * 
- * - * MYSQL = 1; - */ - MYSQL(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * The type of the source database is unknown.
-       * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * The type of the source database is MySQL.
-       * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DatabaseType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DatabaseType forNumber(int value) { - switch (value) { - case 0: - return DATABASE_TYPE_UNSPECIFIED; - case 1: - return MYSQL; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DatabaseType findValueByNumber(int number) { - return DatabaseType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final DatabaseType[] VALUES = values(); - - public static DatabaseType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DatabaseType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType) - } - - public static final int DATABASE_TYPE_FIELD_NUMBER = 1; - private int databaseType_ = 0; - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @return The databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType - getDatabaseType() { - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType result = - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.forNumber( - databaseType_); - return result == null - ? com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED - : result; - } - - public static final int GCS_URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object gcsUri_ = ""; - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - @java.lang.Override - public java.lang.String getGcsUri() { - java.lang.Object ref = gcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsUri_ = s; - return s; - } - } - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGcsUriBytes() { - java.lang.Object ref = gcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 4; - private int type_ = 0; - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getType() { - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (databaseType_ - != com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType - .DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, databaseType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsUri_); - } - if (type_ - != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, type_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (databaseType_ - != com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType - .DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, databaseType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsUri_); - } - if (type_ - != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.MetadataImport.DatabaseDump)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump other = - (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) obj; - - if (databaseType_ != other.databaseType_) return false; - if (!getGcsUri().equals(other.getGcsUri())) return false; - if (type_ != other.type_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseType_; - hash = (37 * hash) + GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getGcsUri().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A specification of the location of and metadata about a database dump from
-     * a relational database management system.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MetadataImport.DatabaseDump} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MetadataImport.DatabaseDump) - com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.class, - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - databaseType_ = 0; - gcsUri_ = ""; - type_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump build() { - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump buildPartial() { - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump result = - new com.google.cloud.metastore.v1.MetadataImport.DatabaseDump(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.MetadataImport.DatabaseDump result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.databaseType_ = databaseType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.gcsUri_ = gcsUri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.type_ = type_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) { - return mergeFrom((com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataImport.DatabaseDump other) { - if (other == com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance()) - return this; - if (other.databaseType_ != 0) { - setDatabaseTypeValue(other.getDatabaseTypeValue()); - } - if (!other.getGcsUri().isEmpty()) { - gcsUri_ = other.gcsUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - databaseType_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - gcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 32: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 32 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int databaseType_ = 0; - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @param value The enum numeric value on the wire for databaseType to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setDatabaseTypeValue(int value) { - databaseType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @return The databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType - getDatabaseType() { - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType result = - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.forNumber( - databaseType_); - return result == null - ? com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @param value The databaseType to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setDatabaseType( - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - databaseType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=538 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearDatabaseType() { - bitField0_ = (bitField0_ & ~0x00000001); - databaseType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object gcsUri_ = ""; - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - public java.lang.String getGcsUri() { - java.lang.Object ref = gcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - public com.google.protobuf.ByteString getGcsUriBytes() { - java.lang.Object ref = gcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @param value The gcsUri to set. - * @return This builder for chaining. - */ - public Builder setGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - gcsUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearGcsUri() { - gcsUri_ = getDefaultInstance().getGcsUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @param value The bytes for gcsUri to set. - * @return This builder for chaining. - */ - public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - gcsUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getType() { - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.metastore.v1.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000004); - type_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MetadataImport.DatabaseDump) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MetadataImport.DatabaseDump) - private static final com.google.cloud.metastore.v1.MetadataImport.DatabaseDump DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MetadataImport.DatabaseDump(); - } - - public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DatabaseDump parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int metadataCase_ = 0; - private java.lang.Object metadata_; - - public enum MetadataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DATABASE_DUMP(6), - METADATA_NOT_SET(0); - private final int value; - - private MetadataCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetadataCase valueOf(int value) { - return forNumber(value); - } - - public static MetadataCase forNumber(int value) { - switch (value) { - case 6: - return DATABASE_DUMP; - case 0: - return METADATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MetadataCase getMetadataCase() { - return MetadataCase.forNumber(metadataCase_); - } - - public static final int DATABASE_DUMP_FIELD_NUMBER = 6; - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - @java.lang.Override - public boolean hasDatabaseDump() { - return metadataCase_ == 6; - } - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDatabaseDump() { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); - } - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder - getDatabaseDumpOrBuilder() { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 5; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.State getState() { - com.google.cloud.metastore.v1.MetadataImport.State result = - com.google.cloud.metastore.v1.MetadataImport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1.MetadataImport.State.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (createTime_ != null) { - output.writeMessage(3, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(4, getUpdateTime()); - } - if (state_ - != com.google.cloud.metastore.v1.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, state_); - } - if (metadataCase_ == 6) { - output.writeMessage(6, (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_); - } - if (endTime_ != null) { - output.writeMessage(7, getEndTime()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); - } - if (state_ - != com.google.cloud.metastore.v1.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); - } - if (metadataCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEndTime()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.MetadataImport)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.MetadataImport other = - (com.google.cloud.metastore.v1.MetadataImport) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (!getMetadataCase().equals(other.getMetadataCase())) return false; - switch (metadataCase_) { - case 6: - if (!getDatabaseDump().equals(other.getDatabaseDump())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - switch (metadataCase_) { - case 6: - hash = (37 * hash) + DATABASE_DUMP_FIELD_NUMBER; - hash = (53 * hash) + getDatabaseDump().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataImport parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.MetadataImport prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A metastore resource that imports metadata.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MetadataImport} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MetadataImport) - com.google.cloud.metastore.v1.MetadataImportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MetadataImport.class, - com.google.cloud.metastore.v1.MetadataImport.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.MetadataImport.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (databaseDumpBuilder_ != null) { - databaseDumpBuilder_.clear(); - } - name_ = ""; - description_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - metadataCase_ = 0; - metadata_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataImport_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport build() { - com.google.cloud.metastore.v1.MetadataImport result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport buildPartial() { - com.google.cloud.metastore.v1.MetadataImport result = - new com.google.cloud.metastore.v1.MetadataImport(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.MetadataImport result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.state_ = state_; - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1.MetadataImport result) { - result.metadataCase_ = metadataCase_; - result.metadata_ = this.metadata_; - if (metadataCase_ == 6 && databaseDumpBuilder_ != null) { - result.metadata_ = databaseDumpBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.MetadataImport) { - return mergeFrom((com.google.cloud.metastore.v1.MetadataImport) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataImport other) { - if (other == com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - switch (other.getMetadataCase()) { - case DATABASE_DUMP: - { - mergeDatabaseDump(other.getDatabaseDump()); - break; - } - case METADATA_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 40: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 40 - case 50: - { - input.readMessage(getDatabaseDumpFieldBuilder().getBuilder(), extensionRegistry); - metadataCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int metadataCase_ = 0; - private java.lang.Object metadata_; - - public MetadataCase getMetadataCase() { - return MetadataCase.forNumber(metadataCase_); - } - - public Builder clearMetadata() { - metadataCase_ = 0; - metadata_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder> - databaseDumpBuilder_; - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - @java.lang.Override - public boolean hasDatabaseDump() { - return metadataCase_ == 6; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDatabaseDump() { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); - } else { - if (metadataCase_ == 6) { - return databaseDumpBuilder_.getMessage(); - } - return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); - } - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setDatabaseDump( - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump value) { - if (databaseDumpBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - onChanged(); - } else { - databaseDumpBuilder_.setMessage(value); - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setDatabaseDump( - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder builderForValue) { - if (databaseDumpBuilder_ == null) { - metadata_ = builderForValue.build(); - onChanged(); - } else { - databaseDumpBuilder_.setMessage(builderForValue.build()); - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeDatabaseDump( - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump value) { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6 - && metadata_ - != com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance()) { - metadata_ = - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.newBuilder( - (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_) - .mergeFrom(value) - .buildPartial(); - } else { - metadata_ = value; - } - onChanged(); - } else { - if (metadataCase_ == 6) { - databaseDumpBuilder_.mergeFrom(value); - } else { - databaseDumpBuilder_.setMessage(value); - } - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearDatabaseDump() { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6) { - metadataCase_ = 0; - metadata_ = null; - onChanged(); - } - } else { - if (metadataCase_ == 6) { - metadataCase_ = 0; - metadata_ = null; - } - databaseDumpBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder - getDatabaseDumpBuilder() { - return getDatabaseDumpFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder - getDatabaseDumpOrBuilder() { - if ((metadataCase_ == 6) && (databaseDumpBuilder_ != null)) { - return databaseDumpBuilder_.getMessageOrBuilder(); - } else { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); - } - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder> - getDatabaseDumpFieldBuilder() { - if (databaseDumpBuilder_ == null) { - if (!(metadataCase_ == 6)) { - metadata_ = - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); - } - databaseDumpBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder>( - (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_, - getParentForChildren(), - isClean()); - metadata_ = null; - } - metadataCase_ = 6; - onChanged(); - return databaseDumpBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000010); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000020); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport.State getState() { - com.google.cloud.metastore.v1.MetadataImport.State result = - com.google.cloud.metastore.v1.MetadataImport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1.MetadataImport.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1.MetadataImport.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000040); - state_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MetadataImport) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MetadataImport) - private static final com.google.cloud.metastore.v1.MetadataImport DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MetadataImport(); - } - - public static com.google.cloud.metastore.v1.MetadataImport getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataImport parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportOrBuilder.java deleted file mode 100644 index f9c225218892..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportOrBuilder.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface MetadataImportOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MetadataImport) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - boolean hasDatabaseDump(); - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDatabaseDump(); - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder(); - - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1.MetadataImport.State getState(); - - public com.google.cloud.metastore.v1.MetadataImport.MetadataCase getMetadataCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivity.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivity.java deleted file mode 100644 index f49dc49d1b47..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivity.java +++ /dev/null @@ -1,1531 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * The metadata management activities of the metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MetadataManagementActivity} - */ -public final class MetadataManagementActivity extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MetadataManagementActivity) - MetadataManagementActivityOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataManagementActivity.newBuilder() to construct. - private MetadataManagementActivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataManagementActivity() { - metadataExports_ = java.util.Collections.emptyList(); - restores_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataManagementActivity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataManagementActivity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MetadataManagementActivity.class, - com.google.cloud.metastore.v1.MetadataManagementActivity.Builder.class); - } - - public static final int METADATA_EXPORTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List metadataExports_; - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getMetadataExportsList() { - return metadataExports_; - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getMetadataExportsOrBuilderList() { - return metadataExports_; - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getMetadataExportsCount() { - return metadataExports_.size(); - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataExport getMetadataExports(int index) { - return metadataExports_.get(index); - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataExportOrBuilder getMetadataExportsOrBuilder( - int index) { - return metadataExports_.get(index); - } - - public static final int RESTORES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List restores_; - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getRestoresList() { - return restores_; - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getRestoresOrBuilderList() { - return restores_; - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getRestoresCount() { - return restores_.size(); - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Restore getRestores(int index) { - return restores_.get(index); - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.RestoreOrBuilder getRestoresOrBuilder(int index) { - return restores_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < metadataExports_.size(); i++) { - output.writeMessage(1, metadataExports_.get(i)); - } - for (int i = 0; i < restores_.size(); i++) { - output.writeMessage(2, restores_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < metadataExports_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metadataExports_.get(i)); - } - for (int i = 0; i < restores_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, restores_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.MetadataManagementActivity)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.MetadataManagementActivity other = - (com.google.cloud.metastore.v1.MetadataManagementActivity) obj; - - if (!getMetadataExportsList().equals(other.getMetadataExportsList())) return false; - if (!getRestoresList().equals(other.getRestoresList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getMetadataExportsCount() > 0) { - hash = (37 * hash) + METADATA_EXPORTS_FIELD_NUMBER; - hash = (53 * hash) + getMetadataExportsList().hashCode(); - } - if (getRestoresCount() > 0) { - hash = (37 * hash) + RESTORES_FIELD_NUMBER; - hash = (53 * hash) + getRestoresList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.MetadataManagementActivity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The metadata management activities of the metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.MetadataManagementActivity} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MetadataManagementActivity) - com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataManagementActivity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.MetadataManagementActivity.class, - com.google.cloud.metastore.v1.MetadataManagementActivity.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.MetadataManagementActivity.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (metadataExportsBuilder_ == null) { - metadataExports_ = java.util.Collections.emptyList(); - } else { - metadataExports_ = null; - metadataExportsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (restoresBuilder_ == null) { - restores_ = java.util.Collections.emptyList(); - } else { - restores_ = null; - restoresBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataManagementActivity getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataManagementActivity build() { - com.google.cloud.metastore.v1.MetadataManagementActivity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataManagementActivity buildPartial() { - com.google.cloud.metastore.v1.MetadataManagementActivity result = - new com.google.cloud.metastore.v1.MetadataManagementActivity(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1.MetadataManagementActivity result) { - if (metadataExportsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - metadataExports_ = java.util.Collections.unmodifiableList(metadataExports_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.metadataExports_ = metadataExports_; - } else { - result.metadataExports_ = metadataExportsBuilder_.build(); - } - if (restoresBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - restores_ = java.util.Collections.unmodifiableList(restores_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.restores_ = restores_; - } else { - result.restores_ = restoresBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.metastore.v1.MetadataManagementActivity result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.MetadataManagementActivity) { - return mergeFrom((com.google.cloud.metastore.v1.MetadataManagementActivity) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataManagementActivity other) { - if (other == com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance()) - return this; - if (metadataExportsBuilder_ == null) { - if (!other.metadataExports_.isEmpty()) { - if (metadataExports_.isEmpty()) { - metadataExports_ = other.metadataExports_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMetadataExportsIsMutable(); - metadataExports_.addAll(other.metadataExports_); - } - onChanged(); - } - } else { - if (!other.metadataExports_.isEmpty()) { - if (metadataExportsBuilder_.isEmpty()) { - metadataExportsBuilder_.dispose(); - metadataExportsBuilder_ = null; - metadataExports_ = other.metadataExports_; - bitField0_ = (bitField0_ & ~0x00000001); - metadataExportsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMetadataExportsFieldBuilder() - : null; - } else { - metadataExportsBuilder_.addAllMessages(other.metadataExports_); - } - } - } - if (restoresBuilder_ == null) { - if (!other.restores_.isEmpty()) { - if (restores_.isEmpty()) { - restores_ = other.restores_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRestoresIsMutable(); - restores_.addAll(other.restores_); - } - onChanged(); - } - } else { - if (!other.restores_.isEmpty()) { - if (restoresBuilder_.isEmpty()) { - restoresBuilder_.dispose(); - restoresBuilder_ = null; - restores_ = other.restores_; - bitField0_ = (bitField0_ & ~0x00000002); - restoresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRestoresFieldBuilder() - : null; - } else { - restoresBuilder_.addAllMessages(other.restores_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1.MetadataExport m = - input.readMessage( - com.google.cloud.metastore.v1.MetadataExport.parser(), extensionRegistry); - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(m); - } else { - metadataExportsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - com.google.cloud.metastore.v1.Restore m = - input.readMessage( - com.google.cloud.metastore.v1.Restore.parser(), extensionRegistry); - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(m); - } else { - restoresBuilder_.addMessage(m); - } - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List metadataExports_ = - java.util.Collections.emptyList(); - - private void ensureMetadataExportsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - metadataExports_ = - new java.util.ArrayList(metadataExports_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataExport, - com.google.cloud.metastore.v1.MetadataExport.Builder, - com.google.cloud.metastore.v1.MetadataExportOrBuilder> - metadataExportsBuilder_; - - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getMetadataExportsList() { - if (metadataExportsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metadataExports_); - } else { - return metadataExportsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getMetadataExportsCount() { - if (metadataExportsBuilder_ == null) { - return metadataExports_.size(); - } else { - return metadataExportsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.MetadataExport getMetadataExports(int index) { - if (metadataExportsBuilder_ == null) { - return metadataExports_.get(index); - } else { - return metadataExportsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataExports( - int index, com.google.cloud.metastore.v1.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.set(index, value); - onChanged(); - } else { - metadataExportsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataExports( - int index, com.google.cloud.metastore.v1.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.set(index, builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports(com.google.cloud.metastore.v1.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.add(value); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - int index, com.google.cloud.metastore.v1.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.add(index, value); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - com.google.cloud.metastore.v1.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - int index, com.google.cloud.metastore.v1.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(index, builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllMetadataExports( - java.lang.Iterable values) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metadataExports_); - onChanged(); - } else { - metadataExportsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMetadataExports() { - if (metadataExportsBuilder_ == null) { - metadataExports_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - metadataExportsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeMetadataExports(int index) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.remove(index); - onChanged(); - } else { - metadataExportsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.MetadataExport.Builder getMetadataExportsBuilder( - int index) { - return getMetadataExportsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.MetadataExportOrBuilder getMetadataExportsOrBuilder( - int index) { - if (metadataExportsBuilder_ == null) { - return metadataExports_.get(index); - } else { - return metadataExportsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMetadataExportsOrBuilderList() { - if (metadataExportsBuilder_ != null) { - return metadataExportsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metadataExports_); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.MetadataExport.Builder addMetadataExportsBuilder() { - return getMetadataExportsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1.MetadataExport.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.MetadataExport.Builder addMetadataExportsBuilder( - int index) { - return getMetadataExportsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1.MetadataExport.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMetadataExportsBuilderList() { - return getMetadataExportsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataExport, - com.google.cloud.metastore.v1.MetadataExport.Builder, - com.google.cloud.metastore.v1.MetadataExportOrBuilder> - getMetadataExportsFieldBuilder() { - if (metadataExportsBuilder_ == null) { - metadataExportsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataExport, - com.google.cloud.metastore.v1.MetadataExport.Builder, - com.google.cloud.metastore.v1.MetadataExportOrBuilder>( - metadataExports_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - metadataExports_ = null; - } - return metadataExportsBuilder_; - } - - private java.util.List restores_ = - java.util.Collections.emptyList(); - - private void ensureRestoresIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - restores_ = new java.util.ArrayList(restores_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Restore, - com.google.cloud.metastore.v1.Restore.Builder, - com.google.cloud.metastore.v1.RestoreOrBuilder> - restoresBuilder_; - - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getRestoresList() { - if (restoresBuilder_ == null) { - return java.util.Collections.unmodifiableList(restores_); - } else { - return restoresBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getRestoresCount() { - if (restoresBuilder_ == null) { - return restores_.size(); - } else { - return restoresBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.Restore getRestores(int index) { - if (restoresBuilder_ == null) { - return restores_.get(index); - } else { - return restoresBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRestores(int index, com.google.cloud.metastore.v1.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.set(index, value); - onChanged(); - } else { - restoresBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRestores( - int index, com.google.cloud.metastore.v1.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.set(index, builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(com.google.cloud.metastore.v1.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.add(value); - onChanged(); - } else { - restoresBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(int index, com.google.cloud.metastore.v1.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.add(index, value); - onChanged(); - } else { - restoresBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(com.google.cloud.metastore.v1.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores( - int index, com.google.cloud.metastore.v1.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(index, builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllRestores( - java.lang.Iterable values) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restores_); - onChanged(); - } else { - restoresBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearRestores() { - if (restoresBuilder_ == null) { - restores_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - restoresBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeRestores(int index) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.remove(index); - onChanged(); - } else { - restoresBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.Restore.Builder getRestoresBuilder(int index) { - return getRestoresFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.RestoreOrBuilder getRestoresOrBuilder(int index) { - if (restoresBuilder_ == null) { - return restores_.get(index); - } else { - return restoresBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getRestoresOrBuilderList() { - if (restoresBuilder_ != null) { - return restoresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(restores_); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.Restore.Builder addRestoresBuilder() { - return getRestoresFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1.Restore.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.Restore.Builder addRestoresBuilder(int index) { - return getRestoresFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1.Restore.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getRestoresBuilderList() { - return getRestoresFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Restore, - com.google.cloud.metastore.v1.Restore.Builder, - com.google.cloud.metastore.v1.RestoreOrBuilder> - getRestoresFieldBuilder() { - if (restoresBuilder_ == null) { - restoresBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.Restore, - com.google.cloud.metastore.v1.Restore.Builder, - com.google.cloud.metastore.v1.RestoreOrBuilder>( - restores_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - restores_ = null; - } - return restoresBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MetadataManagementActivity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MetadataManagementActivity) - private static final com.google.cloud.metastore.v1.MetadataManagementActivity DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MetadataManagementActivity(); - } - - public static com.google.cloud.metastore.v1.MetadataManagementActivity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataManagementActivity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataManagementActivity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivityOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivityOrBuilder.java deleted file mode 100644 index 1b5a6a75c1a7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivityOrBuilder.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface MetadataManagementActivityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MetadataManagementActivity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getMetadataExportsList(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1.MetadataExport getMetadataExports(int index); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getMetadataExportsCount(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getMetadataExportsOrBuilderList(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1.MetadataExportOrBuilder getMetadataExportsOrBuilder(int index); - - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getRestoresList(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1.Restore getRestores(int index); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getRestoresCount(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getRestoresOrBuilderList(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1.RestoreOrBuilder getRestoresOrBuilder(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreFederationProto.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreFederationProto.java deleted file mode 100644 index bb3cedcf4e5b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreFederationProto.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public final class MetastoreFederationProto { - private MetastoreFederationProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_Federation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_Federation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_BackendMetastore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ListFederationsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ListFederationsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_GetFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_CreateFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_UpdateFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_DeleteFederationRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n4google/cloud/metastore/v1/metastore_fe" - + "deration.proto\022\031google.cloud.metastore.v" - + "1\032\034google/api/annotations.proto\032\027google/" - + "api/client.proto\032\037google/api/field_behav" - + "ior.proto\032\031google/api/resource.proto\032#go" - + "ogle/longrunning/operations.proto\032 googl" - + "e/protobuf/field_mask.proto\032\037google/prot" - + "obuf/timestamp.proto\"\253\006\n\nFederation\022\021\n\004n" - + "ame\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030\002 \001(\0132\032.go" - + "ogle.protobuf.TimestampB\003\340A\003\0224\n\013update_t" - + "ime\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\003\022A\n\006labels\030\004 \003(\01321.google.cloud.metast" - + "ore.v1.Federation.LabelsEntry\022\024\n\007version" - + "\030\005 \001(\tB\003\340A\005\022X\n\022backend_metastores\030\006 \003(\0132" - + "<.google.cloud.metastore.v1.Federation.B" - + "ackendMetastoresEntry\022\031\n\014endpoint_uri\030\007 " - + "\001(\tB\003\340A\003\022?\n\005state\030\010 \001(\0162+.google.cloud.m" - + "etastore.v1.Federation.StateB\003\340A\003\022\032\n\rsta" - + "te_message\030\t \001(\tB\003\340A\003\022\020\n\003uid\030\n \001(\tB\003\340A\003\032" - + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\032e\n\026BackendMetastoresEntry\022\013\n\003key\030" - + "\001 \001(\005\022:\n\005value\030\002 \001(\0132+.google.cloud.meta" - + "store.v1.BackendMetastore:\0028\001\"_\n\005State\022\025" - + "\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006A" - + "CTIVE\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\t\n\005E" - + "RROR\020\005:j\352Ag\n#metastore.googleapis.com/Fe" - + "deration\022@projects/{project}/locations/{" - + "location}/federations/{federation}\"\274\001\n\020B" - + "ackendMetastore\022\014\n\004name\030\001 \001(\t\022Q\n\016metasto" - + "re_type\030\002 \001(\01629.google.cloud.metastore.v" - + "1.BackendMetastore.MetastoreType\"G\n\rMeta" - + "storeType\022\036\n\032METASTORE_TYPE_UNSPECIFIED\020" - + "\000\022\026\n\022DATAPROC_METASTORE\020\003\"\262\001\n\026ListFedera" - + "tionsRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#me" - + "tastore.googleapis.com/Federation\022\026\n\tpag" - + "e_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340" - + "A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(" - + "\tB\003\340A\001\"\203\001\n\027ListFederationsResponse\022:\n\013fe" - + "derations\030\001 \003(\0132%.google.cloud.metastore" - + ".v1.Federation\022\027\n\017next_page_token\030\002 \001(\t\022" - + "\023\n\013unreachable\030\003 \003(\t\"Q\n\024GetFederationReq" - + "uest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#metastore.go" - + "ogleapis.com/Federation\"\313\001\n\027CreateFedera" - + "tionRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#met" - + "astore.googleapis.com/Federation\022\032\n\rfede" - + "ration_id\030\002 \001(\tB\003\340A\002\022>\n\nfederation\030\003 \001(\013" - + "2%.google.cloud.metastore.v1.FederationB" - + "\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\250\001\n\027Update" - + "FederationRequest\0224\n\013update_mask\030\001 \001(\0132\032" - + ".google.protobuf.FieldMaskB\003\340A\002\022>\n\nfeder" - + "ation\030\002 \001(\0132%.google.cloud.metastore.v1." - + "FederationB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001" - + "\"m\n\027DeleteFederationRequest\0229\n\004name\030\001 \001(" - + "\tB+\340A\002\372A%\n#metastore.googleapis.com/Fede" - + "ration\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\0012\334\t\n\033Data" - + "procMetastoreFederation\022\272\001\n\017ListFederati" - + "ons\0221.google.cloud.metastore.v1.ListFede" - + "rationsRequest\0322.google.cloud.metastore." - + "v1.ListFederationsResponse\"@\202\323\344\223\0021\022//v1/" - + "{parent=projects/*/locations/*}/federati" - + "ons\332A\006parent\022\247\001\n\rGetFederation\022/.google." - + "cloud.metastore.v1.GetFederationRequest\032" - + "%.google.cloud.metastore.v1.Federation\">" - + "\202\323\344\223\0021\022//v1/{name=projects/*/locations/*" - + "/federations/*}\332A\004name\022\211\002\n\020CreateFederat" - + "ion\0222.google.cloud.metastore.v1.CreateFe" - + "derationRequest\032\035.google.longrunning.Ope" - + "ration\"\241\001\202\323\344\223\002=\"//v1/{parent=projects/*/" - + "locations/*}/federations:\nfederation\332A\037p" - + "arent,federation,federation_id\312A9\n\nFeder" - + "ation\022+google.cloud.metastore.v1.Operati" - + "onMetadata\022\213\002\n\020UpdateFederation\0222.google" - + ".cloud.metastore.v1.UpdateFederationRequ" - + "est\032\035.google.longrunning.Operation\"\243\001\202\323\344" - + "\223\002H2:/v1/{federation.name=projects/*/loc" - + "ations/*/federations/*}:\nfederation\332A\026fe" - + "deration,update_mask\312A9\n\nFederation\022+goo" - + "gle.cloud.metastore.v1.OperationMetadata" - + "\022\355\001\n\020DeleteFederation\0222.google.cloud.met" - + "astore.v1.DeleteFederationRequest\032\035.goog" - + "le.longrunning.Operation\"\205\001\202\323\344\223\0021*//v1/{" - + "name=projects/*/locations/*/federations/" - + "*}\332A\004name\312AD\n\025google.protobuf.Empty\022+goo" - + "gle.cloud.metastore.v1.OperationMetadata" - + "\032L\312A\030metastore.googleapis.com\322A.https://" - + "www.googleapis.com/auth/cloud-platformBx" - + "\n\035com.google.cloud.metastore.v1B\030Metasto" - + "reFederationProtoP\001Z;cloud.google.com/go" - + "/metastore/apiv1/metastorepb;metastorepb" - + "b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_metastore_v1_Federation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_metastore_v1_Federation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_Federation_descriptor, - new java.lang.String[] { - "Name", - "CreateTime", - "UpdateTime", - "Labels", - "Version", - "BackendMetastores", - "EndpointUri", - "State", - "StateMessage", - "Uid", - }); - internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_descriptor = - internal_static_google_cloud_metastore_v1_Federation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_descriptor = - internal_static_google_cloud_metastore_v1_Federation_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_metastore_v1_BackendMetastore_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor, - new java.lang.String[] { - "Name", "MetastoreType", - }); - internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_metastore_v1_ListFederationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", "Filter", "OrderBy", - }); - internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_metastore_v1_ListFederationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor, - new java.lang.String[] { - "Federations", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_metastore_v1_GetFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_metastore_v1_CreateFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor, - new java.lang.String[] { - "Parent", "FederationId", "Federation", "RequestId", - }); - internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_metastore_v1_UpdateFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor, - new java.lang.String[] { - "UpdateMask", "Federation", "RequestId", - }); - internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_metastore_v1_DeleteFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor, - new java.lang.String[] { - "Name", "RequestId", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreProto.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreProto.java deleted file mode 100644 index 64d8a56d091e..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreProto.java +++ /dev/null @@ -1,908 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public final class MetastoreProto { - private MetastoreProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_Service_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_Service_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_Service_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_Service_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_MaintenanceWindow_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_MaintenanceWindow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_ConfigOverridesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_ConfigOverridesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_KerberosConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_KerberosConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_Secret_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_Secret_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_EncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_EncryptionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_NetworkConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_NetworkConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_TelemetryConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_TelemetryConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_MetadataManagementActivity_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_MetadataManagementActivity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_MetadataImport_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_MetadataImport_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_MetadataExport_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_MetadataExport_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_Backup_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_Backup_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_Restore_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_Restore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ListServicesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ListServicesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ListServicesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ListServicesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_GetServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_GetServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_CreateServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_CreateServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_UpdateServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_UpdateServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_DeleteServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_DeleteServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ListBackupsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ListBackupsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ListBackupsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ListBackupsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_GetBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_GetBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_CreateBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_DeleteBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_ExportMetadataRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_ExportMetadataRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_RestoreServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_RestoreServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_OperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_LocationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_LocationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/metastore/v1/metastore.pr" - + "oto\022\031google.cloud.metastore.v1\032\034google/a" - + "pi/annotations.proto\032\027google/api/client." - + "proto\032\037google/api/field_behavior.proto\032\031" - + "google/api/resource.proto\032#google/longru" - + "nning/operations.proto\032 google/protobuf/" - + "field_mask.proto\032\037google/protobuf/timest" - + "amp.proto\032\036google/protobuf/wrappers.prot" - + "o\032\033google/type/dayofweek.proto\"\321\014\n\007Servi" - + "ce\022O\n\025hive_metastore_config\030\005 \001(\0132..goog" - + "le.cloud.metastore.v1.HiveMetastoreConfi" - + "gH\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030\002 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013" - + "update_time\030\003 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\022>\n\006labels\030\004 \003(\0132..google.clou" - + "d.metastore.v1.Service.LabelsEntry\0227\n\007ne" - + "twork\030\007 \001(\tB&\340A\005\372A \n\036compute.googleapis." - + "com/Network\022\031\n\014endpoint_uri\030\010 \001(\tB\003\340A\003\022\014" - + "\n\004port\030\t \001(\005\022<\n\005state\030\n \001(\0162(.google.clo" - + "ud.metastore.v1.Service.StateB\003\340A\003\022\032\n\rst" - + "ate_message\030\013 \001(\tB\003\340A\003\022\035\n\020artifact_gcs_u" - + "ri\030\014 \001(\tB\003\340A\003\0225\n\004tier\030\r \001(\0162\'.google.clo" - + "ud.metastore.v1.Service.Tier\022H\n\022maintena" - + "nce_window\030\017 \001(\0132,.google.cloud.metastor" - + "e.v1.MaintenanceWindow\022\020\n\003uid\030\020 \001(\tB\003\340A\003" - + "\022`\n\034metadata_management_activity\030\021 \001(\01325" - + ".google.cloud.metastore.v1.MetadataManag" - + "ementActivityB\003\340A\003\022O\n\017release_channel\030\023 " - + "\001(\01621.google.cloud.metastore.v1.Service." - + "ReleaseChannelB\003\340A\005\022K\n\021encryption_config" - + "\030\024 \001(\0132+.google.cloud.metastore.v1.Encry" - + "ptionConfigB\003\340A\005\022@\n\016network_config\030\025 \001(\013" - + "2(.google.cloud.metastore.v1.NetworkConf" - + "ig\022K\n\rdatabase_type\030\026 \001(\0162/.google.cloud" - + ".metastore.v1.Service.DatabaseTypeB\003\340A\005\022" - + "D\n\020telemetry_config\030\027 \001(\0132*.google.cloud" - + ".metastore.v1.TelemetryConfig\032-\n\013LabelsE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"~\n\005" - + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING" - + "\020\001\022\n\n\006ACTIVE\020\002\022\016\n\nSUSPENDING\020\003\022\r\n\tSUSPEN" - + "DED\020\004\022\014\n\010UPDATING\020\005\022\014\n\010DELETING\020\006\022\t\n\005ERR" - + "OR\020\007\";\n\004Tier\022\024\n\020TIER_UNSPECIFIED\020\000\022\r\n\tDE" - + "VELOPER\020\001\022\016\n\nENTERPRISE\020\003\"I\n\016ReleaseChan" - + "nel\022\037\n\033RELEASE_CHANNEL_UNSPECIFIED\020\000\022\n\n\006" - + "CANARY\020\001\022\n\n\006STABLE\020\002\"E\n\014DatabaseType\022\035\n\031" - + "DATABASE_TYPE_UNSPECIFIED\020\000\022\t\n\005MYSQL\020\001\022\013" - + "\n\007SPANNER\020\002:a\352A^\n metastore.googleapis.c" - + "om/Service\022:projects/{project}/locations" - + "/{location}/services/{service}B\022\n\020metast" - + "ore_config\"r\n\021MaintenanceWindow\0220\n\013hour_" - + "of_day\030\001 \001(\0132\033.google.protobuf.Int32Valu" - + "e\022+\n\013day_of_week\030\002 \001(\0162\026.google.type.Day" - + "OfWeek\"\206\002\n\023HiveMetastoreConfig\022\024\n\007versio" - + "n\030\001 \001(\tB\003\340A\005\022]\n\020config_overrides\030\002 \003(\0132C" - + ".google.cloud.metastore.v1.HiveMetastore" - + "Config.ConfigOverridesEntry\022B\n\017kerberos_" - + "config\030\003 \001(\0132).google.cloud.metastore.v1" - + ".KerberosConfig\0326\n\024ConfigOverridesEntry\022" - + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"s\n\016Kerbe" - + "rosConfig\0221\n\006keytab\030\001 \001(\0132!.google.cloud" - + ".metastore.v1.Secret\022\021\n\tprincipal\030\002 \001(\t\022" - + "\033\n\023krb5_config_gcs_uri\030\003 \001(\t\")\n\006Secret\022\026" - + "\n\014cloud_secret\030\002 \001(\tH\000B\007\n\005value\"#\n\020Encry" - + "ptionConfig\022\017\n\007kms_key\030\001 \001(\t\"\322\001\n\rNetwork" - + "Config\022I\n\tconsumers\030\001 \003(\01321.google.cloud" - + ".metastore.v1.NetworkConfig.ConsumerB\003\340A" - + "\005\032v\n\010Consumer\022?\n\nsubnetwork\030\001 \001(\tB)\340A\005\372A" - + "#\n!compute.googleapis.com/SubnetworkH\000\022\031" - + "\n\014endpoint_uri\030\003 \001(\tB\003\340A\003B\016\n\014vpc_resourc" - + "e\"\232\001\n\017TelemetryConfig\022H\n\nlog_format\030\001 \001(" - + "\01624.google.cloud.metastore.v1.TelemetryC" - + "onfig.LogFormat\"=\n\tLogFormat\022\032\n\026LOG_FORM" - + "AT_UNSPECIFIED\020\000\022\n\n\006LEGACY\020\001\022\010\n\004JSON\020\002\"\241" - + "\001\n\032MetadataManagementActivity\022H\n\020metadat" - + "a_exports\030\001 \003(\0132).google.cloud.metastore" - + ".v1.MetadataExportB\003\340A\003\0229\n\010restores\030\002 \003(" - + "\0132\".google.cloud.metastore.v1.RestoreB\003\340" - + "A\003\"\343\006\n\016MetadataImport\022T\n\rdatabase_dump\030\006" - + " \001(\01326.google.cloud.metastore.v1.Metadat" - + "aImport.DatabaseDumpB\003\340A\005H\000\022\021\n\004name\030\001 \001(" - + "\tB\003\340A\005\022\023\n\013description\030\002 \001(\t\0224\n\013create_ti" - + "me\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\0224\n\013update_time\030\004 \001(\0132\032.google.protobuf" - + ".TimestampB\003\340A\003\0221\n\010end_time\030\007 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022C\n\005state\030\005 \001(" - + "\0162/.google.cloud.metastore.v1.MetadataIm" - + "port.StateB\003\340A\003\032\376\001\n\014DatabaseDump\022^\n\rdata" - + "base_type\030\001 \001(\0162C.google.cloud.metastore" - + ".v1.MetadataImport.DatabaseDump.Database" - + "TypeB\002\030\001\022\017\n\007gcs_uri\030\002 \001(\t\022C\n\004type\030\004 \001(\0162" - + "0.google.cloud.metastore.v1.DatabaseDump" - + "Spec.TypeB\003\340A\001\"8\n\014DatabaseType\022\035\n\031DATABA" - + "SE_TYPE_UNSPECIFIED\020\000\022\t\n\005MYSQL\020\001\"T\n\005Stat" - + "e\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n" - + "\tSUCCEEDED\020\002\022\014\n\010UPDATING\020\003\022\n\n\006FAILED\020\004:\213" - + "\001\352A\207\001\n\'metastore.googleapis.com/Metadata" - + "Import\022\\projects/{project}/locations/{lo" - + "cation}/services/{service}/metadataImpor" - + "ts/{metadata_import}B\n\n\010metadata\"\232\003\n\016Met" - + "adataExport\022\"\n\023destination_gcs_uri\030\004 \001(\t" - + "B\003\340A\003H\000\0223\n\nstart_time\030\001 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032" - + ".google.protobuf.TimestampB\003\340A\003\022C\n\005state" - + "\030\003 \001(\0162/.google.cloud.metastore.v1.Metad" - + "ataExport.StateB\003\340A\003\022Q\n\022database_dump_ty" - + "pe\030\005 \001(\01620.google.cloud.metastore.v1.Dat" - + "abaseDumpSpec.TypeB\003\340A\003\"U\n\005State\022\025\n\021STAT" - + "E_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDE" - + "D\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED\020\004B\r\n\013destin" - + "ation\"\220\004\n\006Backup\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013c" - + "reate_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\0221\n\010end_time\030\003 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003\022;\n\005state\030\004 \001(\0162\'.go" - + "ogle.cloud.metastore.v1.Backup.StateB\003\340A" - + "\003\022A\n\020service_revision\030\005 \001(\0132\".google.clo" - + "ud.metastore.v1.ServiceB\003\340A\003\022\023\n\013descript" - + "ion\030\006 \001(\t\022\037\n\022restoring_services\030\007 \003(\tB\003\340" - + "A\003\"a\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CR" - + "EATING\020\001\022\014\n\010DELETING\020\002\022\n\n\006ACTIVE\020\003\022\n\n\006FA" - + "ILED\020\004\022\r\n\tRESTORING\020\005:q\352An\n\037metastore.go" - + "ogleapis.com/Backup\022Kprojects/{project}/" - + "locations/{location}/services/{service}/" - + "backups/{backup}\"\342\003\n\007Restore\0223\n\nstart_ti" - + "me\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\0221\n\010end_time\030\002 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\022<\n\005state\030\003 \001(\0162(.google.clo" - + "ud.metastore.v1.Restore.StateB\003\340A\003\0227\n\006ba" - + "ckup\030\004 \001(\tB\'\340A\003\372A!\n\037metastore.googleapis" - + ".com/Backup\022A\n\004type\030\005 \001(\0162..google.cloud" - + ".metastore.v1.Restore.RestoreTypeB\003\340A\003\022\024" - + "\n\007details\030\006 \001(\tB\003\340A\003\"U\n\005State\022\025\n\021STATE_U" - + "NSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002" - + "\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED\020\004\"H\n\013RestoreTy" - + "pe\022\034\n\030RESTORE_TYPE_UNSPECIFIED\020\000\022\010\n\004FULL" - + "\020\001\022\021\n\rMETADATA_ONLY\020\002\"\254\001\n\023ListServicesRe" - + "quest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 metastore" - + ".googleapis.com/Service\022\026\n\tpage_size\030\002 \001" - + "(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filt" - + "er\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"z\n\024" - + "ListServicesResponse\0224\n\010services\030\001 \003(\0132\"" - + ".google.cloud.metastore.v1.Service\022\027\n\017ne" - + "xt_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t" - + "\"K\n\021GetServiceRequest\0226\n\004name\030\001 \001(\tB(\340A\002" - + "\372A\"\n metastore.googleapis.com/Service\"\274\001" - + "\n\024CreateServiceRequest\0228\n\006parent\030\001 \001(\tB(" - + "\340A\002\372A\"\022 metastore.googleapis.com/Service" - + "\022\027\n\nservice_id\030\002 \001(\tB\003\340A\002\0228\n\007service\030\003 \001" - + "(\0132\".google.cloud.metastore.v1.ServiceB\003" - + "\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\237\001\n\024UpdateS" - + "erviceRequest\0224\n\013update_mask\030\001 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\003\340A\002\0228\n\007service\030\002" - + " \001(\0132\".google.cloud.metastore.v1.Service" - + "B\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"g\n\024Delete" - + "ServiceRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n me" - + "tastore.googleapis.com/Service\022\027\n\nreques" - + "t_id\030\002 \001(\tB\003\340A\001\"\272\001\n\032ListMetadataImportsR" - + "equest\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\022\'metastor" - + "e.googleapis.com/MetadataImport\022\026\n\tpage_" - + "size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001" - + "\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB" - + "\003\340A\001\"\220\001\n\033ListMetadataImportsResponse\022C\n\020" - + "metadata_imports\030\001 \003(\0132).google.cloud.me" - + "tastore.v1.MetadataImport\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Y\n\030GetMe" - + "tadataImportRequest\022=\n\004name\030\001 \001(\tB/\340A\002\372A" - + ")\n\'metastore.googleapis.com/MetadataImpo" - + "rt\"\341\001\n\033CreateMetadataImportRequest\022?\n\006pa" - + "rent\030\001 \001(\tB/\340A\002\372A)\022\'metastore.googleapis" - + ".com/MetadataImport\022\037\n\022metadata_import_i" - + "d\030\002 \001(\tB\003\340A\002\022G\n\017metadata_import\030\003 \001(\0132)." - + "google.cloud.metastore.v1.MetadataImport" - + "B\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\265\001\n\033Updat" - + "eMetadataImportRequest\0224\n\013update_mask\030\001 " - + "\001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022G\n\017" - + "metadata_import\030\002 \001(\0132).google.cloud.met" - + "astore.v1.MetadataImportB\003\340A\002\022\027\n\nrequest" - + "_id\030\003 \001(\tB\003\340A\001\"\252\001\n\022ListBackupsRequest\0227\n" - + "\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037metastore.googlea" - + "pis.com/Backup\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027" - + "\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB" - + "\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"w\n\023ListBacku" - + "psResponse\0222\n\007backups\030\001 \003(\0132!.google.clo" - + "ud.metastore.v1.Backup\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"I\n\020GetBacku" - + "pRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037metastor" - + "e.googleapis.com/Backup\"\267\001\n\023CreateBackup" - + "Request\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037metasto" - + "re.googleapis.com/Backup\022\026\n\tbackup_id\030\002 " - + "\001(\tB\003\340A\002\0226\n\006backup\030\003 \001(\0132!.google.cloud." - + "metastore.v1.BackupB\003\340A\002\022\027\n\nrequest_id\030\004" - + " \001(\tB\003\340A\001\"e\n\023DeleteBackupRequest\0225\n\004name" - + "\030\001 \001(\tB\'\340A\002\372A!\n\037metastore.googleapis.com" - + "/Backup\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\357\001\n\025Exp" - + "ortMetadataRequest\022 \n\026destination_gcs_fo" - + "lder\030\002 \001(\tH\000\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n m" - + "etastore.googleapis.com/Service\022\027\n\nreque" - + "st_id\030\003 \001(\tB\003\340A\001\022Q\n\022database_dump_type\030\004" - + " \001(\01620.google.cloud.metastore.v1.Databas" - + "eDumpSpec.TypeB\003\340A\001B\r\n\013destination\"\357\001\n\025R" - + "estoreServiceRequest\0229\n\007service\030\001 \001(\tB(\340" - + "A\002\372A\"\n metastore.googleapis.com/Service\022" - + "7\n\006backup\030\002 \001(\tB\'\340A\002\372A!\n\037metastore.googl" - + "eapis.com/Backup\022I\n\014restore_type\030\003 \001(\0162." - + ".google.cloud.metastore.v1.Restore.Resto" - + "reTypeB\003\340A\001\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\200\002\n" - + "\021OperationMetadata\0224\n\013create_time\030\001 \001(\0132" - + "\032.google.protobuf.TimestampB\003\340A\003\0221\n\010end_" - + "time\030\002 \001(\0132\032.google.protobuf.TimestampB\003" - + "\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003" - + "\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022#\n\026requ" - + "ested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013api_ver" - + "sion\030\007 \001(\tB\003\340A\003\"\274\001\n\020LocationMetadata\022k\n!" - + "supported_hive_metastore_versions\030\001 \003(\0132" - + "@.google.cloud.metastore.v1.LocationMeta" - + "data.HiveMetastoreVersion\032;\n\024HiveMetasto" - + "reVersion\022\017\n\007version\030\001 \001(\t\022\022\n\nis_default" - + "\030\002 \001(\010\"E\n\020DatabaseDumpSpec\"1\n\004Type\022\024\n\020TY" - + "PE_UNSPECIFIED\020\000\022\t\n\005MYSQL\020\001\022\010\n\004AVRO\020\0022\274\033" - + "\n\021DataprocMetastore\022\256\001\n\014ListServices\022..g" - + "oogle.cloud.metastore.v1.ListServicesReq" - + "uest\032/.google.cloud.metastore.v1.ListSer" - + "vicesResponse\"=\202\323\344\223\002.\022,/v1/{parent=proje" - + "cts/*/locations/*}/services\332A\006parent\022\233\001\n" - + "\nGetService\022,.google.cloud.metastore.v1." - + "GetServiceRequest\032\".google.cloud.metasto" - + "re.v1.Service\";\202\323\344\223\002.\022,/v1/{name=project" - + "s/*/locations/*/services/*}\332A\004name\022\364\001\n\rC" - + "reateService\022/.google.cloud.metastore.v1" - + ".CreateServiceRequest\032\035.google.longrunni" - + "ng.Operation\"\222\001\202\323\344\223\0027\",/v1/{parent=proje" - + "cts/*/locations/*}/services:\007service\332A\031p" - + "arent,service,service_id\312A6\n\007Service\022+go" - + "ogle.cloud.metastore.v1.OperationMetadat" - + "a\022\366\001\n\rUpdateService\022/.google.cloud.metas" - + "tore.v1.UpdateServiceRequest\032\035.google.lo" - + "ngrunning.Operation\"\224\001\202\323\344\223\002?24/v1/{servi" - + "ce.name=projects/*/locations/*/services/" - + "*}:\007service\332A\023service,update_mask\312A6\n\007Se" - + "rvice\022+google.cloud.metastore.v1.Operati" - + "onMetadata\022\344\001\n\rDeleteService\022/.google.cl" - + "oud.metastore.v1.DeleteServiceRequest\032\035." - + "google.longrunning.Operation\"\202\001\202\323\344\223\002.*,/" - + "v1/{name=projects/*/locations/*/services" - + "/*}\332A\004name\312AD\n\025google.protobuf.Empty\022+go" - + "ogle.cloud.metastore.v1.OperationMetadat" - + "a\022\325\001\n\023ListMetadataImports\0225.google.cloud" - + ".metastore.v1.ListMetadataImportsRequest" - + "\0326.google.cloud.metastore.v1.ListMetadat" - + "aImportsResponse\"O\202\323\344\223\002@\022>/v1/{parent=pr" - + "ojects/*/locations/*/services/*}/metadat" - + "aImports\332A\006parent\022\302\001\n\021GetMetadataImport\022" - + "3.google.cloud.metastore.v1.GetMetadataI" - + "mportRequest\032).google.cloud.metastore.v1" - + ".MetadataImport\"M\202\323\344\223\002@\022>/v1/{name=proje" - + "cts/*/locations/*/services/*/metadataImp" - + "orts/*}\332A\004name\022\263\002\n\024CreateMetadataImport\022" - + "6.google.cloud.metastore.v1.CreateMetada" - + "taImportRequest\032\035.google.longrunning.Ope" - + "ration\"\303\001\202\323\344\223\002Q\">/v1/{parent=projects/*/" - + "locations/*/services/*}/metadataImports:" - + "\017metadata_import\332A)parent,metadata_impor" - + "t,metadata_import_id\312A=\n\016MetadataImport\022" - + "+google.cloud.metastore.v1.OperationMeta" - + "data\022\265\002\n\024UpdateMetadataImport\0226.google.c" - + "loud.metastore.v1.UpdateMetadataImportRe" - + "quest\032\035.google.longrunning.Operation\"\305\001\202" - + "\323\344\223\002a2N/v1/{metadata_import.name=project" - + "s/*/locations/*/services/*/metadataImpor" - + "ts/*}:\017metadata_import\332A\033metadata_import" - + ",update_mask\312A=\n\016MetadataImport\022+google." - + "cloud.metastore.v1.OperationMetadata\022\355\001\n" - + "\016ExportMetadata\0220.google.cloud.metastore" - + ".v1.ExportMetadataRequest\032\035.google.longr" - + "unning.Operation\"\211\001\202\323\344\223\002C\">/v1/{service=" - + "projects/*/locations/*/services/*}:expor" - + "tMetadata:\001*\312A=\n\016MetadataExport\022+google." - + "cloud.metastore.v1.OperationMetadata\022\360\001\n" - + "\016RestoreService\0220.google.cloud.metastore" - + ".v1.RestoreServiceRequest\032\035.google.longr" - + "unning.Operation\"\214\001\202\323\344\223\002<\"7/v1/{service=" - + "projects/*/locations/*/services/*}:resto" - + "re:\001*\332A\016service,backup\312A6\n\007Restore\022+goog" - + "le.cloud.metastore.v1.OperationMetadata\022" - + "\265\001\n\013ListBackups\022-.google.cloud.metastore" - + ".v1.ListBackupsRequest\032..google.cloud.me" - + "tastore.v1.ListBackupsResponse\"G\202\323\344\223\0028\0226" - + "/v1/{parent=projects/*/locations/*/servi" - + "ces/*}/backups\332A\006parent\022\242\001\n\tGetBackup\022+." - + "google.cloud.metastore.v1.GetBackupReque" - + "st\032!.google.cloud.metastore.v1.Backup\"E\202" - + "\323\344\223\0028\0226/v1/{name=projects/*/locations/*/" - + "services/*/backups/*}\332A\004name\022\370\001\n\014CreateB" - + "ackup\022..google.cloud.metastore.v1.Create" - + "BackupRequest\032\035.google.longrunning.Opera" - + "tion\"\230\001\202\323\344\223\002@\"6/v1/{parent=projects/*/lo" - + "cations/*/services/*}/backups:\006backup\332A\027" - + "parent,backup,backup_id\312A5\n\006Backup\022+goog" - + "le.cloud.metastore.v1.OperationMetadata\022" - + "\354\001\n\014DeleteBackup\022..google.cloud.metastor" - + "e.v1.DeleteBackupRequest\032\035.google.longru" - + "nning.Operation\"\214\001\202\323\344\223\0028*6/v1/{name=proj" - + "ects/*/locations/*/services/*/backups/*}" - + "\332A\004name\312AD\n\025google.protobuf.Empty\022+googl" - + "e.cloud.metastore.v1.OperationMetadata\032L" - + "\312A\030metastore.googleapis.com\322A.https://ww" - + "w.googleapis.com/auth/cloud-platformB\277\002\n" - + "\035com.google.cloud.metastore.v1B\016Metastor" - + "eProtoP\001Z;cloud.google.com/go/metastore/" - + "apiv1/metastorepb;metastorepb\312\002\031Google\\C" - + "loud\\Metastore\\V1\352AN\n\036compute.googleapis" - + ".com/Network\022,projects/{project}/global/" - + "networks/{network}\352Aa\n!compute.googleapi" - + "s.com/Subnetwork\022 - * Network configuration for the Dataproc Metastore service. - * - * - * Protobuf type {@code google.cloud.metastore.v1.NetworkConfig} - */ -public final class NetworkConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.NetworkConfig) - NetworkConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use NetworkConfig.newBuilder() to construct. - private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NetworkConfig() { - consumers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NetworkConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.NetworkConfig.class, - com.google.cloud.metastore.v1.NetworkConfig.Builder.class); - } - - public interface ConsumerOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.NetworkConfig.Consumer) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP address is
-     * reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - boolean hasSubnetwork(); - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP address is
-     * reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - java.lang.String getSubnetwork(); - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP address is
-     * reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - com.google.protobuf.ByteString getSubnetworkBytes(); - - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - public com.google.cloud.metastore.v1.NetworkConfig.Consumer.VpcResourceCase - getVpcResourceCase(); - } - /** - * - * - *
-   * Contains information of the customer's network configurations.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.NetworkConfig.Consumer} - */ - public static final class Consumer extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.NetworkConfig.Consumer) - ConsumerOrBuilder { - private static final long serialVersionUID = 0L; - // Use Consumer.newBuilder() to construct. - private Consumer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Consumer() { - endpointUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Consumer(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.NetworkConfig.Consumer.class, - com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder.class); - } - - private int vpcResourceCase_ = 0; - private java.lang.Object vpcResource_; - - public enum VpcResourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SUBNETWORK(1), - VPCRESOURCE_NOT_SET(0); - private final int value; - - private VpcResourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VpcResourceCase valueOf(int value) { - return forNumber(value); - } - - public static VpcResourceCase forNumber(int value) { - switch (value) { - case 1: - return SUBNETWORK; - case 0: - return VPCRESOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VpcResourceCase getVpcResourceCase() { - return VpcResourceCase.forNumber(vpcResourceCase_); - } - - public static final int SUBNETWORK_FIELD_NUMBER = 1; - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP address is
-     * reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - public boolean hasSubnetwork() { - return vpcResourceCase_ == 1; - } - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP address is
-     * reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - public java.lang.String getSubnetwork() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (vpcResourceCase_ == 1) { - vpcResource_ = s; - } - return s; - } - } - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP address is
-     * reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - public com.google.protobuf.ByteString getSubnetworkBytes() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (vpcResourceCase_ == 1) { - vpcResource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (vpcResourceCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vpcResource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (vpcResourceCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vpcResource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.NetworkConfig.Consumer)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.NetworkConfig.Consumer other = - (com.google.cloud.metastore.v1.NetworkConfig.Consumer) obj; - - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (!getVpcResourceCase().equals(other.getVpcResourceCase())) return false; - switch (vpcResourceCase_) { - case 1: - if (!getSubnetwork().equals(other.getSubnetwork())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - switch (vpcResourceCase_) { - case 1: - hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; - hash = (53 * hash) + getSubnetwork().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.NetworkConfig.Consumer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Contains information of the customer's network configurations.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1.NetworkConfig.Consumer} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.NetworkConfig.Consumer) - com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.NetworkConfig.Consumer.class, - com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.NetworkConfig.Consumer.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpointUri_ = ""; - vpcResourceCase_ = 0; - vpcResource_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig.Consumer getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.NetworkConfig.Consumer.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig.Consumer build() { - com.google.cloud.metastore.v1.NetworkConfig.Consumer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig.Consumer buildPartial() { - com.google.cloud.metastore.v1.NetworkConfig.Consumer result = - new com.google.cloud.metastore.v1.NetworkConfig.Consumer(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.NetworkConfig.Consumer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endpointUri_ = endpointUri_; - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1.NetworkConfig.Consumer result) { - result.vpcResourceCase_ = vpcResourceCase_; - result.vpcResource_ = this.vpcResource_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.NetworkConfig.Consumer) { - return mergeFrom((com.google.cloud.metastore.v1.NetworkConfig.Consumer) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.NetworkConfig.Consumer other) { - if (other == com.google.cloud.metastore.v1.NetworkConfig.Consumer.getDefaultInstance()) - return this; - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - switch (other.getVpcResourceCase()) { - case SUBNETWORK: - { - vpcResourceCase_ = 1; - vpcResource_ = other.vpcResource_; - onChanged(); - break; - } - case VPCRESOURCE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - vpcResourceCase_ = 1; - vpcResource_ = s; - break; - } // case 10 - case 26: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int vpcResourceCase_ = 0; - private java.lang.Object vpcResource_; - - public VpcResourceCase getVpcResourceCase() { - return VpcResourceCase.forNumber(vpcResourceCase_); - } - - public Builder clearVpcResource() { - vpcResourceCase_ = 0; - vpcResource_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP address is
-       * reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - @java.lang.Override - public boolean hasSubnetwork() { - return vpcResourceCase_ == 1; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP address is
-       * reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - @java.lang.Override - public java.lang.String getSubnetwork() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (vpcResourceCase_ == 1) { - vpcResource_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP address is
-       * reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSubnetworkBytes() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (vpcResourceCase_ == 1) { - vpcResource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP address is
-       * reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The subnetwork to set. - * @return This builder for chaining. - */ - public Builder setSubnetwork(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - vpcResourceCase_ = 1; - vpcResource_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP address is
-       * reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearSubnetwork() { - if (vpcResourceCase_ == 1) { - vpcResourceCase_ = 0; - vpcResource_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP address is
-       * reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for subnetwork to set. - * @return This builder for chaining. - */ - public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - vpcResourceCase_ = 1; - vpcResource_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.NetworkConfig.Consumer) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.NetworkConfig.Consumer) - private static final com.google.cloud.metastore.v1.NetworkConfig.Consumer DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.NetworkConfig.Consumer(); - } - - public static com.google.cloud.metastore.v1.NetworkConfig.Consumer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Consumer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig.Consumer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int CONSUMERS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List consumers_; - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public java.util.List getConsumersList() { - return consumers_; - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public java.util.List - getConsumersOrBuilderList() { - return consumers_; - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public int getConsumersCount() { - return consumers_.size(); - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig.Consumer getConsumers(int index) { - return consumers_.get(index); - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( - int index) { - return consumers_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < consumers_.size(); i++) { - output.writeMessage(1, consumers_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < consumers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, consumers_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.NetworkConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.NetworkConfig other = - (com.google.cloud.metastore.v1.NetworkConfig) obj; - - if (!getConsumersList().equals(other.getConsumersList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConsumersCount() > 0) { - hash = (37 * hash) + CONSUMERS_FIELD_NUMBER; - hash = (53 * hash) + getConsumersList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.NetworkConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Network configuration for the Dataproc Metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.NetworkConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.NetworkConfig) - com.google.cloud.metastore.v1.NetworkConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.NetworkConfig.class, - com.google.cloud.metastore.v1.NetworkConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.NetworkConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (consumersBuilder_ == null) { - consumers_ = java.util.Collections.emptyList(); - } else { - consumers_ = null; - consumersBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_NetworkConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig build() { - com.google.cloud.metastore.v1.NetworkConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig buildPartial() { - com.google.cloud.metastore.v1.NetworkConfig result = - new com.google.cloud.metastore.v1.NetworkConfig(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.NetworkConfig result) { - if (consumersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - consumers_ = java.util.Collections.unmodifiableList(consumers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.consumers_ = consumers_; - } else { - result.consumers_ = consumersBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.metastore.v1.NetworkConfig result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.NetworkConfig) { - return mergeFrom((com.google.cloud.metastore.v1.NetworkConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.NetworkConfig other) { - if (other == com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance()) return this; - if (consumersBuilder_ == null) { - if (!other.consumers_.isEmpty()) { - if (consumers_.isEmpty()) { - consumers_ = other.consumers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConsumersIsMutable(); - consumers_.addAll(other.consumers_); - } - onChanged(); - } - } else { - if (!other.consumers_.isEmpty()) { - if (consumersBuilder_.isEmpty()) { - consumersBuilder_.dispose(); - consumersBuilder_ = null; - consumers_ = other.consumers_; - bitField0_ = (bitField0_ & ~0x00000001); - consumersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getConsumersFieldBuilder() - : null; - } else { - consumersBuilder_.addAllMessages(other.consumers_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1.NetworkConfig.Consumer m = - input.readMessage( - com.google.cloud.metastore.v1.NetworkConfig.Consumer.parser(), - extensionRegistry); - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(m); - } else { - consumersBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List consumers_ = - java.util.Collections.emptyList(); - - private void ensureConsumersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - consumers_ = - new java.util.ArrayList( - consumers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.NetworkConfig.Consumer, - com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder> - consumersBuilder_; - - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List getConsumersList() { - if (consumersBuilder_ == null) { - return java.util.Collections.unmodifiableList(consumers_); - } else { - return consumersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public int getConsumersCount() { - if (consumersBuilder_ == null) { - return consumers_.size(); - } else { - return consumersBuilder_.getCount(); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1.NetworkConfig.Consumer getConsumers(int index) { - if (consumersBuilder_ == null) { - return consumers_.get(index); - } else { - return consumersBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setConsumers( - int index, com.google.cloud.metastore.v1.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.set(index, value); - onChanged(); - } else { - consumersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setConsumers( - int index, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.set(index, builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers(com.google.cloud.metastore.v1.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.add(value); - onChanged(); - } else { - consumersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - int index, com.google.cloud.metastore.v1.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.add(index, value); - onChanged(); - } else { - consumersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - int index, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(index, builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addAllConsumers( - java.lang.Iterable values) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumers_); - onChanged(); - } else { - consumersBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearConsumers() { - if (consumersBuilder_ == null) { - consumers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - consumersBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder removeConsumers(int index) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.remove(index); - onChanged(); - } else { - consumersBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder getConsumersBuilder( - int index) { - return getConsumersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( - int index) { - if (consumersBuilder_ == null) { - return consumers_.get(index); - } else { - return consumersBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getConsumersOrBuilderList() { - if (consumersBuilder_ != null) { - return consumersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(consumers_); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder addConsumersBuilder() { - return getConsumersFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1.NetworkConfig.Consumer.getDefaultInstance()); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder addConsumersBuilder( - int index) { - return getConsumersFieldBuilder() - .addBuilder( - index, com.google.cloud.metastore.v1.NetworkConfig.Consumer.getDefaultInstance()); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc Metastore
-     * instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getConsumersBuilderList() { - return getConsumersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.NetworkConfig.Consumer, - com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder> - getConsumersFieldBuilder() { - if (consumersBuilder_ == null) { - consumersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1.NetworkConfig.Consumer, - com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder>( - consumers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - consumers_ = null; - } - return consumersBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.NetworkConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.NetworkConfig) - private static final com.google.cloud.metastore.v1.NetworkConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.NetworkConfig(); - } - - public static com.google.cloud.metastore.v1.NetworkConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NetworkConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/NetworkConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/NetworkConfigOrBuilder.java deleted file mode 100644 index 4f4c041dd03f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/NetworkConfigOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface NetworkConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.NetworkConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - java.util.List getConsumersList(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1.NetworkConfig.Consumer getConsumers(int index); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - int getConsumersCount(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - java.util.List - getConsumersOrBuilderList(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc Metastore
-   * instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadata.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadata.java deleted file mode 100644 index ef5400644ef2..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadata.java +++ /dev/null @@ -1,1829 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Represents the metadata of a long-running operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.OperationMetadata} - */ -public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.OperationMetadata) - OperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OperationMetadata() { - target_ = ""; - verb_ = ""; - statusMessage_ = ""; - apiVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.OperationMetadata.class, - com.google.cloud.metastore.v1.OperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int TARGET_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object target_ = ""; - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERB_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object verb_ = ""; - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - @java.lang.Override - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object statusMessage_ = ""; - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - @java.lang.Override - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; - private boolean requestedCancellation_ = false; - /** - * - * - *
-   * Output only. Identifies whether the caller has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-   * corresponding to `Code.CANCELLED`.
-   * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - @java.lang.Override - public boolean getRequestedCancellation() { - return requestedCancellation_; - } - - public static final int API_VERSION_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object apiVersion_ = ""; - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - @java.lang.Override - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); - } - if (requestedCancellation_ != false) { - output.writeBool(6, requestedCancellation_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); - } - if (requestedCancellation_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.OperationMetadata other = - (com.google.cloud.metastore.v1.OperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (!getTarget().equals(other.getTarget())) return false; - if (!getVerb().equals(other.getVerb())) return false; - if (!getStatusMessage().equals(other.getStatusMessage())) return false; - if (getRequestedCancellation() != other.getRequestedCancellation()) return false; - if (!getApiVersion().equals(other.getApiVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - hash = (37 * hash) + VERB_FIELD_NUMBER; - hash = (53 * hash) + getVerb().hashCode(); - hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStatusMessage().hashCode(); - hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the metadata of a long-running operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.OperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.OperationMetadata) - com.google.cloud.metastore.v1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.OperationMetadata.class, - com.google.cloud.metastore.v1.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.OperationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - target_ = ""; - verb_ = ""; - statusMessage_ = ""; - requestedCancellation_ = false; - apiVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.OperationMetadata build() { - com.google.cloud.metastore.v1.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.OperationMetadata buildPartial() { - com.google.cloud.metastore.v1.OperationMetadata result = - new com.google.cloud.metastore.v1.OperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.OperationMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.target_ = target_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.verb_ = verb_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.statusMessage_ = statusMessage_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.requestedCancellation_ = requestedCancellation_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.apiVersion_ = apiVersion_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.OperationMetadata) { - return mergeFrom((com.google.cloud.metastore.v1.OperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.OperationMetadata other) { - if (other == com.google.cloud.metastore.v1.OperationMetadata.getDefaultInstance()) - return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getStatusMessage().isEmpty()) { - statusMessage_ = other.statusMessage_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.getRequestedCancellation() != false) { - setRequestedCancellation(other.getRequestedCancellation()); - } - if (!other.getApiVersion().isEmpty()) { - apiVersion_ = other.apiVersion_; - bitField0_ |= 0x00000040; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - target_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - verb_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - statusMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 48: - { - requestedCancellation_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 58: - { - apiVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000001); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000002); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object target_ = ""; - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The target to set. - * @return This builder for chaining. - */ - public Builder setTarget(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - target_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearTarget() { - target_ = getDefaultInstance().getTarget(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for target to set. - * @return This builder for chaining. - */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - target_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The verb to set. - * @return This builder for chaining. - */ - public Builder setVerb(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - verb_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearVerb() { - verb_ = getDefaultInstance().getVerb(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for verb to set. - * @return This builder for chaining. - */ - public Builder setVerbBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - verb_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object statusMessage_ = ""; - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - public com.google.protobuf.ByteString getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - statusMessage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStatusMessage() { - statusMessage_ = getDefaultInstance().getStatusMessage(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - statusMessage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private boolean requestedCancellation_; - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - @java.lang.Override - public boolean getRequestedCancellation() { - return requestedCancellation_; - } - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The requestedCancellation to set. - * @return This builder for chaining. - */ - public Builder setRequestedCancellation(boolean value) { - - requestedCancellation_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearRequestedCancellation() { - bitField0_ = (bitField0_ & ~0x00000020); - requestedCancellation_ = false; - onChanged(); - return this; - } - - private java.lang.Object apiVersion_ = ""; - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - apiVersion_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearApiVersion() { - apiVersion_ = getDefaultInstance().getApiVersion(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - apiVersion_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.OperationMetadata) - private static final com.google.cloud.metastore.v1.OperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.OperationMetadata(); - } - - public static com.google.cloud.metastore.v1.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadataOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadataOrBuilder.java deleted file mode 100644 index 0dbe5973cf71..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface OperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - java.lang.String getTarget(); - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - com.google.protobuf.ByteString getTargetBytes(); - - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - java.lang.String getVerb(); - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - com.google.protobuf.ByteString getVerbBytes(); - - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - java.lang.String getStatusMessage(); - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - com.google.protobuf.ByteString getStatusMessageBytes(); - - /** - * - * - *
-   * Output only. Identifies whether the caller has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-   * corresponding to `Code.CANCELLED`.
-   * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - boolean getRequestedCancellation(); - - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - java.lang.String getApiVersion(); - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - com.google.protobuf.ByteString getApiVersionBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Restore.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Restore.java deleted file mode 100644 index 7e46e60143e3..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Restore.java +++ /dev/null @@ -1,2065 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * The details of a metadata restore operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Restore} - */ -public final class Restore extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Restore) - RestoreOrBuilder { - private static final long serialVersionUID = 0L; - // Use Restore.newBuilder() to construct. - private Restore(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Restore() { - state_ = 0; - backup_ = ""; - type_ = 0; - details_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Restore(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Restore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Restore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Restore.class, - com.google.cloud.metastore.v1.Restore.Builder.class); - } - - /** - * - * - *
-   * The current state of the restore.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.Restore.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata restore is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata restore is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata restore completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata restore failed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - * - * - *
-     * The metadata restore is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata restore is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata restore is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata restore completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata restore failed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - * - * - *
-     * The metadata restore is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return FAILED; - case 4: - return CANCELLED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.Restore.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Restore.State) - } - - /** - * - * - *
-   * The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.Restore.RestoreType} - */ - public enum RestoreType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The restore type is unknown.
-     * 
- * - * RESTORE_TYPE_UNSPECIFIED = 0; - */ - RESTORE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * The service's metadata and configuration are restored.
-     * 
- * - * FULL = 1; - */ - FULL(1), - /** - * - * - *
-     * Only the service's metadata is restored.
-     * 
- * - * METADATA_ONLY = 2; - */ - METADATA_ONLY(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The restore type is unknown.
-     * 
- * - * RESTORE_TYPE_UNSPECIFIED = 0; - */ - public static final int RESTORE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The service's metadata and configuration are restored.
-     * 
- * - * FULL = 1; - */ - public static final int FULL_VALUE = 1; - /** - * - * - *
-     * Only the service's metadata is restored.
-     * 
- * - * METADATA_ONLY = 2; - */ - public static final int METADATA_ONLY_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RestoreType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static RestoreType forNumber(int value) { - switch (value) { - case 0: - return RESTORE_TYPE_UNSPECIFIED; - case 1: - return FULL; - case 2: - return METADATA_ONLY; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RestoreType findValueByNumber(int number) { - return RestoreType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.Restore.getDescriptor().getEnumTypes().get(1); - } - - private static final RestoreType[] VALUES = values(); - - public static RestoreType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private RestoreType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Restore.RestoreType) - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Restore.State getState() { - com.google.cloud.metastore.v1.Restore.State result = - com.google.cloud.metastore.v1.Restore.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1.Restore.State.UNRECOGNIZED : result; - } - - public static final int BACKUP_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object backup_ = ""; - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - @java.lang.Override - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 5; - private int type_ = 0; - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Restore.RestoreType getType() { - com.google.cloud.metastore.v1.Restore.RestoreType result = - com.google.cloud.metastore.v1.Restore.RestoreType.forNumber(type_); - return result == null ? com.google.cloud.metastore.v1.Restore.RestoreType.UNRECOGNIZED : result; - } - - public static final int DETAILS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object details_ = ""; - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to be restored
-   * to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - @java.lang.Override - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to be restored
-   * to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1.Restore.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, backup_); - } - if (type_ - != com.google.cloud.metastore.v1.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, details_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1.Restore.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, backup_); - } - if (type_ - != com.google.cloud.metastore.v1.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, details_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.Restore)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.Restore other = (com.google.cloud.metastore.v1.Restore) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (!getBackup().equals(other.getBackup())) return false; - if (type_ != other.type_) return false; - if (!getDetails().equals(other.getDetails())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.Restore parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Restore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Restore parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Restore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.Restore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a metadata restore operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Restore} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Restore) - com.google.cloud.metastore.v1.RestoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Restore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Restore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Restore.class, - com.google.cloud.metastore.v1.Restore.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.Restore.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - backup_ = ""; - type_ = 0; - details_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Restore_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Restore getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.Restore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Restore build() { - com.google.cloud.metastore.v1.Restore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Restore buildPartial() { - com.google.cloud.metastore.v1.Restore result = - new com.google.cloud.metastore.v1.Restore(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.Restore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.backup_ = backup_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.details_ = details_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.Restore) { - return mergeFrom((com.google.cloud.metastore.v1.Restore) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.Restore other) { - if (other == com.google.cloud.metastore.v1.Restore.getDefaultInstance()) return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getBackup().isEmpty()) { - backup_ = other.backup_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getDetails().isEmpty()) { - details_ = other.details_; - bitField0_ |= 0x00000020; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - backup_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: - { - details_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && startTime_ != null - && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000001); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000002); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Restore.State getState() { - com.google.cloud.metastore.v1.Restore.State result = - com.google.cloud.metastore.v1.Restore.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1.Restore.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1.Restore.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000004); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object backup_ = ""; - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The backup to set. - * @return This builder for chaining. - */ - public Builder setBackup(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearBackup() { - backup_ = getDefaultInstance().getBackup(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for backup to set. - * @return This builder for chaining. - */ - public Builder setBackupBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backup_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Restore.RestoreType getType() { - com.google.cloud.metastore.v1.Restore.RestoreType result = - com.google.cloud.metastore.v1.Restore.RestoreType.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1.Restore.RestoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.metastore.v1.Restore.RestoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000010); - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object details_ = ""; - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to be restored
-     * to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to be restored
-     * to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to be restored
-     * to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The details to set. - * @return This builder for chaining. - */ - public Builder setDetails(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to be restored
-     * to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDetails() { - details_ = getDefaultInstance().getDetails(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to be restored
-     * to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for details to set. - * @return This builder for chaining. - */ - public Builder setDetailsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - details_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Restore) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Restore) - private static final com.google.cloud.metastore.v1.Restore DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Restore(); - } - - public static com.google.cloud.metastore.v1.Restore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Restore parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Restore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreOrBuilder.java deleted file mode 100644 index ed562d124368..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreOrBuilder.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface RestoreOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Restore) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1.Restore.State getState(); - - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - java.lang.String getBackup(); - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - com.google.protobuf.ByteString getBackupBytes(); - - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - com.google.cloud.metastore.v1.Restore.RestoreType getType(); - - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to be restored
-   * to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - java.lang.String getDetails(); - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to be restored
-   * to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - com.google.protobuf.ByteString getDetailsBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequest.java deleted file mode 100644 index 6d307a8be9d4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequest.java +++ /dev/null @@ -1,1278 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.Restore][].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.RestoreServiceRequest} - */ -public final class RestoreServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.RestoreServiceRequest) - RestoreServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use RestoreServiceRequest.newBuilder() to construct. - private RestoreServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RestoreServiceRequest() { - service_ = ""; - backup_ = ""; - restoreType_ = 0; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_RestoreServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.RestoreServiceRequest.class, - com.google.cloud.metastore.v1.RestoreServiceRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run restore, in the
-   * following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run restore, in the
-   * following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - @java.lang.Override - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } - } - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESTORE_TYPE_FIELD_NUMBER = 3; - private int restoreType_ = 0; - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - @java.lang.Override - public int getRestoreTypeValue() { - return restoreType_; - } - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Restore.RestoreType getRestoreType() { - com.google.cloud.metastore.v1.Restore.RestoreType result = - com.google.cloud.metastore.v1.Restore.RestoreType.forNumber(restoreType_); - return result == null ? com.google.cloud.metastore.v1.Restore.RestoreType.UNRECOGNIZED : result; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backup_); - } - if (restoreType_ - != com.google.cloud.metastore.v1.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, restoreType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backup_); - } - if (restoreType_ - != com.google.cloud.metastore.v1.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, restoreType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.RestoreServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.RestoreServiceRequest other = - (com.google.cloud.metastore.v1.RestoreServiceRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getBackup().equals(other.getBackup())) return false; - if (restoreType_ != other.restoreType_) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - hash = (37 * hash) + RESTORE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + restoreType_; - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.RestoreServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.Restore][].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.RestoreServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.RestoreServiceRequest) - com.google.cloud.metastore.v1.RestoreServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_RestoreServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.RestoreServiceRequest.class, - com.google.cloud.metastore.v1.RestoreServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.RestoreServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - backup_ = ""; - restoreType_ = 0; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.RestoreServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.RestoreServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.RestoreServiceRequest build() { - com.google.cloud.metastore.v1.RestoreServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.RestoreServiceRequest buildPartial() { - com.google.cloud.metastore.v1.RestoreServiceRequest result = - new com.google.cloud.metastore.v1.RestoreServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.RestoreServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.backup_ = backup_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.restoreType_ = restoreType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.RestoreServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1.RestoreServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.RestoreServiceRequest other) { - if (other == com.google.cloud.metastore.v1.RestoreServiceRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBackup().isEmpty()) { - backup_ = other.backup_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.restoreType_ != 0) { - setRestoreTypeValue(other.getRestoreTypeValue()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - backup_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - restoreType_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run restore, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run restore, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run restore, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run restore, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run restore, in the
-     * following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The backup to set. - * @return This builder for chaining. - */ - public Builder setBackup(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearBackup() { - backup_ = getDefaultInstance().getBackup(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for backup to set. - * @return This builder for chaining. - */ - public Builder setBackupBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backup_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int restoreType_ = 0; - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - @java.lang.Override - public int getRestoreTypeValue() { - return restoreType_; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for restoreType to set. - * @return This builder for chaining. - */ - public Builder setRestoreTypeValue(int value) { - restoreType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Restore.RestoreType getRestoreType() { - com.google.cloud.metastore.v1.Restore.RestoreType result = - com.google.cloud.metastore.v1.Restore.RestoreType.forNumber(restoreType_); - return result == null - ? com.google.cloud.metastore.v1.Restore.RestoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The restoreType to set. - * @return This builder for chaining. - */ - public Builder setRestoreType(com.google.cloud.metastore.v1.Restore.RestoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - restoreType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearRestoreType() { - bitField0_ = (bitField0_ & ~0x00000004); - restoreType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.RestoreServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.RestoreServiceRequest) - private static final com.google.cloud.metastore.v1.RestoreServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.RestoreServiceRequest(); - } - - public static com.google.cloud.metastore.v1.RestoreServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RestoreServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.RestoreServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequestOrBuilder.java deleted file mode 100644 index 1bcdb6ff974e..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequestOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface RestoreServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.RestoreServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run restore, in the
-   * following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run restore, in the
-   * following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - java.lang.String getBackup(); - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - com.google.protobuf.ByteString getBackupBytes(); - - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - int getRestoreTypeValue(); - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - com.google.cloud.metastore.v1.Restore.RestoreType getRestoreType(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Secret.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Secret.java deleted file mode 100644 index ce888c247f57..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Secret.java +++ /dev/null @@ -1,772 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * A securely stored value.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Secret} - */ -public final class Secret extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Secret) - SecretOrBuilder { - private static final long serialVersionUID = 0L; - // Use Secret.newBuilder() to construct. - private Secret(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Secret() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Secret(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Secret_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Secret_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Secret.class, - com.google.cloud.metastore.v1.Secret.Builder.class); - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public enum ValueCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CLOUD_SECRET(2), - VALUE_NOT_SET(0); - private final int value; - - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 2: - return CLOUD_SECRET; - case 0: - return VALUE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public static final int CLOUD_SECRET_FIELD_NUMBER = 2; - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - public boolean hasCloudSecret() { - return valueCase_ == 2; - } - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - public java.lang.String getCloudSecret() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 2) { - value_ = s; - } - return s; - } - } - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - public com.google.protobuf.ByteString getCloudSecretBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (valueCase_ == 2) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (valueCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.Secret)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.Secret other = (com.google.cloud.metastore.v1.Secret) obj; - - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 2: - if (!getCloudSecret().equals(other.getCloudSecret())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (valueCase_) { - case 2: - hash = (37 * hash) + CLOUD_SECRET_FIELD_NUMBER; - hash = (53 * hash) + getCloudSecret().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.Secret parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Secret parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Secret parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Secret parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.Secret prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A securely stored value.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Secret} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Secret) - com.google.cloud.metastore.v1.SecretOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Secret_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Secret_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Secret.class, - com.google.cloud.metastore.v1.Secret.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.Secret.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Secret_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Secret getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.Secret.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Secret build() { - com.google.cloud.metastore.v1.Secret result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Secret buildPartial() { - com.google.cloud.metastore.v1.Secret result = new com.google.cloud.metastore.v1.Secret(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.Secret result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1.Secret result) { - result.valueCase_ = valueCase_; - result.value_ = this.value_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.Secret) { - return mergeFrom((com.google.cloud.metastore.v1.Secret) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.Secret other) { - if (other == com.google.cloud.metastore.v1.Secret.getDefaultInstance()) return this; - switch (other.getValueCase()) { - case CLOUD_SECRET: - { - valueCase_ = 2; - value_ = other.value_; - onChanged(); - break; - } - case VALUE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - valueCase_ = 2; - value_ = s; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - @java.lang.Override - public boolean hasCloudSecret() { - return valueCase_ == 2; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - @java.lang.Override - public java.lang.String getCloudSecret() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 2) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCloudSecretBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (valueCase_ == 2) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @param value The cloudSecret to set. - * @return This builder for chaining. - */ - public Builder setCloudSecret(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return This builder for chaining. - */ - public Builder clearCloudSecret() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @param value The bytes for cloudSecret to set. - * @return This builder for chaining. - */ - public Builder setCloudSecretBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Secret) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Secret) - private static final com.google.cloud.metastore.v1.Secret DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Secret(); - } - - public static com.google.cloud.metastore.v1.Secret getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Secret parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Secret getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/SecretOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/SecretOrBuilder.java deleted file mode 100644 index 6a39502e6ba3..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/SecretOrBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface SecretOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Secret) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - boolean hasCloudSecret(); - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - java.lang.String getCloudSecret(); - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - com.google.protobuf.ByteString getCloudSecretBytes(); - - public com.google.cloud.metastore.v1.Secret.ValueCase getValueCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Service.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Service.java deleted file mode 100644 index fe604dfc1661..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Service.java +++ /dev/null @@ -1,5854 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * A managed metastore service that serves metadata queries.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Service} - */ -public final class Service extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Service) - ServiceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Service.newBuilder() to construct. - private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Service() { - name_ = ""; - network_ = ""; - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - artifactGcsUri_ = ""; - tier_ = 0; - uid_ = ""; - releaseChannel_ = 0; - databaseType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Service(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Service_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Service.class, - com.google.cloud.metastore.v1.Service.Builder.class); - } - - /** - * - * - *
-   * The current state of the metastore service.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.Service.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metastore service is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metastore service is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The metastore service is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - ACTIVE(2), - /** - * - * - *
-     * The metastore service is entering suspension. Its query-serving
-     * availability may cease unexpectedly.
-     * 
- * - * SUSPENDING = 3; - */ - SUSPENDING(3), - /** - * - * - *
-     * The metastore service is suspended and unable to serve queries.
-     * 
- * - * SUSPENDED = 4; - */ - SUSPENDED(4), - /** - * - * - *
-     * The metastore service is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 5; - */ - UPDATING(5), - /** - * - * - *
-     * The metastore service is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 6; - */ - DELETING(6), - /** - * - * - *
-     * The metastore service has encountered an error and cannot be used. The
-     * metastore service should be deleted.
-     * 
- * - * ERROR = 7; - */ - ERROR(7), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metastore service is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metastore service is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The metastore service is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - public static final int ACTIVE_VALUE = 2; - /** - * - * - *
-     * The metastore service is entering suspension. Its query-serving
-     * availability may cease unexpectedly.
-     * 
- * - * SUSPENDING = 3; - */ - public static final int SUSPENDING_VALUE = 3; - /** - * - * - *
-     * The metastore service is suspended and unable to serve queries.
-     * 
- * - * SUSPENDED = 4; - */ - public static final int SUSPENDED_VALUE = 4; - /** - * - * - *
-     * The metastore service is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 5; - */ - public static final int UPDATING_VALUE = 5; - /** - * - * - *
-     * The metastore service is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 6; - */ - public static final int DELETING_VALUE = 6; - /** - * - * - *
-     * The metastore service has encountered an error and cannot be used. The
-     * metastore service should be deleted.
-     * 
- * - * ERROR = 7; - */ - public static final int ERROR_VALUE = 7; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return ACTIVE; - case 3: - return SUSPENDING; - case 4: - return SUSPENDED; - case 5: - return UPDATING; - case 6: - return DELETING; - case 7: - return ERROR; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.Service.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Service.State) - } - - /** - * - * - *
-   * Available service tiers.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.Service.Tier} - */ - public enum Tier implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The tier is not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - TIER_UNSPECIFIED(0), - /** - * - * - *
-     * The developer tier provides limited scalability and no fault tolerance.
-     * Good for low-cost proof-of-concept.
-     * 
- * - * DEVELOPER = 1; - */ - DEVELOPER(1), - /** - * - * - *
-     * The enterprise tier provides multi-zone high availability, and sufficient
-     * scalability for enterprise-level Dataproc Metastore workloads.
-     * 
- * - * ENTERPRISE = 3; - */ - ENTERPRISE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The tier is not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - public static final int TIER_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The developer tier provides limited scalability and no fault tolerance.
-     * Good for low-cost proof-of-concept.
-     * 
- * - * DEVELOPER = 1; - */ - public static final int DEVELOPER_VALUE = 1; - /** - * - * - *
-     * The enterprise tier provides multi-zone high availability, and sufficient
-     * scalability for enterprise-level Dataproc Metastore workloads.
-     * 
- * - * ENTERPRISE = 3; - */ - public static final int ENTERPRISE_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Tier valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Tier forNumber(int value) { - switch (value) { - case 0: - return TIER_UNSPECIFIED; - case 1: - return DEVELOPER; - case 3: - return ENTERPRISE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Tier findValueByNumber(int number) { - return Tier.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.Service.getDescriptor().getEnumTypes().get(1); - } - - private static final Tier[] VALUES = values(); - - public static Tier valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Tier(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Service.Tier) - } - - /** - * - * - *
-   * Release channels bundle features of varying levels of stability. Newer
-   * features may be introduced initially into less stable release channels and
-   * can be automatically promoted into more stable release channels.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.Service.ReleaseChannel} - */ - public enum ReleaseChannel implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Release channel is not specified.
-     * 
- * - * RELEASE_CHANNEL_UNSPECIFIED = 0; - */ - RELEASE_CHANNEL_UNSPECIFIED(0), - /** - * - * - *
-     * The `CANARY` release channel contains the newest features, which may be
-     * unstable and subject to unresolved issues with no known workarounds.
-     * Services using the `CANARY` release channel are not subject to any SLAs.
-     * 
- * - * CANARY = 1; - */ - CANARY(1), - /** - * - * - *
-     * The `STABLE` release channel contains features that are considered stable
-     * and have been validated for production use.
-     * 
- * - * STABLE = 2; - */ - STABLE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Release channel is not specified.
-     * 
- * - * RELEASE_CHANNEL_UNSPECIFIED = 0; - */ - public static final int RELEASE_CHANNEL_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The `CANARY` release channel contains the newest features, which may be
-     * unstable and subject to unresolved issues with no known workarounds.
-     * Services using the `CANARY` release channel are not subject to any SLAs.
-     * 
- * - * CANARY = 1; - */ - public static final int CANARY_VALUE = 1; - /** - * - * - *
-     * The `STABLE` release channel contains features that are considered stable
-     * and have been validated for production use.
-     * 
- * - * STABLE = 2; - */ - public static final int STABLE_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ReleaseChannel valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ReleaseChannel forNumber(int value) { - switch (value) { - case 0: - return RELEASE_CHANNEL_UNSPECIFIED; - case 1: - return CANARY; - case 2: - return STABLE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ReleaseChannel findValueByNumber(int number) { - return ReleaseChannel.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.Service.getDescriptor().getEnumTypes().get(2); - } - - private static final ReleaseChannel[] VALUES = values(); - - public static ReleaseChannel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ReleaseChannel(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Service.ReleaseChannel) - } - - /** - * - * - *
-   * The backend database type for the metastore service.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1.Service.DatabaseType} - */ - public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The DATABASE_TYPE is not set.
-     * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - DATABASE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * MySQL is used to persist the metastore data.
-     * 
- * - * MYSQL = 1; - */ - MYSQL(1), - /** - * - * - *
-     * Spanner is used to persist the metastore data.
-     * 
- * - * SPANNER = 2; - */ - SPANNER(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The DATABASE_TYPE is not set.
-     * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * MySQL is used to persist the metastore data.
-     * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - /** - * - * - *
-     * Spanner is used to persist the metastore data.
-     * 
- * - * SPANNER = 2; - */ - public static final int SPANNER_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DatabaseType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DatabaseType forNumber(int value) { - switch (value) { - case 0: - return DATABASE_TYPE_UNSPECIFIED; - case 1: - return MYSQL; - case 2: - return SPANNER; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DatabaseType findValueByNumber(int number) { - return DatabaseType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.Service.getDescriptor().getEnumTypes().get(3); - } - - private static final DatabaseType[] VALUES = values(); - - public static DatabaseType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DatabaseType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Service.DatabaseType) - } - - private int metastoreConfigCase_ = 0; - private java.lang.Object metastoreConfig_; - - public enum MetastoreConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - HIVE_METASTORE_CONFIG(5), - METASTORECONFIG_NOT_SET(0); - private final int value; - - private MetastoreConfigCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetastoreConfigCase valueOf(int value) { - return forNumber(value); - } - - public static MetastoreConfigCase forNumber(int value) { - switch (value) { - case 5: - return HIVE_METASTORE_CONFIG; - case 0: - return METASTORECONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MetastoreConfigCase getMetastoreConfigCase() { - return MetastoreConfigCase.forNumber(metastoreConfigCase_); - } - - public static final int HIVE_METASTORE_CONFIG_FIELD_NUMBER = 5; - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - @java.lang.Override - public boolean hasHiveMetastoreConfig() { - return metastoreConfigCase_ == 5; - } - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.HiveMetastoreConfig getHiveMetastoreConfig() { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); - } - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder - getHiveMetastoreConfigOrBuilder() { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the following
-   * format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the following
-   * format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Service_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int NETWORK_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object network_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the instance can be
-   * accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - @java.lang.Override - public java.lang.String getNetwork() { - java.lang.Object ref = network_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - network_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the instance can be
-   * accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNetworkBytes() { - java.lang.Object ref = network_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - network_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PORT_FIELD_NUMBER = 9; - private int port_ = 0; - /** - * - * - *
-   * The TCP port at which the metastore service is reached. Default: 9083.
-   * 
- * - * int32 port = 9; - * - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - - public static final int STATE_FIELD_NUMBER = 10; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service.State getState() { - com.google.cloud.metastore.v1.Service.State result = - com.google.cloud.metastore.v1.Service.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1.Service.State.UNRECOGNIZED : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private volatile java.lang.Object stateMessage_ = ""; - /** - * - * - *
-   * Output only. Additional information about the current state of the metastore service, if
-   * available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - @java.lang.Override - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Additional information about the current state of the metastore service, if
-   * available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARTIFACT_GCS_URI_FIELD_NUMBER = 12; - - @SuppressWarnings("serial") - private volatile java.lang.Object artifactGcsUri_ = ""; - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-   * related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - @java.lang.Override - public java.lang.String getArtifactGcsUri() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactGcsUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-   * related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getArtifactGcsUriBytes() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - artifactGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TIER_FIELD_NUMBER = 13; - private int tier_ = 0; - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override - public int getTierValue() { - return tier_; - } - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @return The tier. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service.Tier getTier() { - com.google.cloud.metastore.v1.Service.Tier result = - com.google.cloud.metastore.v1.Service.Tier.forNumber(tier_); - return result == null ? com.google.cloud.metastore.v1.Service.Tier.UNRECOGNIZED : result; - } - - public static final int MAINTENANCE_WINDOW_FIELD_NUMBER = 15; - private com.google.cloud.metastore.v1.MaintenanceWindow maintenanceWindow_; - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - @java.lang.Override - public boolean hasMaintenanceWindow() { - return maintenanceWindow_ != null; - } - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MaintenanceWindow getMaintenanceWindow() { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder() { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - - public static final int UID_FIELD_NUMBER = 16; - - @SuppressWarnings("serial") - private volatile java.lang.Object uid_ = ""; - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER = 17; - private com.google.cloud.metastore.v1.MetadataManagementActivity metadataManagementActivity_; - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - @java.lang.Override - public boolean hasMetadataManagementActivity() { - return metadataManagementActivity_ != null; - } - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataManagementActivity getMetadataManagementActivity() { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder() { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - - public static final int RELEASE_CHANNEL_FIELD_NUMBER = 19; - private int releaseChannel_ = 0; - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - @java.lang.Override - public int getReleaseChannelValue() { - return releaseChannel_; - } - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service.ReleaseChannel getReleaseChannel() { - com.google.cloud.metastore.v1.Service.ReleaseChannel result = - com.google.cloud.metastore.v1.Service.ReleaseChannel.forNumber(releaseChannel_); - return result == null - ? com.google.cloud.metastore.v1.Service.ReleaseChannel.UNRECOGNIZED - : result; - } - - public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 20; - private com.google.cloud.metastore.v1.EncryptionConfig encryptionConfig_; - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-   * customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - @java.lang.Override - public boolean hasEncryptionConfig() { - return encryptionConfig_ != null; - } - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-   * customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.EncryptionConfig getEncryptionConfig() { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-   * customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - - public static final int NETWORK_CONFIG_FIELD_NUMBER = 21; - private com.google.cloud.metastore.v1.NetworkConfig networkConfig_; - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - @java.lang.Override - public boolean hasNetworkConfig() { - return networkConfig_ != null; - } - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - - public static final int DATABASE_TYPE_FIELD_NUMBER = 22; - private int databaseType_ = 0; - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service.DatabaseType getDatabaseType() { - com.google.cloud.metastore.v1.Service.DatabaseType result = - com.google.cloud.metastore.v1.Service.DatabaseType.forNumber(databaseType_); - return result == null - ? com.google.cloud.metastore.v1.Service.DatabaseType.UNRECOGNIZED - : result; - } - - public static final int TELEMETRY_CONFIG_FIELD_NUMBER = 23; - private com.google.cloud.metastore.v1.TelemetryConfig telemetryConfig_; - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - @java.lang.Override - public boolean hasTelemetryConfig() { - return telemetryConfig_ != null; - } - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.TelemetryConfig getTelemetryConfig() { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (metastoreConfigCase_ == 5) { - output.writeMessage(5, (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, network_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpointUri_); - } - if (port_ != 0) { - output.writeInt32(9, port_); - } - if (state_ != com.google.cloud.metastore.v1.Service.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(10, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, artifactGcsUri_); - } - if (tier_ != com.google.cloud.metastore.v1.Service.Tier.TIER_UNSPECIFIED.getNumber()) { - output.writeEnum(13, tier_); - } - if (maintenanceWindow_ != null) { - output.writeMessage(15, getMaintenanceWindow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, uid_); - } - if (metadataManagementActivity_ != null) { - output.writeMessage(17, getMetadataManagementActivity()); - } - if (releaseChannel_ - != com.google.cloud.metastore.v1.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED - .getNumber()) { - output.writeEnum(19, releaseChannel_); - } - if (encryptionConfig_ != null) { - output.writeMessage(20, getEncryptionConfig()); - } - if (networkConfig_ != null) { - output.writeMessage(21, getNetworkConfig()); - } - if (databaseType_ - != com.google.cloud.metastore.v1.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(22, databaseType_); - } - if (telemetryConfig_ != null) { - output.writeMessage(23, getTelemetryConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (metastoreConfigCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, network_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpointUri_); - } - if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, port_); - } - if (state_ != com.google.cloud.metastore.v1.Service.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, artifactGcsUri_); - } - if (tier_ != com.google.cloud.metastore.v1.Service.Tier.TIER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, tier_); - } - if (maintenanceWindow_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getMaintenanceWindow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, uid_); - } - if (metadataManagementActivity_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 17, getMetadataManagementActivity()); - } - if (releaseChannel_ - != com.google.cloud.metastore.v1.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, releaseChannel_); - } - if (encryptionConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getEncryptionConfig()); - } - if (networkConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getNetworkConfig()); - } - if (databaseType_ - != com.google.cloud.metastore.v1.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, databaseType_); - } - if (telemetryConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getTelemetryConfig()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.Service)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.Service other = (com.google.cloud.metastore.v1.Service) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getNetwork().equals(other.getNetwork())) return false; - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (getPort() != other.getPort()) return false; - if (state_ != other.state_) return false; - if (!getStateMessage().equals(other.getStateMessage())) return false; - if (!getArtifactGcsUri().equals(other.getArtifactGcsUri())) return false; - if (tier_ != other.tier_) return false; - if (hasMaintenanceWindow() != other.hasMaintenanceWindow()) return false; - if (hasMaintenanceWindow()) { - if (!getMaintenanceWindow().equals(other.getMaintenanceWindow())) return false; - } - if (!getUid().equals(other.getUid())) return false; - if (hasMetadataManagementActivity() != other.hasMetadataManagementActivity()) return false; - if (hasMetadataManagementActivity()) { - if (!getMetadataManagementActivity().equals(other.getMetadataManagementActivity())) - return false; - } - if (releaseChannel_ != other.releaseChannel_) return false; - if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; - if (hasEncryptionConfig()) { - if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; - } - if (hasNetworkConfig() != other.hasNetworkConfig()) return false; - if (hasNetworkConfig()) { - if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; - } - if (databaseType_ != other.databaseType_) return false; - if (hasTelemetryConfig() != other.hasTelemetryConfig()) return false; - if (hasTelemetryConfig()) { - if (!getTelemetryConfig().equals(other.getTelemetryConfig())) return false; - } - if (!getMetastoreConfigCase().equals(other.getMetastoreConfigCase())) return false; - switch (metastoreConfigCase_) { - case 5: - if (!getHiveMetastoreConfig().equals(other.getHiveMetastoreConfig())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getNetwork().hashCode(); - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - hash = (37 * hash) + ARTIFACT_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getArtifactGcsUri().hashCode(); - hash = (37 * hash) + TIER_FIELD_NUMBER; - hash = (53 * hash) + tier_; - if (hasMaintenanceWindow()) { - hash = (37 * hash) + MAINTENANCE_WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getMaintenanceWindow().hashCode(); - } - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - if (hasMetadataManagementActivity()) { - hash = (37 * hash) + METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER; - hash = (53 * hash) + getMetadataManagementActivity().hashCode(); - } - hash = (37 * hash) + RELEASE_CHANNEL_FIELD_NUMBER; - hash = (53 * hash) + releaseChannel_; - if (hasEncryptionConfig()) { - hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getEncryptionConfig().hashCode(); - } - if (hasNetworkConfig()) { - hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNetworkConfig().hashCode(); - } - hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseType_; - if (hasTelemetryConfig()) { - hash = (37 * hash) + TELEMETRY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getTelemetryConfig().hashCode(); - } - switch (metastoreConfigCase_) { - case 5: - hash = (37 * hash) + HIVE_METASTORE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getHiveMetastoreConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.Service parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Service parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Service parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Service parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Service parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.Service parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Service parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Service parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Service parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Service parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.Service parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.Service parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.Service prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A managed metastore service that serves metadata queries.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.Service} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Service) - com.google.cloud.metastore.v1.ServiceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Service_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.Service.class, - com.google.cloud.metastore.v1.Service.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.Service.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (hiveMetastoreConfigBuilder_ != null) { - hiveMetastoreConfigBuilder_.clear(); - } - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - network_ = ""; - endpointUri_ = ""; - port_ = 0; - state_ = 0; - stateMessage_ = ""; - artifactGcsUri_ = ""; - tier_ = 0; - maintenanceWindow_ = null; - if (maintenanceWindowBuilder_ != null) { - maintenanceWindowBuilder_.dispose(); - maintenanceWindowBuilder_ = null; - } - uid_ = ""; - metadataManagementActivity_ = null; - if (metadataManagementActivityBuilder_ != null) { - metadataManagementActivityBuilder_.dispose(); - metadataManagementActivityBuilder_ = null; - } - releaseChannel_ = 0; - encryptionConfig_ = null; - if (encryptionConfigBuilder_ != null) { - encryptionConfigBuilder_.dispose(); - encryptionConfigBuilder_ = null; - } - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - databaseType_ = 0; - telemetryConfig_ = null; - if (telemetryConfigBuilder_ != null) { - telemetryConfigBuilder_.dispose(); - telemetryConfigBuilder_ = null; - } - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_Service_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Service getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.Service.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Service build() { - com.google.cloud.metastore.v1.Service result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Service buildPartial() { - com.google.cloud.metastore.v1.Service result = - new com.google.cloud.metastore.v1.Service(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.Service result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.network_ = network_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.endpointUri_ = endpointUri_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.port_ = port_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.stateMessage_ = stateMessage_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.artifactGcsUri_ = artifactGcsUri_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.tier_ = tier_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.maintenanceWindow_ = - maintenanceWindowBuilder_ == null - ? maintenanceWindow_ - : maintenanceWindowBuilder_.build(); - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.uid_ = uid_; - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.metadataManagementActivity_ = - metadataManagementActivityBuilder_ == null - ? metadataManagementActivity_ - : metadataManagementActivityBuilder_.build(); - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.releaseChannel_ = releaseChannel_; - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.encryptionConfig_ = - encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.networkConfig_ = - networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.databaseType_ = databaseType_; - } - if (((from_bitField0_ & 0x00080000) != 0)) { - result.telemetryConfig_ = - telemetryConfigBuilder_ == null ? telemetryConfig_ : telemetryConfigBuilder_.build(); - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1.Service result) { - result.metastoreConfigCase_ = metastoreConfigCase_; - result.metastoreConfig_ = this.metastoreConfig_; - if (metastoreConfigCase_ == 5 && hiveMetastoreConfigBuilder_ != null) { - result.metastoreConfig_ = hiveMetastoreConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.Service) { - return mergeFrom((com.google.cloud.metastore.v1.Service) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.Service other) { - if (other == com.google.cloud.metastore.v1.Service.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000010; - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.getPort() != 0) { - setPort(other.getPort()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - bitField0_ |= 0x00000200; - onChanged(); - } - if (!other.getArtifactGcsUri().isEmpty()) { - artifactGcsUri_ = other.artifactGcsUri_; - bitField0_ |= 0x00000400; - onChanged(); - } - if (other.tier_ != 0) { - setTierValue(other.getTierValue()); - } - if (other.hasMaintenanceWindow()) { - mergeMaintenanceWindow(other.getMaintenanceWindow()); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - bitField0_ |= 0x00002000; - onChanged(); - } - if (other.hasMetadataManagementActivity()) { - mergeMetadataManagementActivity(other.getMetadataManagementActivity()); - } - if (other.releaseChannel_ != 0) { - setReleaseChannelValue(other.getReleaseChannelValue()); - } - if (other.hasEncryptionConfig()) { - mergeEncryptionConfig(other.getEncryptionConfig()); - } - if (other.hasNetworkConfig()) { - mergeNetworkConfig(other.getNetworkConfig()); - } - if (other.databaseType_ != 0) { - setDatabaseTypeValue(other.getDatabaseTypeValue()); - } - if (other.hasTelemetryConfig()) { - mergeTelemetryConfig(other.getTelemetryConfig()); - } - switch (other.getMetastoreConfigCase()) { - case HIVE_METASTORE_CONFIG: - { - mergeHiveMetastoreConfig(other.getHiveMetastoreConfig()); - break; - } - case METASTORECONFIG_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - input.readMessage( - getHiveMetastoreConfigFieldBuilder().getBuilder(), extensionRegistry); - metastoreConfigCase_ = 5; - break; - } // case 42 - case 58: - { - network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 58 - case 66: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 66 - case 72: - { - port_ = input.readInt32(); - bitField0_ |= 0x00000080; - break; - } // case 72 - case 80: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 80 - case 90: - { - stateMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - break; - } // case 90 - case 98: - { - artifactGcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - break; - } // case 98 - case 104: - { - tier_ = input.readEnum(); - bitField0_ |= 0x00000800; - break; - } // case 104 - case 122: - { - input.readMessage( - getMaintenanceWindowFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 122 - case 130: - { - uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - break; - } // case 130 - case 138: - { - input.readMessage( - getMetadataManagementActivityFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; - break; - } // case 138 - case 152: - { - releaseChannel_ = input.readEnum(); - bitField0_ |= 0x00008000; - break; - } // case 152 - case 162: - { - input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; - break; - } // case 162 - case 170: - { - input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; - break; - } // case 170 - case 176: - { - databaseType_ = input.readEnum(); - bitField0_ |= 0x00040000; - break; - } // case 176 - case 186: - { - input.readMessage(getTelemetryConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; - break; - } // case 186 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int metastoreConfigCase_ = 0; - private java.lang.Object metastoreConfig_; - - public MetastoreConfigCase getMetastoreConfigCase() { - return MetastoreConfigCase.forNumber(metastoreConfigCase_); - } - - public Builder clearMetastoreConfig() { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.HiveMetastoreConfig, - com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder> - hiveMetastoreConfigBuilder_; - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - @java.lang.Override - public boolean hasHiveMetastoreConfig() { - return metastoreConfigCase_ == 5; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.HiveMetastoreConfig getHiveMetastoreConfig() { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); - } else { - if (metastoreConfigCase_ == 5) { - return hiveMetastoreConfigBuilder_.getMessage(); - } - return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder setHiveMetastoreConfig(com.google.cloud.metastore.v1.HiveMetastoreConfig value) { - if (hiveMetastoreConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metastoreConfig_ = value; - onChanged(); - } else { - hiveMetastoreConfigBuilder_.setMessage(value); - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder setHiveMetastoreConfig( - com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder builderForValue) { - if (hiveMetastoreConfigBuilder_ == null) { - metastoreConfig_ = builderForValue.build(); - onChanged(); - } else { - hiveMetastoreConfigBuilder_.setMessage(builderForValue.build()); - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder mergeHiveMetastoreConfig( - com.google.cloud.metastore.v1.HiveMetastoreConfig value) { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5 - && metastoreConfig_ - != com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance()) { - metastoreConfig_ = - com.google.cloud.metastore.v1.HiveMetastoreConfig.newBuilder( - (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - metastoreConfig_ = value; - } - onChanged(); - } else { - if (metastoreConfigCase_ == 5) { - hiveMetastoreConfigBuilder_.mergeFrom(value); - } else { - hiveMetastoreConfigBuilder_.setMessage(value); - } - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder clearHiveMetastoreConfig() { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5) { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - onChanged(); - } - } else { - if (metastoreConfigCase_ == 5) { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - } - hiveMetastoreConfigBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - public com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder - getHiveMetastoreConfigBuilder() { - return getHiveMetastoreConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - @java.lang.Override - public com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder - getHiveMetastoreConfigOrBuilder() { - if ((metastoreConfigCase_ == 5) && (hiveMetastoreConfigBuilder_ != null)) { - return hiveMetastoreConfigBuilder_.getMessageOrBuilder(); - } else { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.HiveMetastoreConfig, - com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder> - getHiveMetastoreConfigFieldBuilder() { - if (hiveMetastoreConfigBuilder_ == null) { - if (!(metastoreConfigCase_ == 5)) { - metastoreConfig_ = com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); - } - hiveMetastoreConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.HiveMetastoreConfig, - com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder>( - (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_, - getParentForChildren(), - isClean()); - metastoreConfig_ = null; - } - metastoreConfigCase_ = 5; - onChanged(); - return hiveMetastoreConfigBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the following
-     * format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the following
-     * format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the following
-     * format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the following
-     * format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the following
-     * format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000010; - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; - return this; - } - - private java.lang.Object network_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the instance can be
-     * accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - public java.lang.String getNetwork() { - java.lang.Object ref = network_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - network_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the instance can be
-     * accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - public com.google.protobuf.ByteString getNetworkBytes() { - java.lang.Object ref = network_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - network_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the instance can be
-     * accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The network to set. - * @return This builder for chaining. - */ - public Builder setNetwork(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - network_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the instance can be
-     * accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearNetwork() { - network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the instance can be
-     * accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for network to set. - * @return This builder for chaining. - */ - public Builder setNetworkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - network_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private int port_; - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @param value The port to set. - * @return This builder for chaining. - */ - public Builder setPort(int value) { - - port_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @return This builder for chaining. - */ - public Builder clearPort() { - bitField0_ = (bitField0_ & ~0x00000080); - port_ = 0; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service.State getState() { - com.google.cloud.metastore.v1.Service.State result = - com.google.cloud.metastore.v1.Service.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1.Service.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1.Service.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000100); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object stateMessage_ = ""; - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore service, if
-     * available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore service, if
-     * available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore service, if
-     * available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - stateMessage_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore service, if
-     * available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - stateMessage_ = getDefaultInstance().getStateMessage(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the metastore service, if
-     * available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - stateMessage_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - private java.lang.Object artifactGcsUri_ = ""; - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-     * related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - public java.lang.String getArtifactGcsUri() { - java.lang.Object ref = artifactGcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactGcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-     * related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - public com.google.protobuf.ByteString getArtifactGcsUriBytes() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - artifactGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-     * related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The artifactGcsUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - artifactGcsUri_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-     * related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearArtifactGcsUri() { - artifactGcsUri_ = getDefaultInstance().getArtifactGcsUri(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-     * related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for artifactGcsUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - artifactGcsUri_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - private int tier_ = 0; - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override - public int getTierValue() { - return tier_; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @param value The enum numeric value on the wire for tier to set. - * @return This builder for chaining. - */ - public Builder setTierValue(int value) { - tier_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @return The tier. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service.Tier getTier() { - com.google.cloud.metastore.v1.Service.Tier result = - com.google.cloud.metastore.v1.Service.Tier.forNumber(tier_); - return result == null ? com.google.cloud.metastore.v1.Service.Tier.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @param value The tier to set. - * @return This builder for chaining. - */ - public Builder setTier(com.google.cloud.metastore.v1.Service.Tier value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - tier_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @return This builder for chaining. - */ - public Builder clearTier() { - bitField0_ = (bitField0_ & ~0x00000800); - tier_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.MaintenanceWindow maintenanceWindow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MaintenanceWindow, - com.google.cloud.metastore.v1.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder> - maintenanceWindowBuilder_; - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - public boolean hasMaintenanceWindow() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - public com.google.cloud.metastore.v1.MaintenanceWindow getMaintenanceWindow() { - if (maintenanceWindowBuilder_ == null) { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } else { - return maintenanceWindowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - public Builder setMaintenanceWindow(com.google.cloud.metastore.v1.MaintenanceWindow value) { - if (maintenanceWindowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maintenanceWindow_ = value; - } else { - maintenanceWindowBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - public Builder setMaintenanceWindow( - com.google.cloud.metastore.v1.MaintenanceWindow.Builder builderForValue) { - if (maintenanceWindowBuilder_ == null) { - maintenanceWindow_ = builderForValue.build(); - } else { - maintenanceWindowBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - public Builder mergeMaintenanceWindow(com.google.cloud.metastore.v1.MaintenanceWindow value) { - if (maintenanceWindowBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) - && maintenanceWindow_ != null - && maintenanceWindow_ - != com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance()) { - getMaintenanceWindowBuilder().mergeFrom(value); - } else { - maintenanceWindow_ = value; - } - } else { - maintenanceWindowBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - public Builder clearMaintenanceWindow() { - bitField0_ = (bitField0_ & ~0x00001000); - maintenanceWindow_ = null; - if (maintenanceWindowBuilder_ != null) { - maintenanceWindowBuilder_.dispose(); - maintenanceWindowBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - public com.google.cloud.metastore.v1.MaintenanceWindow.Builder getMaintenanceWindowBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getMaintenanceWindowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - public com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder - getMaintenanceWindowOrBuilder() { - if (maintenanceWindowBuilder_ != null) { - return maintenanceWindowBuilder_.getMessageOrBuilder(); - } else { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MaintenanceWindow, - com.google.cloud.metastore.v1.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder> - getMaintenanceWindowFieldBuilder() { - if (maintenanceWindowBuilder_ == null) { - maintenanceWindowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MaintenanceWindow, - com.google.cloud.metastore.v1.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder>( - getMaintenanceWindow(), getParentForChildren(), isClean()); - maintenanceWindow_ = null; - } - return maintenanceWindowBuilder_; - } - - private java.lang.Object uid_ = ""; - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uid_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00002000); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uid_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.MetadataManagementActivity metadataManagementActivity_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataManagementActivity, - com.google.cloud.metastore.v1.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder> - metadataManagementActivityBuilder_; - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - public boolean hasMetadataManagementActivity() { - return ((bitField0_ & 0x00004000) != 0); - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - public com.google.cloud.metastore.v1.MetadataManagementActivity - getMetadataManagementActivity() { - if (metadataManagementActivityBuilder_ == null) { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } else { - return metadataManagementActivityBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataManagementActivity( - com.google.cloud.metastore.v1.MetadataManagementActivity value) { - if (metadataManagementActivityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataManagementActivity_ = value; - } else { - metadataManagementActivityBuilder_.setMessage(value); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataManagementActivity( - com.google.cloud.metastore.v1.MetadataManagementActivity.Builder builderForValue) { - if (metadataManagementActivityBuilder_ == null) { - metadataManagementActivity_ = builderForValue.build(); - } else { - metadataManagementActivityBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeMetadataManagementActivity( - com.google.cloud.metastore.v1.MetadataManagementActivity value) { - if (metadataManagementActivityBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) - && metadataManagementActivity_ != null - && metadataManagementActivity_ - != com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance()) { - getMetadataManagementActivityBuilder().mergeFrom(value); - } else { - metadataManagementActivity_ = value; - } - } else { - metadataManagementActivityBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMetadataManagementActivity() { - bitField0_ = (bitField0_ & ~0x00004000); - metadataManagementActivity_ = null; - if (metadataManagementActivityBuilder_ != null) { - metadataManagementActivityBuilder_.dispose(); - metadataManagementActivityBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.MetadataManagementActivity.Builder - getMetadataManagementActivityBuilder() { - bitField0_ |= 0x00004000; - onChanged(); - return getMetadataManagementActivityFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder() { - if (metadataManagementActivityBuilder_ != null) { - return metadataManagementActivityBuilder_.getMessageOrBuilder(); - } else { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataManagementActivity, - com.google.cloud.metastore.v1.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder> - getMetadataManagementActivityFieldBuilder() { - if (metadataManagementActivityBuilder_ == null) { - metadataManagementActivityBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataManagementActivity, - com.google.cloud.metastore.v1.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder>( - getMetadataManagementActivity(), getParentForChildren(), isClean()); - metadataManagementActivity_ = null; - } - return metadataManagementActivityBuilder_; - } - - private int releaseChannel_ = 0; - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - @java.lang.Override - public int getReleaseChannelValue() { - return releaseChannel_; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The enum numeric value on the wire for releaseChannel to set. - * @return This builder for chaining. - */ - public Builder setReleaseChannelValue(int value) { - releaseChannel_ = value; - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service.ReleaseChannel getReleaseChannel() { - com.google.cloud.metastore.v1.Service.ReleaseChannel result = - com.google.cloud.metastore.v1.Service.ReleaseChannel.forNumber(releaseChannel_); - return result == null - ? com.google.cloud.metastore.v1.Service.ReleaseChannel.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The releaseChannel to set. - * @return This builder for chaining. - */ - public Builder setReleaseChannel(com.google.cloud.metastore.v1.Service.ReleaseChannel value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00008000; - releaseChannel_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearReleaseChannel() { - bitField0_ = (bitField0_ & ~0x00008000); - releaseChannel_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.EncryptionConfig, - com.google.cloud.metastore.v1.EncryptionConfig.Builder, - com.google.cloud.metastore.v1.EncryptionConfigOrBuilder> - encryptionConfigBuilder_; - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - public boolean hasEncryptionConfig() { - return ((bitField0_ & 0x00010000) != 0); - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - public com.google.cloud.metastore.v1.EncryptionConfig getEncryptionConfig() { - if (encryptionConfigBuilder_ == null) { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } else { - return encryptionConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setEncryptionConfig(com.google.cloud.metastore.v1.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encryptionConfig_ = value; - } else { - encryptionConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setEncryptionConfig( - com.google.cloud.metastore.v1.EncryptionConfig.Builder builderForValue) { - if (encryptionConfigBuilder_ == null) { - encryptionConfig_ = builderForValue.build(); - } else { - encryptionConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeEncryptionConfig(com.google.cloud.metastore.v1.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) - && encryptionConfig_ != null - && encryptionConfig_ - != com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance()) { - getEncryptionConfigBuilder().mergeFrom(value); - } else { - encryptionConfig_ = value; - } - } else { - encryptionConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearEncryptionConfig() { - bitField0_ = (bitField0_ & ~0x00010000); - encryptionConfig_ = null; - if (encryptionConfigBuilder_ != null) { - encryptionConfigBuilder_.dispose(); - encryptionConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1.EncryptionConfig.Builder getEncryptionConfigBuilder() { - bitField0_ |= 0x00010000; - onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { - if (encryptionConfigBuilder_ != null) { - return encryptionConfigBuilder_.getMessageOrBuilder(); - } else { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-     * customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.EncryptionConfig, - com.google.cloud.metastore.v1.EncryptionConfig.Builder, - com.google.cloud.metastore.v1.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { - if (encryptionConfigBuilder_ == null) { - encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.EncryptionConfig, - com.google.cloud.metastore.v1.EncryptionConfig.Builder, - com.google.cloud.metastore.v1.EncryptionConfigOrBuilder>( - getEncryptionConfig(), getParentForChildren(), isClean()); - encryptionConfig_ = null; - } - return encryptionConfigBuilder_; - } - - private com.google.cloud.metastore.v1.NetworkConfig networkConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.NetworkConfig, - com.google.cloud.metastore.v1.NetworkConfig.Builder, - com.google.cloud.metastore.v1.NetworkConfigOrBuilder> - networkConfigBuilder_; - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - public boolean hasNetworkConfig() { - return ((bitField0_ & 0x00020000) != 0); - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - public com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig() { - if (networkConfigBuilder_ == null) { - return networkConfig_ == null - ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() - : networkConfig_; - } else { - return networkConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - public Builder setNetworkConfig(com.google.cloud.metastore.v1.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - networkConfig_ = value; - } else { - networkConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - public Builder setNetworkConfig( - com.google.cloud.metastore.v1.NetworkConfig.Builder builderForValue) { - if (networkConfigBuilder_ == null) { - networkConfig_ = builderForValue.build(); - } else { - networkConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - public Builder mergeNetworkConfig(com.google.cloud.metastore.v1.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) - && networkConfig_ != null - && networkConfig_ != com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance()) { - getNetworkConfigBuilder().mergeFrom(value); - } else { - networkConfig_ = value; - } - } else { - networkConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - public Builder clearNetworkConfig() { - bitField0_ = (bitField0_ & ~0x00020000); - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - public com.google.cloud.metastore.v1.NetworkConfig.Builder getNetworkConfigBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return getNetworkConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - public com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - if (networkConfigBuilder_ != null) { - return networkConfigBuilder_.getMessageOrBuilder(); - } else { - return networkConfig_ == null - ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.NetworkConfig, - com.google.cloud.metastore.v1.NetworkConfig.Builder, - com.google.cloud.metastore.v1.NetworkConfigOrBuilder> - getNetworkConfigFieldBuilder() { - if (networkConfigBuilder_ == null) { - networkConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.NetworkConfig, - com.google.cloud.metastore.v1.NetworkConfig.Builder, - com.google.cloud.metastore.v1.NetworkConfigOrBuilder>( - getNetworkConfig(), getParentForChildren(), isClean()); - networkConfig_ = null; - } - return networkConfigBuilder_; - } - - private int databaseType_ = 0; - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The enum numeric value on the wire for databaseType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseTypeValue(int value) { - databaseType_ = value; - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service.DatabaseType getDatabaseType() { - com.google.cloud.metastore.v1.Service.DatabaseType result = - com.google.cloud.metastore.v1.Service.DatabaseType.forNumber(databaseType_); - return result == null - ? com.google.cloud.metastore.v1.Service.DatabaseType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The databaseType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseType(com.google.cloud.metastore.v1.Service.DatabaseType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00040000; - databaseType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseType() { - bitField0_ = (bitField0_ & ~0x00040000); - databaseType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1.TelemetryConfig telemetryConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.TelemetryConfig, - com.google.cloud.metastore.v1.TelemetryConfig.Builder, - com.google.cloud.metastore.v1.TelemetryConfigOrBuilder> - telemetryConfigBuilder_; - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - public boolean hasTelemetryConfig() { - return ((bitField0_ & 0x00080000) != 0); - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - public com.google.cloud.metastore.v1.TelemetryConfig getTelemetryConfig() { - if (telemetryConfigBuilder_ == null) { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } else { - return telemetryConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - public Builder setTelemetryConfig(com.google.cloud.metastore.v1.TelemetryConfig value) { - if (telemetryConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - telemetryConfig_ = value; - } else { - telemetryConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - public Builder setTelemetryConfig( - com.google.cloud.metastore.v1.TelemetryConfig.Builder builderForValue) { - if (telemetryConfigBuilder_ == null) { - telemetryConfig_ = builderForValue.build(); - } else { - telemetryConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - public Builder mergeTelemetryConfig(com.google.cloud.metastore.v1.TelemetryConfig value) { - if (telemetryConfigBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) - && telemetryConfig_ != null - && telemetryConfig_ - != com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance()) { - getTelemetryConfigBuilder().mergeFrom(value); - } else { - telemetryConfig_ = value; - } - } else { - telemetryConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - public Builder clearTelemetryConfig() { - bitField0_ = (bitField0_ & ~0x00080000); - telemetryConfig_ = null; - if (telemetryConfigBuilder_ != null) { - telemetryConfigBuilder_.dispose(); - telemetryConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - public com.google.cloud.metastore.v1.TelemetryConfig.Builder getTelemetryConfigBuilder() { - bitField0_ |= 0x00080000; - onChanged(); - return getTelemetryConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - public com.google.cloud.metastore.v1.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { - if (telemetryConfigBuilder_ != null) { - return telemetryConfigBuilder_.getMessageOrBuilder(); - } else { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.TelemetryConfig, - com.google.cloud.metastore.v1.TelemetryConfig.Builder, - com.google.cloud.metastore.v1.TelemetryConfigOrBuilder> - getTelemetryConfigFieldBuilder() { - if (telemetryConfigBuilder_ == null) { - telemetryConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.TelemetryConfig, - com.google.cloud.metastore.v1.TelemetryConfig.Builder, - com.google.cloud.metastore.v1.TelemetryConfigOrBuilder>( - getTelemetryConfig(), getParentForChildren(), isClean()); - telemetryConfig_ = null; - } - return telemetryConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Service) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Service) - private static final com.google.cloud.metastore.v1.Service DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Service(); - } - - public static com.google.cloud.metastore.v1.Service getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Service parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.Service getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceOrBuilder.java deleted file mode 100644 index 0a029d0164b9..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceOrBuilder.java +++ /dev/null @@ -1,698 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface ServiceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Service) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - boolean hasHiveMetastoreConfig(); - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - com.google.cloud.metastore.v1.HiveMetastoreConfig getHiveMetastoreConfig(); - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; - */ - com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder(); - - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the following
-   * format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the following
-   * format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - int getLabelsCount(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the instance can be
-   * accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - java.lang.String getNetwork(); - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the instance can be
-   * accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - com.google.protobuf.ByteString getNetworkBytes(); - - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - /** - * - * - *
-   * The TCP port at which the metastore service is reached. Default: 9083.
-   * 
- * - * int32 port = 9; - * - * @return The port. - */ - int getPort(); - - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1.Service.State getState(); - - /** - * - * - *
-   * Output only. Additional information about the current state of the metastore service, if
-   * available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - * - * - *
-   * Output only. Additional information about the current state of the metastore service, if
-   * available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString getStateMessageBytes(); - - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-   * related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - java.lang.String getArtifactGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
-   * related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - com.google.protobuf.ByteString getArtifactGcsUriBytes(); - - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - int getTierValue(); - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1.Service.Tier tier = 13; - * - * @return The tier. - */ - com.google.cloud.metastore.v1.Service.Tier getTier(); - - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - boolean hasMaintenanceWindow(); - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - com.google.cloud.metastore.v1.MaintenanceWindow getMaintenanceWindow(); - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; - */ - com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder(); - - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - java.lang.String getUid(); - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - com.google.protobuf.ByteString getUidBytes(); - - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - boolean hasMetadataManagementActivity(); - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - com.google.cloud.metastore.v1.MetadataManagementActivity getMetadataManagementActivity(); - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder(); - - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - int getReleaseChannelValue(); - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - com.google.cloud.metastore.v1.Service.ReleaseChannel getReleaseChannel(); - - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-   * customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - boolean hasEncryptionConfig(); - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-   * customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - com.google.cloud.metastore.v1.EncryptionConfig getEncryptionConfig(); - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to encrypt
-   * customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); - - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - boolean hasNetworkConfig(); - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig(); - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1.NetworkConfig network_config = 21; - */ - com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); - - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - int getDatabaseTypeValue(); - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - com.google.cloud.metastore.v1.Service.DatabaseType getDatabaseType(); - - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - boolean hasTelemetryConfig(); - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - com.google.cloud.metastore.v1.TelemetryConfig getTelemetryConfig(); - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; - */ - com.google.cloud.metastore.v1.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder(); - - public com.google.cloud.metastore.v1.Service.MetastoreConfigCase getMetastoreConfigCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfig.java deleted file mode 100644 index b34971034a1a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfig.java +++ /dev/null @@ -1,751 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Telemetry Configuration for the Dataproc Metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.TelemetryConfig} - */ -public final class TelemetryConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.TelemetryConfig) - TelemetryConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use TelemetryConfig.newBuilder() to construct. - private TelemetryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TelemetryConfig() { - logFormat_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TelemetryConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_TelemetryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_TelemetryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.TelemetryConfig.class, - com.google.cloud.metastore.v1.TelemetryConfig.Builder.class); - } - - /** Protobuf enum {@code google.cloud.metastore.v1.TelemetryConfig.LogFormat} */ - public enum LogFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The LOG_FORMAT is not set.
-     * 
- * - * LOG_FORMAT_UNSPECIFIED = 0; - */ - LOG_FORMAT_UNSPECIFIED(0), - /** - * - * - *
-     * Logging output uses the legacy `textPayload` format.
-     * 
- * - * LEGACY = 1; - */ - LEGACY(1), - /** - * - * - *
-     * Logging output uses the `jsonPayload` format.
-     * 
- * - * JSON = 2; - */ - JSON(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The LOG_FORMAT is not set.
-     * 
- * - * LOG_FORMAT_UNSPECIFIED = 0; - */ - public static final int LOG_FORMAT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Logging output uses the legacy `textPayload` format.
-     * 
- * - * LEGACY = 1; - */ - public static final int LEGACY_VALUE = 1; - /** - * - * - *
-     * Logging output uses the `jsonPayload` format.
-     * 
- * - * JSON = 2; - */ - public static final int JSON_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LogFormat valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static LogFormat forNumber(int value) { - switch (value) { - case 0: - return LOG_FORMAT_UNSPECIFIED; - case 1: - return LEGACY; - case 2: - return JSON; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LogFormat findValueByNumber(int number) { - return LogFormat.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1.TelemetryConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final LogFormat[] VALUES = values(); - - public static LogFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private LogFormat(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.TelemetryConfig.LogFormat) - } - - public static final int LOG_FORMAT_FIELD_NUMBER = 1; - private int logFormat_ = 0; - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - @java.lang.Override - public int getLogFormatValue() { - return logFormat_; - } - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.TelemetryConfig.LogFormat getLogFormat() { - com.google.cloud.metastore.v1.TelemetryConfig.LogFormat result = - com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.forNumber(logFormat_); - return result == null - ? com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (logFormat_ - != com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, logFormat_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (logFormat_ - != com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, logFormat_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.TelemetryConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.TelemetryConfig other = - (com.google.cloud.metastore.v1.TelemetryConfig) obj; - - if (logFormat_ != other.logFormat_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOG_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + logFormat_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.TelemetryConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Telemetry Configuration for the Dataproc Metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.TelemetryConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.TelemetryConfig) - com.google.cloud.metastore.v1.TelemetryConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_TelemetryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_TelemetryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.TelemetryConfig.class, - com.google.cloud.metastore.v1.TelemetryConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.TelemetryConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - logFormat_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_TelemetryConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.TelemetryConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.TelemetryConfig build() { - com.google.cloud.metastore.v1.TelemetryConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.TelemetryConfig buildPartial() { - com.google.cloud.metastore.v1.TelemetryConfig result = - new com.google.cloud.metastore.v1.TelemetryConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.TelemetryConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.logFormat_ = logFormat_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.TelemetryConfig) { - return mergeFrom((com.google.cloud.metastore.v1.TelemetryConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.TelemetryConfig other) { - if (other == com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance()) return this; - if (other.logFormat_ != 0) { - setLogFormatValue(other.getLogFormatValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - logFormat_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int logFormat_ = 0; - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - @java.lang.Override - public int getLogFormatValue() { - return logFormat_; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @param value The enum numeric value on the wire for logFormat to set. - * @return This builder for chaining. - */ - public Builder setLogFormatValue(int value) { - logFormat_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.TelemetryConfig.LogFormat getLogFormat() { - com.google.cloud.metastore.v1.TelemetryConfig.LogFormat result = - com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.forNumber(logFormat_); - return result == null - ? com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @param value The logFormat to set. - * @return This builder for chaining. - */ - public Builder setLogFormat(com.google.cloud.metastore.v1.TelemetryConfig.LogFormat value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - logFormat_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @return This builder for chaining. - */ - public Builder clearLogFormat() { - bitField0_ = (bitField0_ & ~0x00000001); - logFormat_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.TelemetryConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.TelemetryConfig) - private static final com.google.cloud.metastore.v1.TelemetryConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.TelemetryConfig(); - } - - public static com.google.cloud.metastore.v1.TelemetryConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TelemetryConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.TelemetryConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfigOrBuilder.java deleted file mode 100644 index 063e657a024e..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfigOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface TelemetryConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.TelemetryConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - int getLogFormatValue(); - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - com.google.cloud.metastore.v1.TelemetryConfig.LogFormat getLogFormat(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequest.java deleted file mode 100644 index e19f94c16e12..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequest.java +++ /dev/null @@ -1,1325 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for UpdateFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.UpdateFederationRequest} - */ -public final class UpdateFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.UpdateFederationRequest) - UpdateFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateFederationRequest.newBuilder() to construct. - private UpdateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateFederationRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_UpdateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.UpdateFederationRequest.class, - com.google.cloud.metastore.v1.UpdateFederationRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int FEDERATION_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1.Federation federation_; - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - @java.lang.Override - public boolean hasFederation() { - return federation_ != null; - } - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Federation getFederation() { - return federation_ == null - ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() - : federation_; - } - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder() { - return federation_ == null - ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() - : federation_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (federation_ != null) { - output.writeMessage(2, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (federation_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.UpdateFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.UpdateFederationRequest other = - (com.google.cloud.metastore.v1.UpdateFederationRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasFederation() != other.hasFederation()) return false; - if (hasFederation()) { - if (!getFederation().equals(other.getFederation())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasFederation()) { - hash = (37 * hash) + FEDERATION_FIELD_NUMBER; - hash = (53 * hash) + getFederation().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.UpdateFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for UpdateFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.UpdateFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.UpdateFederationRequest) - com.google.cloud.metastore.v1.UpdateFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_UpdateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.UpdateFederationRequest.class, - com.google.cloud.metastore.v1.UpdateFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.UpdateFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.UpdateFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateFederationRequest build() { - com.google.cloud.metastore.v1.UpdateFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateFederationRequest buildPartial() { - com.google.cloud.metastore.v1.UpdateFederationRequest result = - new com.google.cloud.metastore.v1.UpdateFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.UpdateFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.federation_ = federationBuilder_ == null ? federation_ : federationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.UpdateFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1.UpdateFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.UpdateFederationRequest other) { - if (other == com.google.cloud.metastore.v1.UpdateFederationRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasFederation()) { - mergeFederation(other.getFederation()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getFederationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1.Federation federation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder> - federationBuilder_; - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - public boolean hasFederation() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - public com.google.cloud.metastore.v1.Federation getFederation() { - if (federationBuilder_ == null) { - return federation_ == null - ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() - : federation_; - } else { - return federationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation(com.google.cloud.metastore.v1.Federation value) { - if (federationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - federation_ = value; - } else { - federationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation(com.google.cloud.metastore.v1.Federation.Builder builderForValue) { - if (federationBuilder_ == null) { - federation_ = builderForValue.build(); - } else { - federationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeFederation(com.google.cloud.metastore.v1.Federation value) { - if (federationBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && federation_ != null - && federation_ != com.google.cloud.metastore.v1.Federation.getDefaultInstance()) { - getFederationBuilder().mergeFrom(value); - } else { - federation_ = value; - } - } else { - federationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearFederation() { - bitField0_ = (bitField0_ & ~0x00000002); - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.Federation.Builder getFederationBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getFederationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder() { - if (federationBuilder_ != null) { - return federationBuilder_.getMessageOrBuilder(); - } else { - return federation_ == null - ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() - : federation_; - } - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder> - getFederationFieldBuilder() { - if (federationBuilder_ == null) { - federationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Federation, - com.google.cloud.metastore.v1.Federation.Builder, - com.google.cloud.metastore.v1.FederationOrBuilder>( - getFederation(), getParentForChildren(), isClean()); - federation_ = null; - } - return federationBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.UpdateFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.UpdateFederationRequest) - private static final com.google.cloud.metastore.v1.UpdateFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.UpdateFederationRequest(); - } - - public static com.google.cloud.metastore.v1.UpdateFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequestOrBuilder.java deleted file mode 100644 index 10abce01c24b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore_federation.proto - -package com.google.cloud.metastore.v1; - -public interface UpdateFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.UpdateFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - boolean hasFederation(); - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - com.google.cloud.metastore.v1.Federation getFederation(); - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequest.java deleted file mode 100644 index 97181b24d942..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequest.java +++ /dev/null @@ -1,1328 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.UpdateMetadataImportRequest} - */ -public final class UpdateMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.UpdateMetadataImportRequest) - UpdateMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateMetadataImportRequest.newBuilder() to construct. - private UpdateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateMetadataImportRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.UpdateMetadataImportRequest.class, - com.google.cloud.metastore.v1.UpdateMetadataImportRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int METADATA_IMPORT_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1.MetadataImport metadataImport_; - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - @java.lang.Override - public boolean hasMetadataImport() { - return metadataImport_ != null; - } - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImport getMetadataImport() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() - : metadataImport_; - } - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() - : metadataImport_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (metadataImport_ != null) { - output.writeMessage(2, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (metadataImport_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.UpdateMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.UpdateMetadataImportRequest other = - (com.google.cloud.metastore.v1.UpdateMetadataImportRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasMetadataImport() != other.hasMetadataImport()) return false; - if (hasMetadataImport()) { - if (!getMetadataImport().equals(other.getMetadataImport())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasMetadataImport()) { - hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImport().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1.UpdateMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.UpdateMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.UpdateMetadataImportRequest) - com.google.cloud.metastore.v1.UpdateMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.UpdateMetadataImportRequest.class, - com.google.cloud.metastore.v1.UpdateMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.UpdateMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateMetadataImportRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.UpdateMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateMetadataImportRequest build() { - com.google.cloud.metastore.v1.UpdateMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1.UpdateMetadataImportRequest result = - new com.google.cloud.metastore.v1.UpdateMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.UpdateMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadataImport_ = - metadataImportBuilder_ == null ? metadataImport_ : metadataImportBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.UpdateMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1.UpdateMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.UpdateMetadataImportRequest other) { - if (other == com.google.cloud.metastore.v1.UpdateMetadataImportRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasMetadataImport()) { - mergeMetadataImport(other.getMetadataImport()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getMetadataImportFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1.MetadataImport metadataImport_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder> - metadataImportBuilder_; - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - public boolean hasMetadataImport() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - public com.google.cloud.metastore.v1.MetadataImport getMetadataImport() { - if (metadataImportBuilder_ == null) { - return metadataImport_ == null - ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() - : metadataImport_; - } else { - return metadataImportBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport(com.google.cloud.metastore.v1.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataImport_ = value; - } else { - metadataImportBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport( - com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { - if (metadataImportBuilder_ == null) { - metadataImport_ = builderForValue.build(); - } else { - metadataImportBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeMetadataImport(com.google.cloud.metastore.v1.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && metadataImport_ != null - && metadataImport_ - != com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()) { - getMetadataImportBuilder().mergeFrom(value); - } else { - metadataImport_ = value; - } - } else { - metadataImportBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearMetadataImport() { - bitField0_ = (bitField0_ & ~0x00000002); - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.MetadataImport.Builder getMetadataImportBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataImportFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder() { - if (metadataImportBuilder_ != null) { - return metadataImportBuilder_.getMessageOrBuilder(); - } else { - return metadataImport_ == null - ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() - : metadataImport_; - } - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder> - getMetadataImportFieldBuilder() { - if (metadataImportBuilder_ == null) { - metadataImportBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.MetadataImport, - com.google.cloud.metastore.v1.MetadataImport.Builder, - com.google.cloud.metastore.v1.MetadataImportOrBuilder>( - getMetadataImport(), getParentForChildren(), isClean()); - metadataImport_ = null; - } - return metadataImportBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.UpdateMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.UpdateMetadataImportRequest) - private static final com.google.cloud.metastore.v1.UpdateMetadataImportRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.UpdateMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateMetadataImportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequestOrBuilder.java deleted file mode 100644 index 9b9583ab2c1b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface UpdateMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.UpdateMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - boolean hasMetadataImport(); - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - com.google.cloud.metastore.v1.MetadataImport getMetadataImport(); - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequest.java deleted file mode 100644 index bb7dc94c9ae6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequest.java +++ /dev/null @@ -1,1317 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -/** - * - * - *
- * Request message for [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1.UpdateServiceRequest} - */ -public final class UpdateServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.UpdateServiceRequest) - UpdateServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateServiceRequest.newBuilder() to construct. - private UpdateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateServiceRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.UpdateServiceRequest.class, - com.google.cloud.metastore.v1.UpdateServiceRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int SERVICE_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1.Service service_; - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - @java.lang.Override - public boolean hasService() { - return service_ != null; - } - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - @java.lang.Override - public com.google.cloud.metastore.v1.Service getService() { - return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; - } - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder() { - return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (service_ != null) { - output.writeMessage(2, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (service_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1.UpdateServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1.UpdateServiceRequest other = - (com.google.cloud.metastore.v1.UpdateServiceRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasService() != other.hasService()) return false; - if (hasService()) { - if (!getService().equals(other.getService())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasService()) { - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1.UpdateServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1.UpdateServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.UpdateServiceRequest) - com.google.cloud.metastore.v1.UpdateServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1.UpdateServiceRequest.class, - com.google.cloud.metastore.v1.UpdateServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1.UpdateServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1.MetastoreProto - .internal_static_google_cloud_metastore_v1_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1.UpdateServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateServiceRequest build() { - com.google.cloud.metastore.v1.UpdateServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateServiceRequest buildPartial() { - com.google.cloud.metastore.v1.UpdateServiceRequest result = - new com.google.cloud.metastore.v1.UpdateServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1.UpdateServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.service_ = serviceBuilder_ == null ? service_ : serviceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1.UpdateServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1.UpdateServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1.UpdateServiceRequest other) { - if (other == com.google.cloud.metastore.v1.UpdateServiceRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasService()) { - mergeService(other.getService()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getServiceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1.Service service_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder> - serviceBuilder_; - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - public boolean hasService() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - public com.google.cloud.metastore.v1.Service getService() { - if (serviceBuilder_ == null) { - return service_ == null - ? com.google.cloud.metastore.v1.Service.getDefaultInstance() - : service_; - } else { - return serviceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1.Service value) { - if (serviceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - } else { - serviceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1.Service.Builder builderForValue) { - if (serviceBuilder_ == null) { - service_ = builderForValue.build(); - } else { - serviceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeService(com.google.cloud.metastore.v1.Service value) { - if (serviceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && service_ != null - && service_ != com.google.cloud.metastore.v1.Service.getDefaultInstance()) { - getServiceBuilder().mergeFrom(value); - } else { - service_ = value; - } - } else { - serviceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearService() { - bitField0_ = (bitField0_ & ~0x00000002); - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.Service.Builder getServiceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getServiceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder() { - if (serviceBuilder_ != null) { - return serviceBuilder_.getMessageOrBuilder(); - } else { - return service_ == null - ? com.google.cloud.metastore.v1.Service.getDefaultInstance() - : service_; - } - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder> - getServiceFieldBuilder() { - if (serviceBuilder_ == null) { - serviceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1.Service, - com.google.cloud.metastore.v1.Service.Builder, - com.google.cloud.metastore.v1.ServiceOrBuilder>( - getService(), getParentForChildren(), isClean()); - service_ = null; - } - return serviceBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-     * request if it has completed. The server will ignore subsequent requests
-     * that provide a duplicate request ID for at least 60 minutes after the first
-     * request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.UpdateServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.UpdateServiceRequest) - private static final com.google.cloud.metastore.v1.UpdateServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.UpdateServiceRequest(); - } - - public static com.google.cloud.metastore.v1.UpdateServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1.UpdateServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequestOrBuilder.java deleted file mode 100644 index b2ddc32c7826..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequestOrBuilder.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1/metastore.proto - -package com.google.cloud.metastore.v1; - -public interface UpdateServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.UpdateServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - boolean hasService(); - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - com.google.cloud.metastore.v1.Service getService(); - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to ignore the
-   * request if it has completed. The server will ignore subsequent requests
-   * that provide a duplicate request ID for at least 60 minutes after the first
-   * request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore.proto b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore.proto deleted file mode 100644 index 8b4020c98da3..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore.proto +++ /dev/null @@ -1,1316 +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 -// -// http://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. - -syntax = "proto3"; - -package google.cloud.metastore.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/type/dayofweek.proto"; - -option go_package = "cloud.google.com/go/metastore/apiv1/metastorepb;metastorepb"; -option java_multiple_files = true; -option java_outer_classname = "MetastoreProto"; -option java_package = "com.google.cloud.metastore.v1"; -option php_namespace = "Google\\Cloud\\Metastore\\V1"; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Network" - pattern: "projects/{project}/global/networks/{network}" -}; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Subnetwork" - pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" -}; - -// 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: -// -// * The service works with a collection of Google Cloud projects, named: -// `/projects/*` -// * Each project has a collection of available locations, named: `/locations/*` -// (a location must refer to a Google Cloud `region`) -// * Each location has a collection of services, named: `/services/*` -// * Dataproc Metastore services are resources with names of the form: -// -// `/projects/{project_number}/locations/{location_id}/services/{service_id}`. -service DataprocMetastore { - option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Lists services in a project and location. - rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/services" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a single service. - rpc GetService(GetServiceRequest) returns (Service) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/services/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a metastore service in a project and location. - rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/services" - body: "service" - }; - option (google.api.method_signature) = "parent,service,service_id"; - option (google.longrunning.operation_info) = { - response_type: "Service" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Updates the parameters of a single service. - rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{service.name=projects/*/locations/*/services/*}" - body: "service" - }; - option (google.api.method_signature) = "service,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Service" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Deletes a single service. - rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/services/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Lists imports in a service. - rpc ListMetadataImports(ListMetadataImportsRequest) returns (ListMetadataImportsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single import. - rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/services/*/metadataImports/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new MetadataImport in a given project and location. - rpc CreateMetadataImport(CreateMetadataImportRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports" - body: "metadata_import" - }; - option (google.api.method_signature) = "parent,metadata_import,metadata_import_id"; - option (google.longrunning.operation_info) = { - response_type: "MetadataImport" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Updates a single import. - // Only the description field of MetadataImport is supported to be updated. - rpc UpdateMetadataImport(UpdateMetadataImportRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}" - body: "metadata_import" - }; - option (google.api.method_signature) = "metadata_import,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "MetadataImport" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Exports metadata from a service. - rpc ExportMetadata(ExportMetadataRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{service=projects/*/locations/*/services/*}:exportMetadata" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "MetadataExport" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Restores a service from a backup. - rpc RestoreService(RestoreServiceRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{service=projects/*/locations/*/services/*}:restore" - body: "*" - }; - option (google.api.method_signature) = "service,backup"; - option (google.longrunning.operation_info) = { - response_type: "Restore" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Lists backups in a service. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/services/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single backup. - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/services/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new backup in a given project and location. - rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/services/*}/backups" - body: "backup" - }; - option (google.api.method_signature) = "parent,backup,backup_id"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Deletes a single backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/services/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } -} - -// A managed metastore service that serves metadata queries. -message Service { - option (google.api.resource) = { - type: "metastore.googleapis.com/Service" - pattern: "projects/{project}/locations/{location}/services/{service}" - }; - - // The current state of the metastore service. - enum State { - // The state of the metastore service is unknown. - STATE_UNSPECIFIED = 0; - - // The metastore service is in the process of being created. - CREATING = 1; - - // The metastore service is running and ready to serve queries. - ACTIVE = 2; - - // The metastore service is entering suspension. Its query-serving - // availability may cease unexpectedly. - SUSPENDING = 3; - - // The metastore service is suspended and unable to serve queries. - SUSPENDED = 4; - - // The metastore service is being updated. It remains usable but cannot - // accept additional update requests or be deleted at this time. - UPDATING = 5; - - // The metastore service is undergoing deletion. It cannot be used. - DELETING = 6; - - // The metastore service has encountered an error and cannot be used. The - // metastore service should be deleted. - ERROR = 7; - } - - // Available service tiers. - enum Tier { - // The tier is not set. - TIER_UNSPECIFIED = 0; - - // The developer tier provides limited scalability and no fault tolerance. - // Good for low-cost proof-of-concept. - DEVELOPER = 1; - - // The enterprise tier provides multi-zone high availability, and sufficient - // scalability for enterprise-level Dataproc Metastore workloads. - ENTERPRISE = 3; - } - - // Release channels bundle features of varying levels of stability. Newer - // features may be introduced initially into less stable release channels and - // can be automatically promoted into more stable release channels. - enum ReleaseChannel { - // Release channel is not specified. - RELEASE_CHANNEL_UNSPECIFIED = 0; - - // The `CANARY` release channel contains the newest features, which may be - // unstable and subject to unresolved issues with no known workarounds. - // Services using the `CANARY` release channel are not subject to any SLAs. - CANARY = 1; - - // The `STABLE` release channel contains features that are considered stable - // and have been validated for production use. - STABLE = 2; - } - - // The backend database type for the metastore service. - enum DatabaseType { - // The DATABASE_TYPE is not set. - DATABASE_TYPE_UNSPECIFIED = 0; - - // MySQL is used to persist the metastore data. - MYSQL = 1; - - // Spanner is used to persist the metastore data. - SPANNER = 2; - } - - // Configuration properties specific to the underlying metastore service - // technology (the software that serves metastore queries). - oneof metastore_config { - // Configuration information specific to running Hive metastore - // software as the metastore service. - HiveMetastoreConfig hive_metastore_config = 5; - } - - // Immutable. The relative resource name of the metastore service, in the following - // format: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the metastore service was created. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metastore service was last updated. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // User-defined labels for the metastore service. - map labels = 4; - - // Immutable. The relative resource name of the VPC network on which the instance can be - // accessed. It is specified in the following form: - // - // `projects/{project_number}/global/networks/{network_id}`. - string network = 7 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "compute.googleapis.com/Network" - } - ]; - - // Output only. The URI of the endpoint used to access the metastore service. - string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The TCP port at which the metastore service is reached. Default: 9083. - int32 port = 9; - - // Output only. The current state of the metastore service. - State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the current state of the metastore service, if - // available. - string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts - // related to the metastore service are stored. - string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The tier of the service. - Tier tier = 13; - - // The one hour maintenance window of the metastore service. This specifies - // when the service can be restarted for maintenance purposes in UTC time. - // Maintenance window is not needed for services with the SPANNER - // database type. - MaintenanceWindow maintenance_window = 15; - - // Output only. The globally unique resource identifier of the metastore service. - string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The metadata management activities of the metastore service. - MetadataManagementActivity metadata_management_activity = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Immutable. The release channel of the service. - // If unspecified, defaults to `STABLE`. - ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. Information used to configure the Dataproc Metastore service to encrypt - // customer data at rest. Cannot be updated. - EncryptionConfig encryption_config = 20 [(google.api.field_behavior) = IMMUTABLE]; - - // The configuration specifying the network settings for the - // Dataproc Metastore service. - NetworkConfig network_config = 21; - - // Immutable. The database type that the Metastore service stores its data. - DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; - - // The configuration specifying telemetry settings for the Dataproc Metastore - // service. If unspecified defaults to `JSON`. - TelemetryConfig telemetry_config = 23; -} - -// Maintenance window. This specifies when Dataproc Metastore -// may perform system maintenance operation to the service. -message MaintenanceWindow { - // The hour of day (0-23) when the window starts. - google.protobuf.Int32Value hour_of_day = 1; - - // The day of week, when the window starts. - google.type.DayOfWeek day_of_week = 2; -} - -// Specifies configuration information specific to running Hive metastore -// software as the metastore service. -message HiveMetastoreConfig { - // Immutable. The Hive metastore schema version. - string version = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // A mapping of Hive metastore configuration key-value pairs to apply to the - // Hive metastore (configured in `hive-site.xml`). The mappings - // override system defaults (some keys cannot be overridden). These - // overrides are also applied to auxiliary versions and can be further - // customized in the auxiliary version's `AuxiliaryVersionConfig`. - map config_overrides = 2; - - // Information used to configure the Hive metastore service as a service - // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService` - // method and specify this field's path - // (`hive_metastore_config.kerberos_config`) in the request's `update_mask` - // while omitting this field from the request's `service`. - KerberosConfig kerberos_config = 3; -} - -// Configuration information for a Kerberos principal. -message KerberosConfig { - // A Kerberos keytab file that can be used to authenticate a service principal - // with a Kerberos Key Distribution Center (KDC). - Secret keytab = 1; - - // A Kerberos principal that exists in the both the keytab the KDC - // to authenticate as. A typical principal is of the form - // `primary/instance@REALM`, but there is no exact format. - string principal = 2; - - // A Cloud Storage URI that specifies the path to a - // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`, - // although the file does not need to be named krb5.conf explicitly. - string krb5_config_gcs_uri = 3; -} - -// A securely stored value. -message Secret { - oneof value { - // The relative resource name of a Secret Manager secret version, in the - // following form: - // - // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`. - string cloud_secret = 2; - } -} - -// Encryption settings for the service. -message EncryptionConfig { - // The fully qualified customer provided Cloud KMS key name to use for - // customer data encryption, in the following form: - // - // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`. - string kms_key = 1; -} - -// Network configuration for the Dataproc Metastore service. -message NetworkConfig { - // Contains information of the customer's network configurations. - message Consumer { - oneof vpc_resource { - // Immutable. The subnetwork of the customer project from which an IP address is - // reserved and used as the Dataproc Metastore service's - // endpoint. It is accessible to hosts in the subnet and to all - // hosts in a subnet in the same region and same network. There must - // be at least one IP address available in the subnet's primary range. The - // subnet is specified in the following form: - // - // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}` - string subnetwork = 1 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "compute.googleapis.com/Subnetwork" - } - ]; - } - - // Output only. The URI of the endpoint used to access the metastore service. - string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Immutable. The consumer-side network configuration for the Dataproc Metastore - // instance. - repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; -} - -// Telemetry Configuration for the Dataproc Metastore service. -message TelemetryConfig { - enum LogFormat { - // The LOG_FORMAT is not set. - LOG_FORMAT_UNSPECIFIED = 0; - - // Logging output uses the legacy `textPayload` format. - LEGACY = 1; - - // Logging output uses the `jsonPayload` format. - JSON = 2; - } - - // The output format of the Dataproc Metastore service's logs. - LogFormat log_format = 1; -} - -// The metadata management activities of the metastore service. -message MetadataManagementActivity { - // Output only. The latest metadata exports of the metastore service. - repeated MetadataExport metadata_exports = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The latest restores of the metastore service. - repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A metastore resource that imports metadata. -message MetadataImport { - option (google.api.resource) = { - type: "metastore.googleapis.com/MetadataImport" - pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}" - }; - - // A specification of the location of and metadata about a database dump from - // a relational database management system. - message DatabaseDump { - - // The type of the database. - enum DatabaseType { - // The type of the source database is unknown. - DATABASE_TYPE_UNSPECIFIED = 0; - - // The type of the source database is MySQL. - MYSQL = 1; - } - - // The type of the database. - DatabaseType database_type = 1 [deprecated = true]; - - // A Cloud Storage object or folder URI that specifies the source from which - // to import metadata. It must begin with `gs://`. - string gcs_uri = 2; - - // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. - DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // The current state of the metadata import. - enum State { - // The state of the metadata import is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata import is running. - RUNNING = 1; - - // The metadata import completed successfully. - SUCCEEDED = 2; - - // The metadata import is being updated. - UPDATING = 3; - - // The metadata import failed, and attempted metadata changes were rolled - // back. - FAILED = 4; - } - - // The metadata to be imported. - oneof metadata { - // Immutable. A database dump from a pre-existing metastore's database. - DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE]; - } - - // Immutable. The relative resource name of the metadata import, of the form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // The description of the metadata import. - string description = 2; - - // Output only. The time when the metadata import was started. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metadata import was last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metadata import finished. - google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the metadata import. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a metadata export operation. -message MetadataExport { - // The current state of the metadata export. - enum State { - // The state of the metadata export is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata export is running. - RUNNING = 1; - - // The metadata export completed successfully. - SUCCEEDED = 2; - - // The metadata export failed. - FAILED = 3; - - // The metadata export is cancelled. - CANCELLED = 4; - } - - oneof destination { - // Output only. A Cloud Storage URI of a folder that metadata are exported to, in the - // form of `gs:////`, where - // `` is automatically generated. - string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. The time when the export started. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the export ended. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the export. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The type of the database dump. - DatabaseDumpSpec.Type database_dump_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a backup resource. -message Backup { - option (google.api.resource) = { - type: "metastore.googleapis.com/Backup" - pattern: "projects/{project}/locations/{location}/services/{service}/backups/{backup}" - }; - - // The current state of the backup. - enum State { - // The state of the backup is unknown. - STATE_UNSPECIFIED = 0; - - // The backup is being created. - CREATING = 1; - - // The backup is being deleted. - DELETING = 2; - - // The backup is active and ready to use. - ACTIVE = 3; - - // The backup failed. - FAILED = 4; - - // The backup is being restored. - RESTORING = 5; - } - - // Immutable. The relative resource name of the backup, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}` - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the backup was started. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the backup finished creating. - google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the backup. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The revision of the service at the time of backup. - Service service_revision = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The description of the backup. - string description = 6; - - // Output only. Services that are restoring from the backup. - repeated string restoring_services = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a metadata restore operation. -message Restore { - // The current state of the restore. - enum State { - // The state of the metadata restore is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata restore is running. - RUNNING = 1; - - // The metadata restore completed successfully. - SUCCEEDED = 2; - - // The metadata restore failed. - FAILED = 3; - - // The metadata restore is cancelled. - CANCELLED = 4; - } - - // The type of restore. If unspecified, defaults to `METADATA_ONLY`. - enum RestoreType { - // The restore type is unknown. - RESTORE_TYPE_UNSPECIFIED = 0; - - // The service's metadata and configuration are restored. - FULL = 1; - - // Only the service's metadata is restored. - METADATA_ONLY = 2; - } - - // Output only. The time when the restore started. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the restore ended. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the restore. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. 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}`. - string backup = 4 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Output only. The type of restore. - RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The restore details containing the revision of the service to be restored - // to, in format of JSON. - string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]. -message ListServicesRequest { - // Required. The relative resource name of the location of metastore services to - // list, in the following form: - // - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. The maximum number of services to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 services are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the - // page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]. -message ListServicesResponse { - // The services in the specified location. - repeated Service services = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService]. -message GetServiceRequest { - // Required. The relative resource name of the metastore service to retrieve, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; -} - -// Request message for [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService]. -message CreateServiceRequest { - // 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}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Service" - } - ]; - - // 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. - string service_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Service service = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService]. -message UpdateServiceRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The metastore service to update. The server only merges fields - // in the service if they are specified in `update_mask`. - // - // The metastore service's `name` field is used to identify the metastore - // service to be updated. - Service service = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService]. -message DeleteServiceRequest { - // Required. The relative resource name of the metastore service to delete, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports]. -message ListMetadataImportsRequest { - // Required. The relative resource name of the service whose metadata imports to - // list, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/MetadataImport" - } - ]; - - // Optional. The maximum number of imports to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 imports are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the - // page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports]. -message ListMetadataImportsResponse { - // The imports in the specified service. - repeated MetadataImport metadata_imports = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport]. -message GetMetadataImportRequest { - // Required. The relative resource name of the metadata import to retrieve, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/MetadataImport" - } - ]; -} - -// Request message for [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport]. -message CreateMetadataImportRequest { - // Required. The relative resource name of the service in which to create a metastore - // import, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/MetadataImport" - } - ]; - - // 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. - string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport]. -message UpdateMetadataImportRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The metadata import to update. The server only merges fields - // in the import if they are specified in `update_mask`. - // - // The metadata import's `name` field is used to identify the metastore - // import to be updated. - MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]. -message ListBackupsRequest { - // Required. The relative resource name of the service whose backups to - // list, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. The maximum number of backups to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 backups are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the - // page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]. -message ListBackupsResponse { - // The backups of the specified service. - repeated Backup backups = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup]. -message GetBackupRequest { - // Required. The relative resource name of the backup to retrieve, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; -} - -// Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup]. -message CreateBackupRequest { - // Required. The relative resource name of the service in which to create a backup - // of the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Backup" - } - ]; - - // 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. - string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup]. -message DeleteBackupRequest { - // Required. The relative resource name of the backup to delete, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata]. -message ExportMetadataRequest { - // Required. Destination that metadata is exported to. - oneof destination { - // A Cloud Storage URI of a folder, in the format - // `gs:///`. A sub-folder - // `` containing exported files will be created below it. - string destination_gcs_folder = 2; - } - - // Required. The relative resource name of the metastore service to run export, in the - // following form: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. - DatabaseDumpSpec.Type database_dump_type = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.Restore][]. -message RestoreServiceRequest { - // Required. The relative resource name of the metastore service to run restore, in the - // following form: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // 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}`. - string backup = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. - Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents the metadata of a long-running operation. -message OperationMetadata { - // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined resource path for the target of the operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the verb executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether the caller has requested cancellation - // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. API version used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Metadata about the service in a location. -message LocationMetadata { - // A specification of a supported version of the Hive Metastore software. - message HiveMetastoreVersion { - // The semantic version of the Hive Metastore software. - string version = 1; - - // Whether `version` will be chosen by the server if a metastore service is - // created with a `HiveMetastoreConfig` that omits the `version`. - bool is_default = 2; - } - - // The versions of Hive Metastore that can be used when creating a new - // metastore service in this location. The server guarantees that exactly one - // `HiveMetastoreVersion` in the list will set `is_default`. - repeated HiveMetastoreVersion supported_hive_metastore_versions = 1; -} - -// The specification of database dump to import from or export to. -message DatabaseDumpSpec { - // The type of the database dump. - enum Type { - // The type of the database dump is unknown. - TYPE_UNSPECIFIED = 0; - - // Database dump is a MySQL dump file. - MYSQL = 1; - - // Database dump contains Avro files. - AVRO = 2; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore_federation.proto b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore_federation.proto deleted file mode 100644 index 19fdce46ec5f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore_federation.proto +++ /dev/null @@ -1,361 +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 -// -// http://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. - -syntax = "proto3"; - -package google.cloud.metastore.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/metastore/apiv1/metastorepb;metastorepb"; -option java_multiple_files = true; -option java_outer_classname = "MetastoreFederationProto"; -option java_package = "com.google.cloud.metastore.v1"; - -// Configures and manages metastore federation services. -// Dataproc Metastore Federation Service allows federating a collection of -// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc -// Metastores. The Federation Service exposes a gRPC URL through which metadata -// from the backend metastores are served at query time. -// -// The Dataproc Metastore Federation API defines the following resource model: -// * The service works with a collection of Google Cloud projects. -// * Each project has a collection of available locations. -// * Each location has a collection of federations. -// * Dataproc Metastore Federations are resources with names of the -// form: -// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. -service DataprocMetastoreFederation { - option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Lists federations in a project and location. - rpc ListFederations(ListFederationsRequest) returns (ListFederationsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/federations" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a single federation. - rpc GetFederation(GetFederationRequest) returns (Federation) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/federations/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a metastore federation in a project and location. - rpc CreateFederation(CreateFederationRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/federations" - body: "federation" - }; - option (google.api.method_signature) = "parent,federation,federation_id"; - option (google.longrunning.operation_info) = { - response_type: "Federation" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Updates the fields of a federation. - rpc UpdateFederation(UpdateFederationRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{federation.name=projects/*/locations/*/federations/*}" - body: "federation" - }; - option (google.api.method_signature) = "federation,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Federation" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } - - // Deletes a single federation. - rpc DeleteFederation(DeleteFederationRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/federations/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1.OperationMetadata" - }; - } -} - -// Represents a federation of multiple backend metastores. -message Federation { - option (google.api.resource) = { - type: "metastore.googleapis.com/Federation" - pattern: "projects/{project}/locations/{location}/federations/{federation}" - }; - - // The current state of the federation. - enum State { - // The state of the metastore federation is unknown. - STATE_UNSPECIFIED = 0; - - // The metastore federation is in the process of being created. - CREATING = 1; - - // The metastore federation is running and ready to serve queries. - ACTIVE = 2; - - // The metastore federation is being updated. It remains usable but cannot - // accept additional update requests or be deleted at this time. - UPDATING = 3; - - // The metastore federation is undergoing deletion. It cannot be used. - DELETING = 4; - - // The metastore federation has encountered an error and cannot be used. The - // metastore federation should be deleted. - ERROR = 5; - } - - // Immutable. The relative resource name of the federation, of the - // form: - // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the metastore federation was created. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metastore federation was last updated. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // User-defined labels for the metastore federation. - map labels = 4; - - // Immutable. The Apache Hive metastore version of the federation. All backend metastore - // versions must be compatible with the federation version. - string version = 5 [(google.api.field_behavior) = IMMUTABLE]; - - // A map from `BackendMetastore` rank to `BackendMetastore`s from which the - // federation service serves metadata at query time. The map key represents - // the order in which `BackendMetastore`s should be evaluated to resolve - // database names at query time and should be greater than or equal to zero. A - // `BackendMetastore` with a lower number will be evaluated before a - // `BackendMetastore` with a higher number. - map backend_metastores = 6; - - // Output only. The federation endpoint. - string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the federation. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the current state of the metastore federation, - // if available. - string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The globally unique resource identifier of the metastore federation. - string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Represents a backend metastore for the federation. -message BackendMetastore { - // The type of the backend metastore. - enum MetastoreType { - // The metastore type is not set. - METASTORE_TYPE_UNSPECIFIED = 0; - - // The backend metastore is Dataproc Metastore. - DATAPROC_METASTORE = 3; - } - - // The relative resource name of the metastore that is being federated. - // The formats of the relative resource names for the currently supported - // metastores are listed below: - // - // * Dataplex - // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` - // * BigQuery - // * `projects/{project_id}` - // * Dataproc Metastore - // * `projects/{project_id}/locations/{location}/services/{service_id}` - string name = 1; - - // The type of the backend metastore. - MetastoreType metastore_type = 2; -} - -// Request message for ListFederations. -message ListFederationsRequest { - // Required. The relative resource name of the location of metastore federations - // to list, in the following form: - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Federation" - } - ]; - - // Optional. The maximum number of federations to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 services are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous ListFederationServices - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // ListFederationServices must match the call that provided the - // page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for ListFederations -message ListFederationsResponse { - // The services in the specified location. - repeated Federation federations = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for GetFederation. -message GetFederationRequest { - // Required. The relative resource name of the metastore federation to retrieve, - // in the following form: - // - // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Federation" - } - ]; -} - -// Request message for CreateFederation. -message CreateFederationRequest { - // Required. The relative resource name of the location in which to create a federation - // service, in the following form: - // - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Federation" - } - ]; - - // 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. - string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for UpdateFederation. -message UpdateFederationRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The metastore federation to update. The server only merges fields - // in the service if they are specified in `update_mask`. - // - // The metastore federation's `name` field is used to identify the - // metastore service to be updated. - Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for DeleteFederation. -message DeleteFederationRequest { - // Required. The relative resource name of the metastore federation to delete, - // in the following form: - // - // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Federation" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequest.java deleted file mode 100644 index eb071b8838a5..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequest.java +++ /dev/null @@ -1,1076 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest} - */ -public final class AlterMetadataResourceLocationRequest - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) - AlterMetadataResourceLocationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlterMetadataResourceLocationRequest.newBuilder() to construct. - private AlterMetadataResourceLocationRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AlterMetadataResourceLocationRequest() { - service_ = ""; - resourceName_ = ""; - locationUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AlterMetadataResourceLocationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.class, - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object resourceName_ = ""; - /** - * - * - *
-   * Required. The relative metadata resource name in the following format.
-   * `databases/{database_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-   * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceName. - */ - @java.lang.Override - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative metadata resource name in the following format.
-   * `databases/{database_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-   * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object locationUri_ = ""; - /** - * - * - *
-   * Required. The new location URI for the metadata resource.
-   * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The locationUri. - */ - @java.lang.Override - public java.lang.String getLocationUri() { - java.lang.Object ref = locationUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationUri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The new location URI for the metadata resource.
-   * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for locationUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLocationUriBytes() { - java.lang.Object ref = locationUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, locationUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, locationUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest other = - (com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getResourceName().equals(other.getResourceName())) return false; - if (!getLocationUri().equals(other.getLocationUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceName().hashCode(); - hash = (37 * hash) + LOCATION_URI_FIELD_NUMBER; - hash = (53 * hash) + getLocationUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.class, - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - resourceName_ = ""; - locationUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest build() { - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest buildPartial() { - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest result = - new com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.resourceName_ = resourceName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.locationUri_ = locationUri_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) { - return mergeFrom( - (com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest other) { - if (other - == com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest - .getDefaultInstance()) return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getResourceName().isEmpty()) { - resourceName_ = other.resourceName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getLocationUri().isEmpty()) { - locationUri_ = other.locationUri_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - resourceName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - locationUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object resourceName_ = ""; - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceName. - */ - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceName. - */ - public com.google.protobuf.ByteString getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - resourceName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearResourceName() { - resourceName_ = getDefaultInstance().getResourceName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - resourceName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object locationUri_ = ""; - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The locationUri. - */ - public java.lang.String getLocationUri() { - java.lang.Object ref = locationUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for locationUri. - */ - public com.google.protobuf.ByteString getLocationUriBytes() { - java.lang.Object ref = locationUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The locationUri to set. - * @return This builder for chaining. - */ - public Builder setLocationUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - locationUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearLocationUri() { - locationUri_ = getDefaultInstance().getLocationUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for locationUri to set. - * @return This builder for chaining. - */ - public Builder setLocationUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - locationUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) - private static final com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest(); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AlterMetadataResourceLocationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequestOrBuilder.java deleted file mode 100644 index 8fb92753b690..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequestOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface AlterMetadataResourceLocationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Required. The relative metadata resource name in the following format.
-   * `databases/{database_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-   * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceName. - */ - java.lang.String getResourceName(); - /** - * - * - *
-   * Required. The relative metadata resource name in the following format.
-   * `databases/{database_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-   * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceName. - */ - com.google.protobuf.ByteString getResourceNameBytes(); - - /** - * - * - *
-   * Required. The new location URI for the metadata resource.
-   * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The locationUri. - */ - java.lang.String getLocationUri(); - /** - * - * - *
-   * Required. The new location URI for the metadata resource.
-   * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for locationUri. - */ - com.google.protobuf.ByteString getLocationUriBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponse.java deleted file mode 100644 index 14e3da514400..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponse.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse} - */ -public final class AlterMetadataResourceLocationResponse - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) - AlterMetadataResourceLocationResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlterMetadataResourceLocationResponse.newBuilder() to construct. - private AlterMetadataResourceLocationResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AlterMetadataResourceLocationResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AlterMetadataResourceLocationResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.class, - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse other = - (com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.class, - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.Builder - .class); - } - - // Construct using - // com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse build() { - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse buildPartial() { - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse result = - new com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) { - return mergeFrom( - (com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse other) { - if (other - == com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) - private static final com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse(); - } - - public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AlterMetadataResourceLocationResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponseOrBuilder.java deleted file mode 100644 index 9c1b712c450d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponseOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface AlterMetadataResourceLocationResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfig.java deleted file mode 100644 index a2fa019d3810..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfig.java +++ /dev/null @@ -1,1322 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Configuration information for the auxiliary service versions.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} - */ -public final class AuxiliaryVersionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) - AuxiliaryVersionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuxiliaryVersionConfig.newBuilder() to construct. - private AuxiliaryVersionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AuxiliaryVersionConfig() { - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuxiliaryVersionConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.class, - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-   * The Hive metastore version of the auxiliary service. It must be less
-   * than the primary Hive metastore service's version.
-   * 
- * - * string version = 1; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * The Hive metastore version of the auxiliary service. It must be less
-   * than the primary Hive metastore service's version.
-   * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; - - private static final class ConfigOverridesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int NETWORK_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1alpha.NetworkConfig networkConfig_; - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the networkConfig field is set. - */ - @java.lang.Override - public boolean hasNetworkConfig() { - return networkConfig_ != null; - } - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The networkConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetConfigOverrides(), ConfigOverridesDefaultEntryHolder.defaultEntry, 2); - if (networkConfig_ != null) { - output.writeMessage(3, getNetworkConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - for (java.util.Map.Entry entry : - internalGetConfigOverrides().getMap().entrySet()) { - com.google.protobuf.MapEntry configOverrides__ = - ConfigOverridesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, configOverrides__); - } - if (networkConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNetworkConfig()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig other = - (com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!internalGetConfigOverrides().equals(other.internalGetConfigOverrides())) return false; - if (hasNetworkConfig() != other.hasNetworkConfig()) return false; - if (hasNetworkConfig()) { - if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetConfigOverrides().getMap().isEmpty()) { - hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; - hash = (53 * hash) + internalGetConfigOverrides().hashCode(); - } - if (hasNetworkConfig()) { - hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNetworkConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Configuration information for the auxiliary service versions.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.class, - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - internalGetMutableConfigOverrides().clear(); - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig build() { - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig buildPartial() { - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig result = - new com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.configOverrides_ = internalGetConfigOverrides(); - result.configOverrides_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.networkConfig_ = - networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) { - return mergeFrom((com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig other) { - if (other == com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.getDefaultInstance()) - return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableConfigOverrides().mergeFrom(other.internalGetConfigOverrides()); - bitField0_ |= 0x00000002; - if (other.hasNetworkConfig()) { - mergeNetworkConfig(other.getNetworkConfig()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.MapEntry configOverrides__ = - input.readMessage( - ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableConfigOverrides() - .getMutableMap() - .put(configOverrides__.getKey(), configOverrides__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - private com.google.protobuf.MapField - internalGetMutableConfigOverrides() { - if (configOverrides_ == null) { - configOverrides_ = - com.google.protobuf.MapField.newMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - if (!configOverrides_.isMutable()) { - configOverrides_ = configOverrides_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearConfigOverrides() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableConfigOverrides().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder removeConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableConfigOverrides().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableConfigOverrides() { - bitField0_ |= 0x00000002; - return internalGetMutableConfigOverrides().getMutableMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putConfigOverrides(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableConfigOverrides().getMutableMap().put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putAllConfigOverrides(java.util.Map values) { - internalGetMutableConfigOverrides().getMutableMap().putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private com.google.cloud.metastore.v1alpha.NetworkConfig networkConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig, - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder> - networkConfigBuilder_; - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the networkConfig field is set. - */ - public boolean hasNetworkConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The networkConfig. - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig() { - if (networkConfigBuilder_ == null) { - return networkConfig_ == null - ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() - : networkConfig_; - } else { - return networkConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNetworkConfig(com.google.cloud.metastore.v1alpha.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - networkConfig_ = value; - } else { - networkConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNetworkConfig( - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder builderForValue) { - if (networkConfigBuilder_ == null) { - networkConfig_ = builderForValue.build(); - } else { - networkConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeNetworkConfig(com.google.cloud.metastore.v1alpha.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && networkConfig_ != null - && networkConfig_ - != com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance()) { - getNetworkConfigBuilder().mergeFrom(value); - } else { - networkConfig_ = value; - } - } else { - networkConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearNetworkConfig() { - bitField0_ = (bitField0_ & ~0x00000004); - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig.Builder getNetworkConfigBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getNetworkConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - if (networkConfigBuilder_ != null) { - return networkConfigBuilder_.getMessageOrBuilder(); - } else { - return networkConfig_ == null - ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig, - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder> - getNetworkConfigFieldBuilder() { - if (networkConfigBuilder_ == null) { - networkConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig, - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder>( - getNetworkConfig(), getParentForChildren(), isClean()); - networkConfig_ = null; - } - return networkConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) - private static final com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig(); - } - - public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuxiliaryVersionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfigOrBuilder.java deleted file mode 100644 index 9aa5ab209fe8..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfigOrBuilder.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface AuxiliaryVersionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Hive metastore version of the auxiliary service. It must be less
-   * than the primary Hive metastore service's version.
-   * 
- * - * string version = 1; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * The Hive metastore version of the auxiliary service. It must be less
-   * than the primary Hive metastore service's version.
-   * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - int getConfigOverridesCount(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - boolean containsConfigOverrides(java.lang.String key); - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getConfigOverrides(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.util.Map getConfigOverridesMap(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - /* nullable */ - java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.lang.String getConfigOverridesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the networkConfig field is set. - */ - boolean hasNetworkConfig(); - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The networkConfig. - */ - com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig(); - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastore.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastore.java deleted file mode 100644 index 2e892ebd0d82..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastore.java +++ /dev/null @@ -1,1009 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Represents a backend metastore for the federation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.BackendMetastore} - */ -public final class BackendMetastore extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.BackendMetastore) - BackendMetastoreOrBuilder { - private static final long serialVersionUID = 0L; - // Use BackendMetastore.newBuilder() to construct. - private BackendMetastore(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BackendMetastore() { - name_ = ""; - metastoreType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BackendMetastore(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_BackendMetastore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.BackendMetastore.class, - com.google.cloud.metastore.v1alpha.BackendMetastore.Builder.class); - } - - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType} - */ - public enum MetastoreType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The metastore type is not set.
-     * 
- * - * METASTORE_TYPE_UNSPECIFIED = 0; - */ - METASTORE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * The backend metastore is BigQuery.
-     * 
- * - * BIGQUERY = 2; - */ - BIGQUERY(2), - /** - * - * - *
-     * The backend metastore is Dataproc Metastore.
-     * 
- * - * DATAPROC_METASTORE = 3; - */ - DATAPROC_METASTORE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The metastore type is not set.
-     * 
- * - * METASTORE_TYPE_UNSPECIFIED = 0; - */ - public static final int METASTORE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The backend metastore is BigQuery.
-     * 
- * - * BIGQUERY = 2; - */ - public static final int BIGQUERY_VALUE = 2; - /** - * - * - *
-     * The backend metastore is Dataproc Metastore.
-     * 
- * - * DATAPROC_METASTORE = 3; - */ - public static final int DATAPROC_METASTORE_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetastoreType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MetastoreType forNumber(int value) { - switch (value) { - case 0: - return METASTORE_TYPE_UNSPECIFIED; - case 2: - return BIGQUERY; - case 3: - return DATAPROC_METASTORE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MetastoreType findValueByNumber(int number) { - return MetastoreType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.BackendMetastore.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final MetastoreType[] VALUES = values(); - - public static MetastoreType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MetastoreType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METASTORE_TYPE_FIELD_NUMBER = 2; - private int metastoreType_ = 0; - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The enum numeric value on the wire for metastoreType. - */ - @java.lang.Override - public int getMetastoreTypeValue() { - return metastoreType_; - } - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The metastoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType getMetastoreType() { - com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType result = - com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.forNumber(metastoreType_); - return result == null - ? com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (metastoreType_ - != com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType - .METASTORE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, metastoreType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (metastoreType_ - != com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType - .METASTORE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, metastoreType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.BackendMetastore)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.BackendMetastore other = - (com.google.cloud.metastore.v1alpha.BackendMetastore) obj; - - if (!getName().equals(other.getName())) return false; - if (metastoreType_ != other.metastoreType_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + METASTORE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + metastoreType_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.BackendMetastore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents a backend metastore for the federation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.BackendMetastore} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.BackendMetastore) - com.google.cloud.metastore.v1alpha.BackendMetastoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_BackendMetastore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.BackendMetastore.class, - com.google.cloud.metastore.v1alpha.BackendMetastore.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.BackendMetastore.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - metastoreType_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackendMetastore getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.BackendMetastore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackendMetastore build() { - com.google.cloud.metastore.v1alpha.BackendMetastore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackendMetastore buildPartial() { - com.google.cloud.metastore.v1alpha.BackendMetastore result = - new com.google.cloud.metastore.v1alpha.BackendMetastore(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.BackendMetastore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metastoreType_ = metastoreType_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.BackendMetastore) { - return mergeFrom((com.google.cloud.metastore.v1alpha.BackendMetastore) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.BackendMetastore other) { - if (other == com.google.cloud.metastore.v1alpha.BackendMetastore.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.metastoreType_ != 0) { - setMetastoreTypeValue(other.getMetastoreTypeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - metastoreType_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int metastoreType_ = 0; - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @return The enum numeric value on the wire for metastoreType. - */ - @java.lang.Override - public int getMetastoreTypeValue() { - return metastoreType_; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @param value The enum numeric value on the wire for metastoreType to set. - * @return This builder for chaining. - */ - public Builder setMetastoreTypeValue(int value) { - metastoreType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @return The metastoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType getMetastoreType() { - com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType result = - com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.forNumber( - metastoreType_); - return result == null - ? com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @param value The metastoreType to set. - * @return This builder for chaining. - */ - public Builder setMetastoreType( - com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - metastoreType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @return This builder for chaining. - */ - public Builder clearMetastoreType() { - bitField0_ = (bitField0_ & ~0x00000002); - metastoreType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.BackendMetastore) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.BackendMetastore) - private static final com.google.cloud.metastore.v1alpha.BackendMetastore DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.BackendMetastore(); - } - - public static com.google.cloud.metastore.v1alpha.BackendMetastore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BackendMetastore parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackendMetastore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastoreOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastoreOrBuilder.java deleted file mode 100644 index a7914b9b0f74..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastoreOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public interface BackendMetastoreOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.BackendMetastore) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The enum numeric value on the wire for metastoreType. - */ - int getMetastoreTypeValue(); - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The metastoreType. - */ - com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType getMetastoreType(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Backup.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Backup.java deleted file mode 100644 index 908f3c8ece10..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Backup.java +++ /dev/null @@ -1,2331 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * The details of a backup resource.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Backup} - */ -public final class Backup extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Backup) - BackupOrBuilder { - private static final long serialVersionUID = 0L; - // Use Backup.newBuilder() to construct. - private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Backup() { - name_ = ""; - state_ = 0; - description_ = ""; - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Backup(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Backup_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Backup.class, - com.google.cloud.metastore.v1alpha.Backup.Builder.class); - } - - /** - * - * - *
-   * The current state of the backup.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.Backup.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the backup is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The backup is being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The backup is being deleted.
-     * 
- * - * DELETING = 2; - */ - DELETING(2), - /** - * - * - *
-     * The backup is active and ready to use.
-     * 
- * - * ACTIVE = 3; - */ - ACTIVE(3), - /** - * - * - *
-     * The backup failed.
-     * 
- * - * FAILED = 4; - */ - FAILED(4), - /** - * - * - *
-     * The backup is being restored.
-     * 
- * - * RESTORING = 5; - */ - RESTORING(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the backup is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The backup is being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The backup is being deleted.
-     * 
- * - * DELETING = 2; - */ - public static final int DELETING_VALUE = 2; - /** - * - * - *
-     * The backup is active and ready to use.
-     * 
- * - * ACTIVE = 3; - */ - public static final int ACTIVE_VALUE = 3; - /** - * - * - *
-     * The backup failed.
-     * 
- * - * FAILED = 4; - */ - public static final int FAILED_VALUE = 4; - /** - * - * - *
-     * The backup is being restored.
-     * 
- * - * RESTORING = 5; - */ - public static final int RESTORING_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return DELETING; - case 3: - return ACTIVE; - case 4: - return FAILED; - case 5: - return RESTORING; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.Backup.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Backup.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 4; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Backup.State getState() { - com.google.cloud.metastore.v1alpha.Backup.State result = - com.google.cloud.metastore.v1alpha.Backup.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1alpha.Backup.State.UNRECOGNIZED : result; - } - - public static final int SERVICE_REVISION_FIELD_NUMBER = 5; - private com.google.cloud.metastore.v1alpha.Service serviceRevision_; - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - @java.lang.Override - public boolean hasServiceRevision() { - return serviceRevision_ != null; - } - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service getServiceRevision() { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : serviceRevision_; - } - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceRevisionOrBuilder() { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : serviceRevision_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESTORING_SERVICES_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList restoringServices_; - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - public com.google.protobuf.ProtocolStringList getRestoringServicesList() { - return restoringServices_; - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - public int getRestoringServicesCount() { - return restoringServices_.size(); - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - public java.lang.String getRestoringServices(int index) { - return restoringServices_.get(index); - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - public com.google.protobuf.ByteString getRestoringServicesBytes(int index) { - return restoringServices_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(3, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1alpha.Backup.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, state_); - } - if (serviceRevision_ != null) { - output.writeMessage(5, getServiceRevision()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - for (int i = 0; i < restoringServices_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, restoringServices_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1alpha.Backup.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); - } - if (serviceRevision_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getServiceRevision()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - { - int dataSize = 0; - for (int i = 0; i < restoringServices_.size(); i++) { - dataSize += computeStringSizeNoTag(restoringServices_.getRaw(i)); - } - size += dataSize; - size += 1 * getRestoringServicesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.Backup)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.Backup other = - (com.google.cloud.metastore.v1alpha.Backup) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (hasServiceRevision() != other.hasServiceRevision()) return false; - if (hasServiceRevision()) { - if (!getServiceRevision().equals(other.getServiceRevision())) return false; - } - if (!getDescription().equals(other.getDescription())) return false; - if (!getRestoringServicesList().equals(other.getRestoringServicesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasServiceRevision()) { - hash = (37 * hash) + SERVICE_REVISION_FIELD_NUMBER; - hash = (53 * hash) + getServiceRevision().hashCode(); - } - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getRestoringServicesCount() > 0) { - hash = (37 * hash) + RESTORING_SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getRestoringServicesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Backup parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Backup prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a backup resource.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Backup} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Backup) - com.google.cloud.metastore.v1alpha.BackupOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Backup_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Backup.class, - com.google.cloud.metastore.v1alpha.Backup.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.Backup.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - serviceRevision_ = null; - if (serviceRevisionBuilder_ != null) { - serviceRevisionBuilder_.dispose(); - serviceRevisionBuilder_ = null; - } - description_ = ""; - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Backup_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Backup getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Backup build() { - com.google.cloud.metastore.v1alpha.Backup result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Backup buildPartial() { - com.google.cloud.metastore.v1alpha.Backup result = - new com.google.cloud.metastore.v1alpha.Backup(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.Backup result) { - if (((bitField0_ & 0x00000040) != 0)) { - restoringServices_ = restoringServices_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.restoringServices_ = restoringServices_; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.Backup result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.serviceRevision_ = - serviceRevisionBuilder_ == null ? serviceRevision_ : serviceRevisionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.description_ = description_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.Backup) { - return mergeFrom((com.google.cloud.metastore.v1alpha.Backup) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Backup other) { - if (other == com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasServiceRevision()) { - mergeServiceRevision(other.getServiceRevision()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.restoringServices_.isEmpty()) { - if (restoringServices_.isEmpty()) { - restoringServices_ = other.restoringServices_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureRestoringServicesIsMutable(); - restoringServices_.addAll(other.restoringServices_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: - { - input.readMessage(getServiceRevisionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureRestoringServicesIsMutable(); - restoringServices_.add(s); - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000004); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Backup.State getState() { - com.google.cloud.metastore.v1alpha.Backup.State result = - com.google.cloud.metastore.v1alpha.Backup.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1alpha.Backup.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1alpha.Backup.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000008); - state_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.Service serviceRevision_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder> - serviceRevisionBuilder_; - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - public boolean hasServiceRevision() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - public com.google.cloud.metastore.v1alpha.Service getServiceRevision() { - if (serviceRevisionBuilder_ == null) { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : serviceRevision_; - } else { - return serviceRevisionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setServiceRevision(com.google.cloud.metastore.v1alpha.Service value) { - if (serviceRevisionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceRevision_ = value; - } else { - serviceRevisionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setServiceRevision( - com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { - if (serviceRevisionBuilder_ == null) { - serviceRevision_ = builderForValue.build(); - } else { - serviceRevisionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeServiceRevision(com.google.cloud.metastore.v1alpha.Service value) { - if (serviceRevisionBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && serviceRevision_ != null - && serviceRevision_ - != com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()) { - getServiceRevisionBuilder().mergeFrom(value); - } else { - serviceRevision_ = value; - } - } else { - serviceRevisionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearServiceRevision() { - bitField0_ = (bitField0_ & ~0x00000010); - serviceRevision_ = null; - if (serviceRevisionBuilder_ != null) { - serviceRevisionBuilder_.dispose(); - serviceRevisionBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.Service.Builder getServiceRevisionBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getServiceRevisionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceRevisionOrBuilder() { - if (serviceRevisionBuilder_ != null) { - return serviceRevisionBuilder_.getMessageOrBuilder(); - } else { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : serviceRevision_; - } - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder> - getServiceRevisionFieldBuilder() { - if (serviceRevisionBuilder_ == null) { - serviceRevisionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder>( - getServiceRevision(), getParentForChildren(), isClean()); - serviceRevision_ = null; - } - return serviceRevisionBuilder_; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList restoringServices_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureRestoringServicesIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - restoringServices_ = new com.google.protobuf.LazyStringArrayList(restoringServices_); - bitField0_ |= 0x00000040; - } - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - public com.google.protobuf.ProtocolStringList getRestoringServicesList() { - return restoringServices_.getUnmodifiableView(); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - public int getRestoringServicesCount() { - return restoringServices_.size(); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - public java.lang.String getRestoringServices(int index) { - return restoringServices_.get(index); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - public com.google.protobuf.ByteString getRestoringServicesBytes(int index) { - return restoringServices_.getByteString(index); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index to set the value at. - * @param value The restoringServices to set. - * @return This builder for chaining. - */ - public Builder setRestoringServices(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoringServicesIsMutable(); - restoringServices_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The restoringServices to add. - * @return This builder for chaining. - */ - public Builder addRestoringServices(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoringServicesIsMutable(); - restoringServices_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param values The restoringServices to add. - * @return This builder for chaining. - */ - public Builder addAllRestoringServices(java.lang.Iterable values) { - ensureRestoringServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restoringServices_); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearRestoringServices() { - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes of the restoringServices to add. - * @return This builder for chaining. - */ - public Builder addRestoringServicesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRestoringServicesIsMutable(); - restoringServices_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Backup) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Backup) - private static final com.google.cloud.metastore.v1alpha.Backup DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Backup(); - } - - public static com.google.cloud.metastore.v1alpha.Backup getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Backup parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Backup getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupOrBuilder.java deleted file mode 100644 index 73b686458af6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupOrBuilder.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface BackupOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Backup) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1alpha.Backup.State getState(); - - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - boolean hasServiceRevision(); - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - com.google.cloud.metastore.v1alpha.Service getServiceRevision(); - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceRevisionOrBuilder(); - - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - java.util.List getRestoringServicesList(); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - int getRestoringServicesCount(); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - java.lang.String getRestoringServices(int index); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - com.google.protobuf.ByteString getRestoringServicesBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequest.java deleted file mode 100644 index 0bcfde0cf2e2..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequest.java +++ /dev/null @@ -1,1415 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.CreateBackupRequest} - */ -public final class CreateBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.CreateBackupRequest) - CreateBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateBackupRequest.newBuilder() to construct. - private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateBackupRequest() { - parent_ = ""; - backupId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.CreateBackupRequest.class, - com.google.cloud.metastore.v1alpha.CreateBackupRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * backup of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * backup of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - @java.lang.Override - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backupId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backupId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1alpha.Backup 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - @java.lang.Override - public boolean hasBackup() { - return backup_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Backup getBackup() { - return backup_ == null - ? com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupOrBuilder() { - return backup_ == null - ? com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance() - : backup_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); - } - if (backup_ != null) { - output.writeMessage(3, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); - } - if (backup_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.CreateBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.CreateBackupRequest other = - (com.google.cloud.metastore.v1alpha.CreateBackupRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getBackupId().equals(other.getBackupId())) return false; - if (hasBackup() != other.hasBackup()) return false; - if (hasBackup()) { - if (!getBackup().equals(other.getBackup())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; - hash = (53 * hash) + getBackupId().hashCode(); - if (hasBackup()) { - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.CreateBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.CreateBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.CreateBackupRequest) - com.google.cloud.metastore.v1alpha.CreateBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.CreateBackupRequest.class, - com.google.cloud.metastore.v1alpha.CreateBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.CreateBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - backupId_ = ""; - backup_ = null; - if (backupBuilder_ != null) { - backupBuilder_.dispose(); - backupBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.CreateBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateBackupRequest build() { - com.google.cloud.metastore.v1alpha.CreateBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateBackupRequest buildPartial() { - com.google.cloud.metastore.v1alpha.CreateBackupRequest result = - new com.google.cloud.metastore.v1alpha.CreateBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.CreateBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.backupId_ = backupId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.backup_ = backupBuilder_ == null ? backup_ : backupBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.CreateBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.CreateBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.CreateBackupRequest other) { - if (other == com.google.cloud.metastore.v1alpha.CreateBackupRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBackupId().isEmpty()) { - backupId_ = other.backupId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasBackup()) { - mergeBackup(other.getBackup()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - backupId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backupId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - public com.google.protobuf.ByteString getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backupId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backupId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearBackupId() { - backupId_ = getDefaultInstance().getBackupId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backupId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Backup, - com.google.cloud.metastore.v1alpha.Backup.Builder, - com.google.cloud.metastore.v1alpha.BackupOrBuilder> - backupBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - public boolean hasBackup() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - public com.google.cloud.metastore.v1alpha.Backup getBackup() { - if (backupBuilder_ == null) { - return backup_ == null - ? com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance() - : backup_; - } else { - return backupBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBackup(com.google.cloud.metastore.v1alpha.Backup value) { - if (backupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - } else { - backupBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBackup(com.google.cloud.metastore.v1alpha.Backup.Builder builderForValue) { - if (backupBuilder_ == null) { - backup_ = builderForValue.build(); - } else { - backupBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeBackup(com.google.cloud.metastore.v1alpha.Backup value) { - if (backupBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && backup_ != null - && backup_ != com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance()) { - getBackupBuilder().mergeFrom(value); - } else { - backup_ = value; - } - } else { - backupBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearBackup() { - bitField0_ = (bitField0_ & ~0x00000004); - backup_ = null; - if (backupBuilder_ != null) { - backupBuilder_.dispose(); - backupBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.Backup.Builder getBackupBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBackupFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupOrBuilder() { - if (backupBuilder_ != null) { - return backupBuilder_.getMessageOrBuilder(); - } else { - return backup_ == null - ? com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Backup, - com.google.cloud.metastore.v1alpha.Backup.Builder, - com.google.cloud.metastore.v1alpha.BackupOrBuilder> - getBackupFieldBuilder() { - if (backupBuilder_ == null) { - backupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Backup, - com.google.cloud.metastore.v1alpha.Backup.Builder, - com.google.cloud.metastore.v1alpha.BackupOrBuilder>( - getBackup(), getParentForChildren(), isClean()); - backup_ = null; - } - return backupBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.CreateBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.CreateBackupRequest) - private static final com.google.cloud.metastore.v1alpha.CreateBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.CreateBackupRequest(); - } - - public static com.google.cloud.metastore.v1alpha.CreateBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequestOrBuilder.java deleted file mode 100644 index 50f911c3c14c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequestOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface CreateBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.CreateBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * backup of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * backup of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - java.lang.String getBackupId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - com.google.protobuf.ByteString getBackupIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - boolean hasBackup(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - com.google.cloud.metastore.v1alpha.Backup getBackup(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequest.java deleted file mode 100644 index 7e665b6cacbf..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequest.java +++ /dev/null @@ -1,1426 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for CreateFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.CreateFederationRequest} - */ -public final class CreateFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.CreateFederationRequest) - CreateFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateFederationRequest.newBuilder() to construct. - private CreateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateFederationRequest() { - parent_ = ""; - federationId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.CreateFederationRequest.class, - com.google.cloud.metastore.v1alpha.CreateFederationRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a
-   * federation service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a
-   * federation service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEDERATION_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - @java.lang.Override - public java.lang.String getFederationId() { - java.lang.Object ref = federationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - federationId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFederationIdBytes() { - java.lang.Object ref = federationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - federationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEDERATION_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1alpha.Federation 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - @java.lang.Override - public boolean hasFederation() { - return federation_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation getFederation() { - return federation_ == null - ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder() { - return federation_ == null - ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() - : federation_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, federationId_); - } - if (federation_ != null) { - output.writeMessage(3, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, federationId_); - } - if (federation_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.CreateFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.CreateFederationRequest other = - (com.google.cloud.metastore.v1alpha.CreateFederationRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getFederationId().equals(other.getFederationId())) return false; - if (hasFederation() != other.hasFederation()) return false; - if (hasFederation()) { - if (!getFederation().equals(other.getFederation())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FEDERATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getFederationId().hashCode(); - if (hasFederation()) { - hash = (37 * hash) + FEDERATION_FIELD_NUMBER; - hash = (53 * hash) + getFederation().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.CreateFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for CreateFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.CreateFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.CreateFederationRequest) - com.google.cloud.metastore.v1alpha.CreateFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.CreateFederationRequest.class, - com.google.cloud.metastore.v1alpha.CreateFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.CreateFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - federationId_ = ""; - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.CreateFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateFederationRequest build() { - com.google.cloud.metastore.v1alpha.CreateFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateFederationRequest buildPartial() { - com.google.cloud.metastore.v1alpha.CreateFederationRequest result = - new com.google.cloud.metastore.v1alpha.CreateFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.CreateFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.federationId_ = federationId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.federation_ = federationBuilder_ == null ? federation_ : federationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.CreateFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.CreateFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.CreateFederationRequest other) { - if (other == com.google.cloud.metastore.v1alpha.CreateFederationRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFederationId().isEmpty()) { - federationId_ = other.federationId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasFederation()) { - mergeFederation(other.getFederation()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - federationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getFederationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - public java.lang.String getFederationId() { - java.lang.Object ref = federationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - federationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - public com.google.protobuf.ByteString getFederationIdBytes() { - java.lang.Object ref = federationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - federationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The federationId to set. - * @return This builder for chaining. - */ - public Builder setFederationId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - federationId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearFederationId() { - federationId_ = getDefaultInstance().getFederationId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for federationId to set. - * @return This builder for chaining. - */ - public Builder setFederationIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - federationId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.Federation federation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder> - federationBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - public boolean hasFederation() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - public com.google.cloud.metastore.v1alpha.Federation getFederation() { - if (federationBuilder_ == null) { - return federation_ == null - ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() - : federation_; - } else { - return federationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation(com.google.cloud.metastore.v1alpha.Federation value) { - if (federationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - federation_ = value; - } else { - federationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation( - com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { - if (federationBuilder_ == null) { - federation_ = builderForValue.build(); - } else { - federationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeFederation(com.google.cloud.metastore.v1alpha.Federation value) { - if (federationBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && federation_ != null - && federation_ != com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()) { - getFederationBuilder().mergeFrom(value); - } else { - federation_ = value; - } - } else { - federationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearFederation() { - bitField0_ = (bitField0_ & ~0x00000004); - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.Federation.Builder getFederationBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getFederationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder() { - if (federationBuilder_ != null) { - return federationBuilder_.getMessageOrBuilder(); - } else { - return federation_ == null - ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder> - getFederationFieldBuilder() { - if (federationBuilder_ == null) { - federationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder>( - getFederation(), getParentForChildren(), isClean()); - federation_ = null; - } - return federationBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.CreateFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.CreateFederationRequest) - private static final com.google.cloud.metastore.v1alpha.CreateFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.CreateFederationRequest(); - } - - public static com.google.cloud.metastore.v1alpha.CreateFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequestOrBuilder.java deleted file mode 100644 index b95a88bfebf7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequestOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public interface CreateFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.CreateFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a
-   * federation service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a
-   * federation service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - java.lang.String getFederationId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - com.google.protobuf.ByteString getFederationIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - boolean hasFederation(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - com.google.cloud.metastore.v1alpha.Federation getFederation(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequest.java deleted file mode 100644 index 6fac9c1538a8..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequest.java +++ /dev/null @@ -1,1436 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.CreateMetadataImportRequest} - */ -public final class CreateMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) - CreateMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateMetadataImportRequest.newBuilder() to construct. - private CreateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateMetadataImportRequest() { - parent_ = ""; - metadataImportId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.class, - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * metastore import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * metastore import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_IMPORT_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - @java.lang.Override - public java.lang.String getMetadataImportId() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metadataImportId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMetadataImportIdBytes() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metadataImportId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_IMPORT_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1alpha.MetadataImport 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - @java.lang.Override - public boolean hasMetadataImport() { - return metadataImport_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() - : metadataImport_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metadataImportId_); - } - if (metadataImport_ != null) { - output.writeMessage(3, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metadataImportId_); - } - if (metadataImport_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest other = - (com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getMetadataImportId().equals(other.getMetadataImportId())) return false; - if (hasMetadataImport() != other.hasMetadataImport()) return false; - if (hasMetadataImport()) { - if (!getMetadataImport().equals(other.getMetadataImport())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + METADATA_IMPORT_ID_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImportId().hashCode(); - if (hasMetadataImport()) { - hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImport().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.CreateMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.class, - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - metadataImportId_ = ""; - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest build() { - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest result = - new com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadataImportId_ = metadataImportId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadataImport_ = - metadataImportBuilder_ == null ? metadataImport_ : metadataImportBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest other) { - if (other - == com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getMetadataImportId().isEmpty()) { - metadataImportId_ = other.metadataImportId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasMetadataImport()) { - mergeMetadataImport(other.getMetadataImport()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - metadataImportId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getMetadataImportFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - public java.lang.String getMetadataImportId() { - java.lang.Object ref = metadataImportId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metadataImportId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - public com.google.protobuf.ByteString getMetadataImportIdBytes() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metadataImportId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The metadataImportId to set. - * @return This builder for chaining. - */ - public Builder setMetadataImportId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - metadataImportId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMetadataImportId() { - metadataImportId_ = getDefaultInstance().getMetadataImportId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for metadataImportId to set. - * @return This builder for chaining. - */ - public Builder setMetadataImportIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - metadataImportId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.MetadataImport metadataImport_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> - metadataImportBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - public boolean hasMetadataImport() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport() { - if (metadataImportBuilder_ == null) { - return metadataImport_ == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() - : metadataImport_; - } else { - return metadataImportBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport(com.google.cloud.metastore.v1alpha.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataImport_ = value; - } else { - metadataImportBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport( - com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { - if (metadataImportBuilder_ == null) { - metadataImport_ = builderForValue.build(); - } else { - metadataImportBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeMetadataImport(com.google.cloud.metastore.v1alpha.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && metadataImport_ != null - && metadataImport_ - != com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()) { - getMetadataImportBuilder().mergeFrom(value); - } else { - metadataImport_ = value; - } - } else { - metadataImportBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearMetadataImport() { - bitField0_ = (bitField0_ & ~0x00000004); - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataImport.Builder getMetadataImportBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataImportFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder() { - if (metadataImportBuilder_ != null) { - return metadataImportBuilder_.getMessageOrBuilder(); - } else { - return metadataImport_ == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> - getMetadataImportFieldBuilder() { - if (metadataImportBuilder_ == null) { - metadataImportBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder>( - getMetadataImport(), getParentForChildren(), isClean()); - metadataImport_ = null; - } - return metadataImportBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) - private static final com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequestOrBuilder.java deleted file mode 100644 index b6ad2eaa0572..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface CreateMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * metastore import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * metastore import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - java.lang.String getMetadataImportId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - com.google.protobuf.ByteString getMetadataImportIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - boolean hasMetadataImport(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequest.java deleted file mode 100644 index fddb90ed8842..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequest.java +++ /dev/null @@ -1,1427 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.CreateService][google.cloud.metastore.v1alpha.DataprocMetastore.CreateService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.CreateServiceRequest} - */ -public final class CreateServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.CreateServiceRequest) - CreateServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateServiceRequest.newBuilder() to construct. - private CreateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateServiceRequest() { - parent_ = ""; - serviceId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.CreateServiceRequest.class, - com.google.cloud.metastore.v1alpha.CreateServiceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - @java.lang.Override - public java.lang.String getServiceId() { - java.lang.Object ref = serviceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceIdBytes() { - java.lang.Object ref = serviceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1alpha.Service 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - @java.lang.Override - public boolean hasService() { - return service_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service getService() { - return service_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder() { - return service_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : service_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceId_); - } - if (service_ != null) { - output.writeMessage(3, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceId_); - } - if (service_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.CreateServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.CreateServiceRequest other = - (com.google.cloud.metastore.v1alpha.CreateServiceRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getServiceId().equals(other.getServiceId())) return false; - if (hasService() != other.hasService()) return false; - if (hasService()) { - if (!getService().equals(other.getService())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - if (hasService()) { - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.CreateServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.CreateService][google.cloud.metastore.v1alpha.DataprocMetastore.CreateService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.CreateServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.CreateServiceRequest) - com.google.cloud.metastore.v1alpha.CreateServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.CreateServiceRequest.class, - com.google.cloud.metastore.v1alpha.CreateServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.CreateServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - serviceId_ = ""; - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.CreateServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateServiceRequest build() { - com.google.cloud.metastore.v1alpha.CreateServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateServiceRequest buildPartial() { - com.google.cloud.metastore.v1alpha.CreateServiceRequest result = - new com.google.cloud.metastore.v1alpha.CreateServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.CreateServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.serviceId_ = serviceId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.service_ = serviceBuilder_ == null ? service_ : serviceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.CreateServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.CreateServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.CreateServiceRequest other) { - if (other == com.google.cloud.metastore.v1alpha.CreateServiceRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getServiceId().isEmpty()) { - serviceId_ = other.serviceId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasService()) { - mergeService(other.getService()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - serviceId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getServiceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - public java.lang.String getServiceId() { - java.lang.Object ref = serviceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - public com.google.protobuf.ByteString getServiceIdBytes() { - java.lang.Object ref = serviceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The serviceId to set. - * @return This builder for chaining. - */ - public Builder setServiceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearServiceId() { - serviceId_ = getDefaultInstance().getServiceId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for serviceId to set. - * @return This builder for chaining. - */ - public Builder setServiceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.Service service_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder> - serviceBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - public boolean hasService() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - public com.google.cloud.metastore.v1alpha.Service getService() { - if (serviceBuilder_ == null) { - return service_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : service_; - } else { - return serviceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1alpha.Service value) { - if (serviceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - } else { - serviceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { - if (serviceBuilder_ == null) { - service_ = builderForValue.build(); - } else { - serviceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeService(com.google.cloud.metastore.v1alpha.Service value) { - if (serviceBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && service_ != null - && service_ != com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()) { - getServiceBuilder().mergeFrom(value); - } else { - service_ = value; - } - } else { - serviceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearService() { - bitField0_ = (bitField0_ & ~0x00000004); - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.Service.Builder getServiceBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getServiceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder() { - if (serviceBuilder_ != null) { - return serviceBuilder_.getMessageOrBuilder(); - } else { - return service_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder> - getServiceFieldBuilder() { - if (serviceBuilder_ == null) { - serviceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder>( - getService(), getParentForChildren(), isClean()); - service_ = null; - } - return serviceBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.CreateServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.CreateServiceRequest) - private static final com.google.cloud.metastore.v1alpha.CreateServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.CreateServiceRequest(); - } - - public static com.google.cloud.metastore.v1alpha.CreateServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.CreateServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequestOrBuilder.java deleted file mode 100644 index 33e6e2dfbf41..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequestOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface CreateServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.CreateServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - java.lang.String getServiceId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - com.google.protobuf.ByteString getServiceIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - boolean hasService(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - com.google.cloud.metastore.v1alpha.Service getService(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfig.java deleted file mode 100644 index 634706a35fa6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfig.java +++ /dev/null @@ -1,545 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Specifies how metastore metadata should be integrated with the Data Catalog
- * service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DataCatalogConfig} - */ -public final class DataCatalogConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DataCatalogConfig) - DataCatalogConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataCatalogConfig.newBuilder() to construct. - private DataCatalogConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataCatalogConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataCatalogConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DataCatalogConfig.class, - com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder.class); - } - - public static final int ENABLED_FIELD_NUMBER = 2; - private boolean enabled_ = false; - /** - * - * - *
-   * Defines whether the metastore metadata should be synced to Data Catalog.
-   * The default value is to disable syncing metastore metadata to Data Catalog.
-   * 
- * - * bool enabled = 2; - * - * @return The enabled. - */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (enabled_ != false) { - output.writeBool(2, enabled_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enabled_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.DataCatalogConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.DataCatalogConfig other = - (com.google.cloud.metastore.v1alpha.DataCatalogConfig) obj; - - if (getEnabled() != other.getEnabled()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DataCatalogConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies how metastore metadata should be integrated with the Data Catalog
-   * service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DataCatalogConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DataCatalogConfig) - com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DataCatalogConfig.class, - com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.DataCatalogConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enabled_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataCatalogConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataCatalogConfig build() { - com.google.cloud.metastore.v1alpha.DataCatalogConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataCatalogConfig buildPartial() { - com.google.cloud.metastore.v1alpha.DataCatalogConfig result = - new com.google.cloud.metastore.v1alpha.DataCatalogConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.DataCatalogConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enabled_ = enabled_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.DataCatalogConfig) { - return mergeFrom((com.google.cloud.metastore.v1alpha.DataCatalogConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DataCatalogConfig other) { - if (other == com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance()) - return this; - if (other.getEnabled() != false) { - setEnabled(other.getEnabled()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: - { - enabled_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private boolean enabled_; - /** - * - * - *
-     * Defines whether the metastore metadata should be synced to Data Catalog.
-     * The default value is to disable syncing metastore metadata to Data Catalog.
-     * 
- * - * bool enabled = 2; - * - * @return The enabled. - */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; - } - /** - * - * - *
-     * Defines whether the metastore metadata should be synced to Data Catalog.
-     * The default value is to disable syncing metastore metadata to Data Catalog.
-     * 
- * - * bool enabled = 2; - * - * @param value The enabled to set. - * @return This builder for chaining. - */ - public Builder setEnabled(boolean value) { - - enabled_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Defines whether the metastore metadata should be synced to Data Catalog.
-     * The default value is to disable syncing metastore metadata to Data Catalog.
-     * 
- * - * bool enabled = 2; - * - * @return This builder for chaining. - */ - public Builder clearEnabled() { - bitField0_ = (bitField0_ & ~0x00000001); - enabled_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DataCatalogConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DataCatalogConfig) - private static final com.google.cloud.metastore.v1alpha.DataCatalogConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DataCatalogConfig(); - } - - public static com.google.cloud.metastore.v1alpha.DataCatalogConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataCatalogConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataCatalogConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfigOrBuilder.java deleted file mode 100644 index 38e4d7c29322..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfigOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface DataCatalogConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DataCatalogConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Defines whether the metastore metadata should be synced to Data Catalog.
-   * The default value is to disable syncing metastore metadata to Data Catalog.
-   * 
- * - * bool enabled = 2; - * - * @return The enabled. - */ - boolean getEnabled(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpec.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpec.java deleted file mode 100644 index 508e77a4c149..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpec.java +++ /dev/null @@ -1,595 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * The specification of database dump to import from or export to.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DatabaseDumpSpec} - */ -public final class DatabaseDumpSpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DatabaseDumpSpec) - DatabaseDumpSpecOrBuilder { - private static final long serialVersionUID = 0L; - // Use DatabaseDumpSpec.newBuilder() to construct. - private DatabaseDumpSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DatabaseDumpSpec() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DatabaseDumpSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.class, - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Builder.class); - } - - /** - * - * - *
-   * The type of the database dump.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The type of the database dump is unknown.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Database dump is a MySQL dump file.
-     * 
- * - * MYSQL = 1; - */ - MYSQL(1), - /** - * - * - *
-     * Database dump contains Avro files.
-     * 
- * - * AVRO = 2; - */ - AVRO(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The type of the database dump is unknown.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Database dump is a MySQL dump file.
-     * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - /** - * - * - *
-     * Database dump contains Avro files.
-     * 
- * - * AVRO = 2; - */ - public static final int AVRO_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return MYSQL; - case 2: - return AVRO; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type) - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.DatabaseDumpSpec)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec other = - (com.google.cloud.metastore.v1alpha.DatabaseDumpSpec) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DatabaseDumpSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The specification of database dump to import from or export to.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DatabaseDumpSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DatabaseDumpSpec) - com.google.cloud.metastore.v1alpha.DatabaseDumpSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.class, - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec build() { - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec buildPartial() { - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec result = - new com.google.cloud.metastore.v1alpha.DatabaseDumpSpec(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.DatabaseDumpSpec) { - return mergeFrom((com.google.cloud.metastore.v1alpha.DatabaseDumpSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DatabaseDumpSpec other) { - if (other == com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DatabaseDumpSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DatabaseDumpSpec) - private static final com.google.cloud.metastore.v1alpha.DatabaseDumpSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DatabaseDumpSpec(); - } - - public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DatabaseDumpSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpecOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpecOrBuilder.java deleted file mode 100644 index 949f10e614d6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpecOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface DatabaseDumpSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DatabaseDumpSpec) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfig.java deleted file mode 100644 index 55c205f8f399..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfig.java +++ /dev/null @@ -1,826 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Specifies how metastore metadata should be integrated with the Dataplex
- * service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DataplexConfig} - */ -public final class DataplexConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DataplexConfig) - DataplexConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataplexConfig.newBuilder() to construct. - private DataplexConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataplexConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataplexConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataplexConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetLakeResources(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataplexConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DataplexConfig.class, - com.google.cloud.metastore.v1alpha.DataplexConfig.Builder.class); - } - - public static final int LAKE_RESOURCES_FIELD_NUMBER = 1; - - private static final class LakeResourcesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1alpha.Lake> - defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataplexConfig_LakeResourcesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.metastore.v1alpha.Lake.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField - lakeResources_; - - private com.google.protobuf.MapField - internalGetLakeResources() { - if (lakeResources_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LakeResourcesDefaultEntryHolder.defaultEntry); - } - return lakeResources_; - } - - public int getLakeResourcesCount() { - return internalGetLakeResources().getMap().size(); - } - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - @java.lang.Override - public boolean containsLakeResources(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLakeResources().getMap().containsKey(key); - } - /** Use {@link #getLakeResourcesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getLakeResources() { - return getLakeResourcesMap(); - } - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - @java.lang.Override - public java.util.Map - getLakeResourcesMap() { - return internalGetLakeResources().getMap(); - } - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1alpha.Lake defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetLakeResources().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetLakeResources().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLakeResources(), LakeResourcesDefaultEntryHolder.defaultEntry, 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetLakeResources().getMap().entrySet()) { - com.google.protobuf.MapEntry - lakeResources__ = - LakeResourcesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, lakeResources__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.DataplexConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.DataplexConfig other = - (com.google.cloud.metastore.v1alpha.DataplexConfig) obj; - - if (!internalGetLakeResources().equals(other.internalGetLakeResources())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetLakeResources().getMap().isEmpty()) { - hash = (37 * hash) + LAKE_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + internalGetLakeResources().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DataplexConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies how metastore metadata should be integrated with the Dataplex
-   * service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DataplexConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DataplexConfig) - com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataplexConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetLakeResources(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableLakeResources(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataplexConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DataplexConfig.class, - com.google.cloud.metastore.v1alpha.DataplexConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.DataplexConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableLakeResources().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DataplexConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataplexConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataplexConfig build() { - com.google.cloud.metastore.v1alpha.DataplexConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataplexConfig buildPartial() { - com.google.cloud.metastore.v1alpha.DataplexConfig result = - new com.google.cloud.metastore.v1alpha.DataplexConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.DataplexConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.lakeResources_ = internalGetLakeResources(); - result.lakeResources_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.DataplexConfig) { - return mergeFrom((com.google.cloud.metastore.v1alpha.DataplexConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DataplexConfig other) { - if (other == com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance()) - return this; - internalGetMutableLakeResources().mergeFrom(other.internalGetLakeResources()); - bitField0_ |= 0x00000001; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1alpha.Lake> - lakeResources__ = - input.readMessage( - LakeResourcesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLakeResources() - .getMutableMap() - .put(lakeResources__.getKey(), lakeResources__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField - lakeResources_; - - private com.google.protobuf.MapField - internalGetLakeResources() { - if (lakeResources_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LakeResourcesDefaultEntryHolder.defaultEntry); - } - return lakeResources_; - } - - private com.google.protobuf.MapField - internalGetMutableLakeResources() { - if (lakeResources_ == null) { - lakeResources_ = - com.google.protobuf.MapField.newMapField(LakeResourcesDefaultEntryHolder.defaultEntry); - } - if (!lakeResources_.isMutable()) { - lakeResources_ = lakeResources_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return lakeResources_; - } - - public int getLakeResourcesCount() { - return internalGetLakeResources().getMap().size(); - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - @java.lang.Override - public boolean containsLakeResources(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLakeResources().getMap().containsKey(key); - } - /** Use {@link #getLakeResourcesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getLakeResources() { - return getLakeResourcesMap(); - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - @java.lang.Override - public java.util.Map - getLakeResourcesMap() { - return internalGetLakeResources().getMap(); - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1alpha.Lake defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetLakeResources().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetLakeResources().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLakeResources() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableLakeResources().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - public Builder removeLakeResources(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLakeResources().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableLakeResources() { - bitField0_ |= 0x00000001; - return internalGetMutableLakeResources().getMutableMap(); - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - public Builder putLakeResources( - java.lang.String key, com.google.cloud.metastore.v1alpha.Lake value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLakeResources().getMutableMap().put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - public Builder putAllLakeResources( - java.util.Map values) { - internalGetMutableLakeResources().getMutableMap().putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DataplexConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DataplexConfig) - private static final com.google.cloud.metastore.v1alpha.DataplexConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DataplexConfig(); - } - - public static com.google.cloud.metastore.v1alpha.DataplexConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataplexConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataplexConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfigOrBuilder.java deleted file mode 100644 index f90e974c0106..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfigOrBuilder.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface DataplexConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DataplexConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - int getLakeResourcesCount(); - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - boolean containsLakeResources(java.lang.String key); - /** Use {@link #getLakeResourcesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLakeResources(); - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - java.util.Map getLakeResourcesMap(); - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - /* nullable */ - com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1alpha.Lake defaultValue); - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; - */ - com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrThrow(java.lang.String key); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequest.java deleted file mode 100644 index df144fe14e6f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequest.java +++ /dev/null @@ -1,905 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteBackupRequest} - */ -public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DeleteBackupRequest) - DeleteBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteBackupRequest.newBuilder() to construct. - private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteBackupRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DeleteBackupRequest.class, - com.google.cloud.metastore.v1alpha.DeleteBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.DeleteBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.DeleteBackupRequest other = - (com.google.cloud.metastore.v1alpha.DeleteBackupRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.DeleteBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DeleteBackupRequest) - com.google.cloud.metastore.v1alpha.DeleteBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DeleteBackupRequest.class, - com.google.cloud.metastore.v1alpha.DeleteBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.DeleteBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.DeleteBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteBackupRequest build() { - com.google.cloud.metastore.v1alpha.DeleteBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteBackupRequest buildPartial() { - com.google.cloud.metastore.v1alpha.DeleteBackupRequest result = - new com.google.cloud.metastore.v1alpha.DeleteBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.DeleteBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.DeleteBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.DeleteBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DeleteBackupRequest other) { - if (other == com.google.cloud.metastore.v1alpha.DeleteBackupRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DeleteBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DeleteBackupRequest) - private static final com.google.cloud.metastore.v1alpha.DeleteBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DeleteBackupRequest(); - } - - public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequestOrBuilder.java deleted file mode 100644 index 278f656a83c4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface DeleteBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DeleteBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequest.java deleted file mode 100644 index 27e0da55ba48..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequest.java +++ /dev/null @@ -1,903 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for DeleteFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteFederationRequest} - */ -public final class DeleteFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DeleteFederationRequest) - DeleteFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteFederationRequest.newBuilder() to construct. - private DeleteFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteFederationRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DeleteFederationRequest.class, - com.google.cloud.metastore.v1alpha.DeleteFederationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.DeleteFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.DeleteFederationRequest other = - (com.google.cloud.metastore.v1alpha.DeleteFederationRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.DeleteFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for DeleteFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DeleteFederationRequest) - com.google.cloud.metastore.v1alpha.DeleteFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DeleteFederationRequest.class, - com.google.cloud.metastore.v1alpha.DeleteFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.DeleteFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.DeleteFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteFederationRequest build() { - com.google.cloud.metastore.v1alpha.DeleteFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteFederationRequest buildPartial() { - com.google.cloud.metastore.v1alpha.DeleteFederationRequest result = - new com.google.cloud.metastore.v1alpha.DeleteFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.DeleteFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.DeleteFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.DeleteFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DeleteFederationRequest other) { - if (other == com.google.cloud.metastore.v1alpha.DeleteFederationRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DeleteFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DeleteFederationRequest) - private static final com.google.cloud.metastore.v1alpha.DeleteFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DeleteFederationRequest(); - } - - public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequestOrBuilder.java deleted file mode 100644 index 63655f0e2817..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public interface DeleteFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DeleteFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequest.java deleted file mode 100644 index c222a4b33001..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequest.java +++ /dev/null @@ -1,905 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.DeleteService][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteServiceRequest} - */ -public final class DeleteServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DeleteServiceRequest) - DeleteServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteServiceRequest.newBuilder() to construct. - private DeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteServiceRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DeleteServiceRequest.class, - com.google.cloud.metastore.v1alpha.DeleteServiceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.DeleteServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.DeleteServiceRequest other = - (com.google.cloud.metastore.v1alpha.DeleteServiceRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.DeleteServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.DeleteService][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DeleteServiceRequest) - com.google.cloud.metastore.v1alpha.DeleteServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.DeleteServiceRequest.class, - com.google.cloud.metastore.v1alpha.DeleteServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.DeleteServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.DeleteServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteServiceRequest build() { - com.google.cloud.metastore.v1alpha.DeleteServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteServiceRequest buildPartial() { - com.google.cloud.metastore.v1alpha.DeleteServiceRequest result = - new com.google.cloud.metastore.v1alpha.DeleteServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.DeleteServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.DeleteServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.DeleteServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DeleteServiceRequest other) { - if (other == com.google.cloud.metastore.v1alpha.DeleteServiceRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DeleteServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DeleteServiceRequest) - private static final com.google.cloud.metastore.v1alpha.DeleteServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DeleteServiceRequest(); - } - - public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DeleteServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequestOrBuilder.java deleted file mode 100644 index 585dc921be0a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface DeleteServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DeleteServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfig.java deleted file mode 100644 index 2ab5d0f94784..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfig.java +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Encryption settings for the service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.EncryptionConfig} - */ -public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.EncryptionConfig) - EncryptionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use EncryptionConfig.newBuilder() to construct. - private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private EncryptionConfig() { - kmsKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EncryptionConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.EncryptionConfig.class, - com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder.class); - } - - public static final int KMS_KEY_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object kmsKey_ = ""; - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - @java.lang.Override - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } - } - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.EncryptionConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.EncryptionConfig other = - (com.google.cloud.metastore.v1alpha.EncryptionConfig) obj; - - if (!getKmsKey().equals(other.getKmsKey())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; - hash = (53 * hash) + getKmsKey().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.EncryptionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Encryption settings for the service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.EncryptionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.EncryptionConfig) - com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.EncryptionConfig.class, - com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.EncryptionConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - kmsKey_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.EncryptionConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.EncryptionConfig build() { - com.google.cloud.metastore.v1alpha.EncryptionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.EncryptionConfig buildPartial() { - com.google.cloud.metastore.v1alpha.EncryptionConfig result = - new com.google.cloud.metastore.v1alpha.EncryptionConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.EncryptionConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.kmsKey_ = kmsKey_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.EncryptionConfig) { - return mergeFrom((com.google.cloud.metastore.v1alpha.EncryptionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.EncryptionConfig other) { - if (other == com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance()) - return this; - if (!other.getKmsKey().isEmpty()) { - kmsKey_ = other.kmsKey_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - kmsKey_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object kmsKey_ = ""; - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - public com.google.protobuf.ByteString getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @param value The kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - kmsKey_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return This builder for chaining. - */ - public Builder clearKmsKey() { - kmsKey_ = getDefaultInstance().getKmsKey(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @param value The bytes for kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - kmsKey_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.EncryptionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.EncryptionConfig) - private static final com.google.cloud.metastore.v1alpha.EncryptionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.EncryptionConfig(); - } - - public static com.google.cloud.metastore.v1alpha.EncryptionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EncryptionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.EncryptionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfigOrBuilder.java deleted file mode 100644 index fddc4c97c96a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfigOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface EncryptionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.EncryptionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - java.lang.String getKmsKey(); - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - com.google.protobuf.ByteString getKmsKeyBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequest.java deleted file mode 100644 index d313563913fd..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequest.java +++ /dev/null @@ -1,1412 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ExportMetadataRequest} - */ -public final class ExportMetadataRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ExportMetadataRequest) - ExportMetadataRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportMetadataRequest.newBuilder() to construct. - private ExportMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportMetadataRequest() { - service_ = ""; - requestId_ = ""; - databaseDumpType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportMetadataRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ExportMetadataRequest.class, - com.google.cloud.metastore.v1alpha.ExportMetadataRequest.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DESTINATION_GCS_FOLDER(2), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 2: - return DESTINATION_GCS_FOLDER; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int DESTINATION_GCS_FOLDER_FIELD_NUMBER = 2; - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - public boolean hasDestinationGcsFolder() { - return destinationCase_ == 2; - } - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - public java.lang.String getDestinationGcsFolder() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 2) { - destination_ = s; - } - return s; - } - } - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - public com.google.protobuf.ByteString getDestinationGcsFolderBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 2) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * export, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * export, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 4; - private int databaseDumpType_ = 0; - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to
-   * `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to
-   * `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (destinationCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, databaseDumpType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (destinationCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, databaseDumpType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ExportMetadataRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ExportMetadataRequest other = - (com.google.cloud.metastore.v1alpha.ExportMetadataRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (databaseDumpType_ != other.databaseDumpType_) return false; - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 2: - if (!getDestinationGcsFolder().equals(other.getDestinationGcsFolder())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseDumpType_; - switch (destinationCase_) { - case 2: - hash = (37 * hash) + DESTINATION_GCS_FOLDER_FIELD_NUMBER; - hash = (53 * hash) + getDestinationGcsFolder().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ExportMetadataRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ExportMetadataRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ExportMetadataRequest) - com.google.cloud.metastore.v1alpha.ExportMetadataRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ExportMetadataRequest.class, - com.google.cloud.metastore.v1alpha.ExportMetadataRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ExportMetadataRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - requestId_ = ""; - databaseDumpType_ = 0; - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ExportMetadataRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ExportMetadataRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ExportMetadataRequest build() { - com.google.cloud.metastore.v1alpha.ExportMetadataRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ExportMetadataRequest buildPartial() { - com.google.cloud.metastore.v1alpha.ExportMetadataRequest result = - new com.google.cloud.metastore.v1alpha.ExportMetadataRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.ExportMetadataRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.databaseDumpType_ = databaseDumpType_; - } - } - - private void buildPartialOneofs( - com.google.cloud.metastore.v1alpha.ExportMetadataRequest result) { - result.destinationCase_ = destinationCase_; - result.destination_ = this.destination_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ExportMetadataRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ExportMetadataRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ExportMetadataRequest other) { - if (other == com.google.cloud.metastore.v1alpha.ExportMetadataRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.databaseDumpType_ != 0) { - setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); - } - switch (other.getDestinationCase()) { - case DESTINATION_GCS_FOLDER: - { - destinationCase_ = 2; - destination_ = other.destination_; - onChanged(); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 2; - destination_ = s; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - databaseDumpType_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - @java.lang.Override - public boolean hasDestinationGcsFolder() { - return destinationCase_ == 2; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - @java.lang.Override - public java.lang.String getDestinationGcsFolder() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 2) { - destination_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDestinationGcsFolderBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 2) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @param value The destinationGcsFolder to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsFolder(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationCase_ = 2; - destination_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return This builder for chaining. - */ - public Builder clearDestinationGcsFolder() { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @param value The bytes for destinationGcsFolder to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsFolderBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - destinationCase_ = 2; - destination_ = value; - onChanged(); - return this; - } - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int databaseDumpType_ = 0; - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpTypeValue(int value) { - databaseDumpType_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpType( - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - databaseDumpType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseDumpType() { - bitField0_ = (bitField0_ & ~0x00000008); - databaseDumpType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ExportMetadataRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ExportMetadataRequest) - private static final com.google.cloud.metastore.v1alpha.ExportMetadataRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ExportMetadataRequest(); - } - - public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportMetadataRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ExportMetadataRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequestOrBuilder.java deleted file mode 100644 index 67856f1e85e8..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequestOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ExportMetadataRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ExportMetadataRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - boolean hasDestinationGcsFolder(); - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - java.lang.String getDestinationGcsFolder(); - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - com.google.protobuf.ByteString getDestinationGcsFolderBytes(); - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * export, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * export, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); - - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to
-   * `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - int getDatabaseDumpTypeValue(); - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to
-   * `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType(); - - public com.google.cloud.metastore.v1alpha.ExportMetadataRequest.DestinationCase - getDestinationCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Federation.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Federation.java deleted file mode 100644 index 9da951d6c6ec..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Federation.java +++ /dev/null @@ -1,3087 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Represents a federation of multiple backend metastores.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Federation} - */ -public final class Federation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Federation) - FederationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Federation.newBuilder() to construct. - private Federation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Federation() { - name_ = ""; - version_ = ""; - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - uid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Federation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_Federation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - case 6: - return internalGetBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_Federation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Federation.class, - com.google.cloud.metastore.v1alpha.Federation.Builder.class); - } - - /** - * - * - *
-   * The current state of the federation.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.Federation.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metastore federation is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metastore federation is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The metastore federation is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - ACTIVE(2), - /** - * - * - *
-     * The metastore federation is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 3; - */ - UPDATING(3), - /** - * - * - *
-     * The metastore federation is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - /** - * - * - *
-     * The metastore federation has encountered an error and cannot be used. The
-     * metastore federation should be deleted.
-     * 
- * - * ERROR = 5; - */ - ERROR(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metastore federation is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metastore federation is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The metastore federation is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - public static final int ACTIVE_VALUE = 2; - /** - * - * - *
-     * The metastore federation is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 3; - */ - public static final int UPDATING_VALUE = 3; - /** - * - * - *
-     * The metastore federation is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - /** - * - * - *
-     * The metastore federation has encountered an error and cannot be used. The
-     * metastore federation should be deleted.
-     * 
- * - * ERROR = 5; - */ - public static final int ERROR_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return ACTIVE; - case 3: - return UPDATING; - case 4: - return DELETING; - case 5: - return ERROR; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.Federation.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Federation.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int VERSION_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend
-   * metastore versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend
-   * metastore versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKEND_METASTORES_FIELD_NUMBER = 6; - - private static final class BackendMetastoresDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.metastore.v1alpha.BackendMetastore.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> - backendMetastores_; - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> - internalGetBackendMetastores() { - if (backendMetastores_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - return backendMetastores_; - } - - public int getBackendMetastoresCount() { - return internalGetBackendMetastores().getMap().size(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public boolean containsBackendMetastores(int key) { - - return internalGetBackendMetastores().getMap().containsKey(key); - } - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getBackendMetastores() { - return getBackendMetastoresMap(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public java.util.Map - getBackendMetastoresMap() { - return internalGetBackendMetastores().getMap(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1alpha.BackendMetastore - getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1alpha.BackendMetastore defaultValue) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrThrow(int key) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 8; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation.State getState() { - com.google.cloud.metastore.v1alpha.Federation.State result = - com.google.cloud.metastore.v1alpha.Federation.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1alpha.Federation.State.UNRECOGNIZED - : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private volatile java.lang.Object stateMessage_ = ""; - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore federation, if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - @java.lang.Override - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore federation, if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UID_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private volatile java.lang.Object uid_ = ""; - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); - } - com.google.protobuf.GeneratedMessageV3.serializeIntegerMapTo( - output, - internalGetBackendMetastores(), - BackendMetastoresDefaultEntryHolder.defaultEntry, - 6); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, endpointUri_); - } - if (state_ - != com.google.cloud.metastore.v1alpha.Federation.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(8, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, uid_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); - } - for (java.util.Map.Entry - entry : internalGetBackendMetastores().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> - backendMetastores__ = - BackendMetastoresDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, backendMetastores__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, endpointUri_); - } - if (state_ - != com.google.cloud.metastore.v1alpha.Federation.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, uid_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.Federation)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.Federation other = - (com.google.cloud.metastore.v1alpha.Federation) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getVersion().equals(other.getVersion())) return false; - if (!internalGetBackendMetastores().equals(other.internalGetBackendMetastores())) return false; - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (state_ != other.state_) return false; - if (!getStateMessage().equals(other.getStateMessage())) return false; - if (!getUid().equals(other.getUid())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetBackendMetastores().getMap().isEmpty()) { - hash = (37 * hash) + BACKEND_METASTORES_FIELD_NUMBER; - hash = (53 * hash) + internalGetBackendMetastores().hashCode(); - } - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Federation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Federation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents a federation of multiple backend metastores.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Federation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Federation) - com.google.cloud.metastore.v1alpha.FederationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_Federation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - case 6: - return internalGetBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - case 6: - return internalGetMutableBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_Federation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Federation.class, - com.google.cloud.metastore.v1alpha.Federation.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.Federation.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - version_ = ""; - internalGetMutableBackendMetastores().clear(); - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - uid_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_Federation_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation build() { - com.google.cloud.metastore.v1alpha.Federation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation buildPartial() { - com.google.cloud.metastore.v1alpha.Federation result = - new com.google.cloud.metastore.v1alpha.Federation(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.Federation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.backendMetastores_ = internalGetBackendMetastores(); - result.backendMetastores_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.endpointUri_ = endpointUri_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.stateMessage_ = stateMessage_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.uid_ = uid_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.Federation) { - return mergeFrom((com.google.cloud.metastore.v1alpha.Federation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Federation other) { - if (other == com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000008; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000010; - onChanged(); - } - internalGetMutableBackendMetastores().mergeFrom(other.internalGetBackendMetastores()); - bitField0_ |= 0x00000020; - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - bitField0_ |= 0x00000200; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> - backendMetastores__ = - input.readMessage( - BackendMetastoresDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableBackendMetastores() - .getMutableMap() - .put(backendMetastores__.getKey(), backendMetastores__.getValue()); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 64: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 74: - { - stateMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: - { - uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - break; - } // case 82 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000008; - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; - return this; - } - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> - backendMetastores_; - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> - internalGetBackendMetastores() { - if (backendMetastores_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - return backendMetastores_; - } - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> - internalGetMutableBackendMetastores() { - if (backendMetastores_ == null) { - backendMetastores_ = - com.google.protobuf.MapField.newMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - if (!backendMetastores_.isMutable()) { - backendMetastores_ = backendMetastores_.copy(); - } - bitField0_ |= 0x00000020; - onChanged(); - return backendMetastores_; - } - - public int getBackendMetastoresCount() { - return internalGetBackendMetastores().getMap().size(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public boolean containsBackendMetastores(int key) { - - return internalGetBackendMetastores().getMap().containsKey(key); - } - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getBackendMetastores() { - return getBackendMetastoresMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public java.util.Map - getBackendMetastoresMap() { - return internalGetBackendMetastores().getMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1alpha.BackendMetastore - getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1alpha.BackendMetastore defaultValue) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrThrow( - int key) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearBackendMetastores() { - bitField0_ = (bitField0_ & ~0x00000020); - internalGetMutableBackendMetastores().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - public Builder removeBackendMetastores(int key) { - - internalGetMutableBackendMetastores().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableBackendMetastores() { - bitField0_ |= 0x00000020; - return internalGetMutableBackendMetastores().getMutableMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - public Builder putBackendMetastores( - int key, com.google.cloud.metastore.v1alpha.BackendMetastore value) { - - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableBackendMetastores().getMutableMap().put(key, value); - bitField0_ |= 0x00000020; - return this; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - public Builder putAllBackendMetastores( - java.util.Map - values) { - internalGetMutableBackendMetastores().getMutableMap().putAll(values); - bitField0_ |= 0x00000020; - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation.State getState() { - com.google.cloud.metastore.v1alpha.Federation.State result = - com.google.cloud.metastore.v1alpha.Federation.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1alpha.Federation.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1alpha.Federation.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000080); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object stateMessage_ = ""; - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - stateMessage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - stateMessage_ = getDefaultInstance().getStateMessage(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - stateMessage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private java.lang.Object uid_ = ""; - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uid_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uid_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Federation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Federation) - private static final com.google.cloud.metastore.v1alpha.Federation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Federation(); - } - - public static com.google.cloud.metastore.v1alpha.Federation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Federation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationOrBuilder.java deleted file mode 100644 index c1104555cc22..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationOrBuilder.java +++ /dev/null @@ -1,418 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public interface FederationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Federation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - int getLabelsCount(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend
-   * metastore versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend
-   * metastore versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - int getBackendMetastoresCount(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - boolean containsBackendMetastores(int key); - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getBackendMetastores(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - java.util.Map - getBackendMetastoresMap(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - /* nullable */ - com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1alpha.BackendMetastore defaultValue); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * - * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; - * - */ - com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrThrow(int key); - - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1alpha.Federation.State getState(); - - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore federation, if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore federation, if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString getStateMessageBytes(); - - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - java.lang.String getUid(); - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - com.google.protobuf.ByteString getUidBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequest.java deleted file mode 100644 index 4dcb68a0e88c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequest.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.GetBackupRequest} - */ -public final class GetBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.GetBackupRequest) - GetBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBackupRequest.newBuilder() to construct. - private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetBackupRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.GetBackupRequest.class, - com.google.cloud.metastore.v1alpha.GetBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.GetBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.GetBackupRequest other = - (com.google.cloud.metastore.v1alpha.GetBackupRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.GetBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.GetBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.GetBackupRequest) - com.google.cloud.metastore.v1alpha.GetBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.GetBackupRequest.class, - com.google.cloud.metastore.v1alpha.GetBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.GetBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.GetBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetBackupRequest build() { - com.google.cloud.metastore.v1alpha.GetBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetBackupRequest buildPartial() { - com.google.cloud.metastore.v1alpha.GetBackupRequest result = - new com.google.cloud.metastore.v1alpha.GetBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.GetBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.GetBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.GetBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.GetBackupRequest other) { - if (other == com.google.cloud.metastore.v1alpha.GetBackupRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.GetBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.GetBackupRequest) - private static final com.google.cloud.metastore.v1alpha.GetBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.GetBackupRequest(); - } - - public static com.google.cloud.metastore.v1alpha.GetBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequestOrBuilder.java deleted file mode 100644 index 070fab425efb..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface GetBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.GetBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequest.java deleted file mode 100644 index cfadef134214..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequest.java +++ /dev/null @@ -1,658 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for GetFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.GetFederationRequest} - */ -public final class GetFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.GetFederationRequest) - GetFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetFederationRequest.newBuilder() to construct. - private GetFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetFederationRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.GetFederationRequest.class, - com.google.cloud.metastore.v1alpha.GetFederationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to
-   * retrieve, in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to
-   * retrieve, in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.GetFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.GetFederationRequest other = - (com.google.cloud.metastore.v1alpha.GetFederationRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.GetFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for GetFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.GetFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.GetFederationRequest) - com.google.cloud.metastore.v1alpha.GetFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.GetFederationRequest.class, - com.google.cloud.metastore.v1alpha.GetFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.GetFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.GetFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetFederationRequest build() { - com.google.cloud.metastore.v1alpha.GetFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetFederationRequest buildPartial() { - com.google.cloud.metastore.v1alpha.GetFederationRequest result = - new com.google.cloud.metastore.v1alpha.GetFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.GetFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.GetFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.GetFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.GetFederationRequest other) { - if (other == com.google.cloud.metastore.v1alpha.GetFederationRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.GetFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.GetFederationRequest) - private static final com.google.cloud.metastore.v1alpha.GetFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.GetFederationRequest(); - } - - public static com.google.cloud.metastore.v1alpha.GetFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequestOrBuilder.java deleted file mode 100644 index 4f54bd81197c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public interface GetFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.GetFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to
-   * retrieve, in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to
-   * retrieve, in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequest.java deleted file mode 100644 index c4c9bda6d532..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequest.java +++ /dev/null @@ -1,660 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.GetMetadataImportRequest} - */ -public final class GetMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.GetMetadataImportRequest) - GetMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetMetadataImportRequest.newBuilder() to construct. - private GetMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetMetadataImportRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.class, - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.GetMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest other = - (com.google.cloud.metastore.v1alpha.GetMetadataImportRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.GetMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.GetMetadataImportRequest) - com.google.cloud.metastore.v1alpha.GetMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.class, - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetMetadataImportRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetMetadataImportRequest build() { - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1alpha.GetMetadataImportRequest result = - new com.google.cloud.metastore.v1alpha.GetMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.GetMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.GetMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest other) { - if (other == com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.GetMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.GetMetadataImportRequest) - private static final com.google.cloud.metastore.v1alpha.GetMetadataImportRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.GetMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetMetadataImportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequestOrBuilder.java deleted file mode 100644 index c3bebe896496..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface GetMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.GetMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequest.java deleted file mode 100644 index bb7908466249..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequest.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.GetService][google.cloud.metastore.v1alpha.DataprocMetastore.GetService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.GetServiceRequest} - */ -public final class GetServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.GetServiceRequest) - GetServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetServiceRequest.newBuilder() to construct. - private GetServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetServiceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.GetServiceRequest.class, - com.google.cloud.metastore.v1alpha.GetServiceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.GetServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.GetServiceRequest other = - (com.google.cloud.metastore.v1alpha.GetServiceRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.GetServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.GetService][google.cloud.metastore.v1alpha.DataprocMetastore.GetService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.GetServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.GetServiceRequest) - com.google.cloud.metastore.v1alpha.GetServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.GetServiceRequest.class, - com.google.cloud.metastore.v1alpha.GetServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.GetServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.GetServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetServiceRequest build() { - com.google.cloud.metastore.v1alpha.GetServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetServiceRequest buildPartial() { - com.google.cloud.metastore.v1alpha.GetServiceRequest result = - new com.google.cloud.metastore.v1alpha.GetServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.GetServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.GetServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.GetServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.GetServiceRequest other) { - if (other == com.google.cloud.metastore.v1alpha.GetServiceRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object 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}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.GetServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.GetServiceRequest) - private static final com.google.cloud.metastore.v1alpha.GetServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.GetServiceRequest(); - } - - public static com.google.cloud.metastore.v1alpha.GetServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.GetServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequestOrBuilder.java deleted file mode 100644 index c86558d820f8..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface GetServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.GetServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfig.java deleted file mode 100644 index 4c0c6fd8e598..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfig.java +++ /dev/null @@ -1,2125 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Specifies configuration information specific to running Hive metastore
- * software as the metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.HiveMetastoreConfig} - */ -public final class HiveMetastoreConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.HiveMetastoreConfig) - HiveMetastoreConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use HiveMetastoreConfig.newBuilder() to construct. - private HiveMetastoreConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HiveMetastoreConfig() { - version_ = ""; - endpointProtocol_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HiveMetastoreConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - case 5: - return internalGetAuxiliaryVersions(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.class, - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder.class); - } - - /** - * - * - *
-   * Protocols available for serving the metastore service endpoint.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol} - */ - public enum EndpointProtocol implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The protocol is not set.
-     * 
- * - * ENDPOINT_PROTOCOL_UNSPECIFIED = 0; - */ - ENDPOINT_PROTOCOL_UNSPECIFIED(0), - /** - * - * - *
-     * Use the legacy Apache Thrift protocol for the metastore service endpoint.
-     * 
- * - * THRIFT = 1; - */ - THRIFT(1), - /** - * - * - *
-     * Use the modernized gRPC protocol for the metastore service endpoint.
-     * 
- * - * GRPC = 2; - */ - GRPC(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The protocol is not set.
-     * 
- * - * ENDPOINT_PROTOCOL_UNSPECIFIED = 0; - */ - public static final int ENDPOINT_PROTOCOL_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Use the legacy Apache Thrift protocol for the metastore service endpoint.
-     * 
- * - * THRIFT = 1; - */ - public static final int THRIFT_VALUE = 1; - /** - * - * - *
-     * Use the modernized gRPC protocol for the metastore service endpoint.
-     * 
- * - * GRPC = 2; - */ - public static final int GRPC_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EndpointProtocol valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static EndpointProtocol forNumber(int value) { - switch (value) { - case 0: - return ENDPOINT_PROTOCOL_UNSPECIFIED; - case 1: - return THRIFT; - case 2: - return GRPC; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EndpointProtocol findValueByNumber(int number) { - return EndpointProtocol.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final EndpointProtocol[] VALUES = values(); - - public static EndpointProtocol valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private EndpointProtocol(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol) - } - - public static final int VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; - - private static final class ConfigOverridesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_ConfigOverridesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int KERBEROS_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1alpha.KerberosConfig kerberosConfig_; - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - @java.lang.Override - public boolean hasKerberosConfig() { - return kerberosConfig_ != null; - } - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.KerberosConfig getKerberosConfig() { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - - public static final int ENDPOINT_PROTOCOL_FIELD_NUMBER = 4; - private int endpointProtocol_ = 0; - /** - * - * - *
-   * The protocol to use for the metastore service endpoint. If unspecified,
-   * defaults to `THRIFT`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The enum numeric value on the wire for endpointProtocol. - */ - @java.lang.Override - public int getEndpointProtocolValue() { - return endpointProtocol_; - } - /** - * - * - *
-   * The protocol to use for the metastore service endpoint. If unspecified,
-   * defaults to `THRIFT`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The endpointProtocol. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol - getEndpointProtocol() { - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol result = - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.forNumber( - endpointProtocol_); - return result == null - ? com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED - : result; - } - - public static final int AUXILIARY_VERSIONS_FIELD_NUMBER = 5; - - private static final class AuxiliaryVersionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - .getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - auxiliaryVersions_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - internalGetAuxiliaryVersions() { - if (auxiliaryVersions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AuxiliaryVersionsDefaultEntryHolder.defaultEntry); - } - return auxiliaryVersions_; - } - - public int getAuxiliaryVersionsCount() { - return internalGetAuxiliaryVersions().getMap().size(); - } - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public boolean containsAuxiliaryVersions(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetAuxiliaryVersions().getMap().containsKey(key); - } - /** Use {@link #getAuxiliaryVersionsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getAuxiliaryVersions() { - return getAuxiliaryVersionsMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public java.util.Map - getAuxiliaryVersionsMap() { - return internalGetAuxiliaryVersions().getMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - getAuxiliaryVersionsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetAuxiliaryVersions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetAuxiliaryVersions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetConfigOverrides(), ConfigOverridesDefaultEntryHolder.defaultEntry, 2); - if (kerberosConfig_ != null) { - output.writeMessage(3, getKerberosConfig()); - } - if (endpointProtocol_ - != com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol - .ENDPOINT_PROTOCOL_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, endpointProtocol_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetAuxiliaryVersions(), - AuxiliaryVersionsDefaultEntryHolder.defaultEntry, - 5); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - for (java.util.Map.Entry entry : - internalGetConfigOverrides().getMap().entrySet()) { - com.google.protobuf.MapEntry configOverrides__ = - ConfigOverridesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, configOverrides__); - } - if (kerberosConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKerberosConfig()); - } - if (endpointProtocol_ - != com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol - .ENDPOINT_PROTOCOL_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, endpointProtocol_); - } - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - entry : internalGetAuxiliaryVersions().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - auxiliaryVersions__ = - AuxiliaryVersionsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, auxiliaryVersions__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.HiveMetastoreConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig other = - (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!internalGetConfigOverrides().equals(other.internalGetConfigOverrides())) return false; - if (hasKerberosConfig() != other.hasKerberosConfig()) return false; - if (hasKerberosConfig()) { - if (!getKerberosConfig().equals(other.getKerberosConfig())) return false; - } - if (endpointProtocol_ != other.endpointProtocol_) return false; - if (!internalGetAuxiliaryVersions().equals(other.internalGetAuxiliaryVersions())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetConfigOverrides().getMap().isEmpty()) { - hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; - hash = (53 * hash) + internalGetConfigOverrides().hashCode(); - } - if (hasKerberosConfig()) { - hash = (37 * hash) + KERBEROS_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getKerberosConfig().hashCode(); - } - hash = (37 * hash) + ENDPOINT_PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + endpointProtocol_; - if (!internalGetAuxiliaryVersions().getMap().isEmpty()) { - hash = (37 * hash) + AUXILIARY_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetAuxiliaryVersions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.HiveMetastoreConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.HiveMetastoreConfig) - com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - case 5: - return internalGetAuxiliaryVersions(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableConfigOverrides(); - case 5: - return internalGetMutableAuxiliaryVersions(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.class, - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - internalGetMutableConfigOverrides().clear(); - kerberosConfig_ = null; - if (kerberosConfigBuilder_ != null) { - kerberosConfigBuilder_.dispose(); - kerberosConfigBuilder_ = null; - } - endpointProtocol_ = 0; - internalGetMutableAuxiliaryVersions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig build() { - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig buildPartial() { - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig result = - new com.google.cloud.metastore.v1alpha.HiveMetastoreConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.HiveMetastoreConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.configOverrides_ = internalGetConfigOverrides(); - result.configOverrides_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.kerberosConfig_ = - kerberosConfigBuilder_ == null ? kerberosConfig_ : kerberosConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.endpointProtocol_ = endpointProtocol_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.auxiliaryVersions_ = internalGetAuxiliaryVersions(); - result.auxiliaryVersions_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) { - return mergeFrom((com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.HiveMetastoreConfig other) { - if (other == com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance()) - return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableConfigOverrides().mergeFrom(other.internalGetConfigOverrides()); - bitField0_ |= 0x00000002; - if (other.hasKerberosConfig()) { - mergeKerberosConfig(other.getKerberosConfig()); - } - if (other.endpointProtocol_ != 0) { - setEndpointProtocolValue(other.getEndpointProtocolValue()); - } - internalGetMutableAuxiliaryVersions().mergeFrom(other.internalGetAuxiliaryVersions()); - bitField0_ |= 0x00000010; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.MapEntry configOverrides__ = - input.readMessage( - ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableConfigOverrides() - .getMutableMap() - .put(configOverrides__.getKey(), configOverrides__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getKerberosConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - endpointProtocol_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: - { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - auxiliaryVersions__ = - input.readMessage( - AuxiliaryVersionsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableAuxiliaryVersions() - .getMutableMap() - .put(auxiliaryVersions__.getKey(), auxiliaryVersions__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - private com.google.protobuf.MapField - internalGetMutableConfigOverrides() { - if (configOverrides_ == null) { - configOverrides_ = - com.google.protobuf.MapField.newMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - if (!configOverrides_.isMutable()) { - configOverrides_ = configOverrides_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearConfigOverrides() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableConfigOverrides().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder removeConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableConfigOverrides().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableConfigOverrides() { - bitField0_ |= 0x00000002; - return internalGetMutableConfigOverrides().getMutableMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putConfigOverrides(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableConfigOverrides().getMutableMap().put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putAllConfigOverrides(java.util.Map values) { - internalGetMutableConfigOverrides().getMutableMap().putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private com.google.cloud.metastore.v1alpha.KerberosConfig kerberosConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.KerberosConfig, - com.google.cloud.metastore.v1alpha.KerberosConfig.Builder, - com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder> - kerberosConfigBuilder_; - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - public boolean hasKerberosConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - public com.google.cloud.metastore.v1alpha.KerberosConfig getKerberosConfig() { - if (kerberosConfigBuilder_ == null) { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } else { - return kerberosConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - public Builder setKerberosConfig(com.google.cloud.metastore.v1alpha.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kerberosConfig_ = value; - } else { - kerberosConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - public Builder setKerberosConfig( - com.google.cloud.metastore.v1alpha.KerberosConfig.Builder builderForValue) { - if (kerberosConfigBuilder_ == null) { - kerberosConfig_ = builderForValue.build(); - } else { - kerberosConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - public Builder mergeKerberosConfig(com.google.cloud.metastore.v1alpha.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && kerberosConfig_ != null - && kerberosConfig_ - != com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance()) { - getKerberosConfigBuilder().mergeFrom(value); - } else { - kerberosConfig_ = value; - } - } else { - kerberosConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - public Builder clearKerberosConfig() { - bitField0_ = (bitField0_ & ~0x00000004); - kerberosConfig_ = null; - if (kerberosConfigBuilder_ != null) { - kerberosConfigBuilder_.dispose(); - kerberosConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - public com.google.cloud.metastore.v1alpha.KerberosConfig.Builder getKerberosConfigBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getKerberosConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - public com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - if (kerberosConfigBuilder_ != null) { - return kerberosConfigBuilder_.getMessageOrBuilder(); - } else { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.KerberosConfig, - com.google.cloud.metastore.v1alpha.KerberosConfig.Builder, - com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder> - getKerberosConfigFieldBuilder() { - if (kerberosConfigBuilder_ == null) { - kerberosConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.KerberosConfig, - com.google.cloud.metastore.v1alpha.KerberosConfig.Builder, - com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder>( - getKerberosConfig(), getParentForChildren(), isClean()); - kerberosConfig_ = null; - } - return kerberosConfigBuilder_; - } - - private int endpointProtocol_ = 0; - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The enum numeric value on the wire for endpointProtocol. - */ - @java.lang.Override - public int getEndpointProtocolValue() { - return endpointProtocol_; - } - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @param value The enum numeric value on the wire for endpointProtocol to set. - * @return This builder for chaining. - */ - public Builder setEndpointProtocolValue(int value) { - endpointProtocol_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The endpointProtocol. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol - getEndpointProtocol() { - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol result = - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.forNumber( - endpointProtocol_); - return result == null - ? com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @param value The endpointProtocol to set. - * @return This builder for chaining. - */ - public Builder setEndpointProtocol( - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - endpointProtocol_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return This builder for chaining. - */ - public Builder clearEndpointProtocol() { - bitField0_ = (bitField0_ & ~0x00000008); - endpointProtocol_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - auxiliaryVersions_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - internalGetAuxiliaryVersions() { - if (auxiliaryVersions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AuxiliaryVersionsDefaultEntryHolder.defaultEntry); - } - return auxiliaryVersions_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - internalGetMutableAuxiliaryVersions() { - if (auxiliaryVersions_ == null) { - auxiliaryVersions_ = - com.google.protobuf.MapField.newMapField( - AuxiliaryVersionsDefaultEntryHolder.defaultEntry); - } - if (!auxiliaryVersions_.isMutable()) { - auxiliaryVersions_ = auxiliaryVersions_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return auxiliaryVersions_; - } - - public int getAuxiliaryVersionsCount() { - return internalGetAuxiliaryVersions().getMap().size(); - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public boolean containsAuxiliaryVersions(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetAuxiliaryVersions().getMap().containsKey(key); - } - /** Use {@link #getAuxiliaryVersionsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - getAuxiliaryVersions() { - return getAuxiliaryVersionsMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - getAuxiliaryVersionsMap() { - return internalGetAuxiliaryVersions().getMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig - getAuxiliaryVersionsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetAuxiliaryVersions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetAuxiliaryVersions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAuxiliaryVersions() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableAuxiliaryVersions().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - public Builder removeAuxiliaryVersions(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableAuxiliaryVersions().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> - getMutableAuxiliaryVersions() { - bitField0_ |= 0x00000010; - return internalGetMutableAuxiliaryVersions().getMutableMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - public Builder putAuxiliaryVersions( - java.lang.String key, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableAuxiliaryVersions().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - public Builder putAllAuxiliaryVersions( - java.util.Map - values) { - internalGetMutableAuxiliaryVersions().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.HiveMetastoreConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.HiveMetastoreConfig) - private static final com.google.cloud.metastore.v1alpha.HiveMetastoreConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.HiveMetastoreConfig(); - } - - public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HiveMetastoreConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfigOrBuilder.java deleted file mode 100644 index 1eb12e424a50..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfigOrBuilder.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface HiveMetastoreConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.HiveMetastoreConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - int getConfigOverridesCount(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - boolean containsConfigOverrides(java.lang.String key); - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getConfigOverrides(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.util.Map getConfigOverridesMap(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - /* nullable */ - java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.lang.String getConfigOverridesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - boolean hasKerberosConfig(); - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - com.google.cloud.metastore.v1alpha.KerberosConfig getKerberosConfig(); - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; - */ - com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); - - /** - * - * - *
-   * The protocol to use for the metastore service endpoint. If unspecified,
-   * defaults to `THRIFT`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The enum numeric value on the wire for endpointProtocol. - */ - int getEndpointProtocolValue(); - /** - * - * - *
-   * The protocol to use for the metastore service endpoint. If unspecified,
-   * defaults to `THRIFT`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The endpointProtocol. - */ - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol(); - - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - int getAuxiliaryVersionsCount(); - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - boolean containsAuxiliaryVersions(java.lang.String key); - /** Use {@link #getAuxiliaryVersionsMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getAuxiliaryVersions(); - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - java.util.Map - getAuxiliaryVersionsMap(); - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - /* nullable */ - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig defaultValue); - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( - java.lang.String key); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfig.java deleted file mode 100644 index cb7006bcc370..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfig.java +++ /dev/null @@ -1,1115 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Configuration information for a Kerberos principal.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.KerberosConfig} - */ -public final class KerberosConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.KerberosConfig) - KerberosConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use KerberosConfig.newBuilder() to construct. - private KerberosConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private KerberosConfig() { - principal_ = ""; - krb5ConfigGcsUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new KerberosConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.KerberosConfig.class, - com.google.cloud.metastore.v1alpha.KerberosConfig.Builder.class); - } - - public static final int KEYTAB_FIELD_NUMBER = 1; - private com.google.cloud.metastore.v1alpha.Secret keytab_; - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - @java.lang.Override - public boolean hasKeytab() { - return keytab_ != null; - } - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - * - * @return The keytab. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Secret getKeytab() { - return keytab_ == null - ? com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance() - : keytab_; - } - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.SecretOrBuilder getKeytabOrBuilder() { - return keytab_ == null - ? com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance() - : keytab_; - } - - public static final int PRINCIPAL_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object principal_ = ""; - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The principal. - */ - @java.lang.Override - public java.lang.String getPrincipal() { - java.lang.Object ref = principal_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principal_ = s; - return s; - } - } - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrincipalBytes() { - java.lang.Object ref = principal_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - principal_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KRB5_CONFIG_GCS_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object krb5ConfigGcsUri_ = ""; - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - @java.lang.Override - public java.lang.String getKrb5ConfigGcsUri() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - krb5ConfigGcsUri_ = s; - return s; - } - } - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - krb5ConfigGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (keytab_ != null) { - output.writeMessage(1, getKeytab()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, principal_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, krb5ConfigGcsUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (keytab_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKeytab()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, principal_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, krb5ConfigGcsUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.KerberosConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.KerberosConfig other = - (com.google.cloud.metastore.v1alpha.KerberosConfig) obj; - - if (hasKeytab() != other.hasKeytab()) return false; - if (hasKeytab()) { - if (!getKeytab().equals(other.getKeytab())) return false; - } - if (!getPrincipal().equals(other.getPrincipal())) return false; - if (!getKrb5ConfigGcsUri().equals(other.getKrb5ConfigGcsUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKeytab()) { - hash = (37 * hash) + KEYTAB_FIELD_NUMBER; - hash = (53 * hash) + getKeytab().hashCode(); - } - hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; - hash = (53 * hash) + getPrincipal().hashCode(); - hash = (37 * hash) + KRB5_CONFIG_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getKrb5ConfigGcsUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.KerberosConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Configuration information for a Kerberos principal.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.KerberosConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.KerberosConfig) - com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.KerberosConfig.class, - com.google.cloud.metastore.v1alpha.KerberosConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.KerberosConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - keytab_ = null; - if (keytabBuilder_ != null) { - keytabBuilder_.dispose(); - keytabBuilder_ = null; - } - principal_ = ""; - krb5ConfigGcsUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_KerberosConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.KerberosConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.KerberosConfig build() { - com.google.cloud.metastore.v1alpha.KerberosConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.KerberosConfig buildPartial() { - com.google.cloud.metastore.v1alpha.KerberosConfig result = - new com.google.cloud.metastore.v1alpha.KerberosConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.KerberosConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.keytab_ = keytabBuilder_ == null ? keytab_ : keytabBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.principal_ = principal_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.krb5ConfigGcsUri_ = krb5ConfigGcsUri_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.KerberosConfig) { - return mergeFrom((com.google.cloud.metastore.v1alpha.KerberosConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.KerberosConfig other) { - if (other == com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance()) - return this; - if (other.hasKeytab()) { - mergeKeytab(other.getKeytab()); - } - if (!other.getPrincipal().isEmpty()) { - principal_ = other.principal_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getKrb5ConfigGcsUri().isEmpty()) { - krb5ConfigGcsUri_ = other.krb5ConfigGcsUri_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getKeytabFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - principal_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - krb5ConfigGcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.metastore.v1alpha.Secret keytab_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Secret, - com.google.cloud.metastore.v1alpha.Secret.Builder, - com.google.cloud.metastore.v1alpha.SecretOrBuilder> - keytabBuilder_; - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - public boolean hasKeytab() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - * - * @return The keytab. - */ - public com.google.cloud.metastore.v1alpha.Secret getKeytab() { - if (keytabBuilder_ == null) { - return keytab_ == null - ? com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance() - : keytab_; - } else { - return keytabBuilder_.getMessage(); - } - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - public Builder setKeytab(com.google.cloud.metastore.v1alpha.Secret value) { - if (keytabBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - keytab_ = value; - } else { - keytabBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - public Builder setKeytab(com.google.cloud.metastore.v1alpha.Secret.Builder builderForValue) { - if (keytabBuilder_ == null) { - keytab_ = builderForValue.build(); - } else { - keytabBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - public Builder mergeKeytab(com.google.cloud.metastore.v1alpha.Secret value) { - if (keytabBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && keytab_ != null - && keytab_ != com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance()) { - getKeytabBuilder().mergeFrom(value); - } else { - keytab_ = value; - } - } else { - keytabBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - public Builder clearKeytab() { - bitField0_ = (bitField0_ & ~0x00000001); - keytab_ = null; - if (keytabBuilder_ != null) { - keytabBuilder_.dispose(); - keytabBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - public com.google.cloud.metastore.v1alpha.Secret.Builder getKeytabBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getKeytabFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - public com.google.cloud.metastore.v1alpha.SecretOrBuilder getKeytabOrBuilder() { - if (keytabBuilder_ != null) { - return keytabBuilder_.getMessageOrBuilder(); - } else { - return keytab_ == null - ? com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance() - : keytab_; - } - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Secret, - com.google.cloud.metastore.v1alpha.Secret.Builder, - com.google.cloud.metastore.v1alpha.SecretOrBuilder> - getKeytabFieldBuilder() { - if (keytabBuilder_ == null) { - keytabBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Secret, - com.google.cloud.metastore.v1alpha.Secret.Builder, - com.google.cloud.metastore.v1alpha.SecretOrBuilder>( - getKeytab(), getParentForChildren(), isClean()); - keytab_ = null; - } - return keytabBuilder_; - } - - private java.lang.Object principal_ = ""; - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return The principal. - */ - public java.lang.String getPrincipal() { - java.lang.Object ref = principal_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principal_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - public com.google.protobuf.ByteString getPrincipalBytes() { - java.lang.Object ref = principal_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - principal_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @param value The principal to set. - * @return This builder for chaining. - */ - public Builder setPrincipal(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - principal_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return This builder for chaining. - */ - public Builder clearPrincipal() { - principal_ = getDefaultInstance().getPrincipal(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @param value The bytes for principal to set. - * @return This builder for chaining. - */ - public Builder setPrincipalBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - principal_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object krb5ConfigGcsUri_ = ""; - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - public java.lang.String getKrb5ConfigGcsUri() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - krb5ConfigGcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - public com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - krb5ConfigGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @param value The krb5ConfigGcsUri to set. - * @return This builder for chaining. - */ - public Builder setKrb5ConfigGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - krb5ConfigGcsUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return This builder for chaining. - */ - public Builder clearKrb5ConfigGcsUri() { - krb5ConfigGcsUri_ = getDefaultInstance().getKrb5ConfigGcsUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @param value The bytes for krb5ConfigGcsUri to set. - * @return This builder for chaining. - */ - public Builder setKrb5ConfigGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - krb5ConfigGcsUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.KerberosConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.KerberosConfig) - private static final com.google.cloud.metastore.v1alpha.KerberosConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.KerberosConfig(); - } - - public static com.google.cloud.metastore.v1alpha.KerberosConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KerberosConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.KerberosConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfigOrBuilder.java deleted file mode 100644 index efc3d4cf0d6d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfigOrBuilder.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface KerberosConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.KerberosConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - boolean hasKeytab(); - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - * - * @return The keytab. - */ - com.google.cloud.metastore.v1alpha.Secret getKeytab(); - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1alpha.Secret keytab = 1; - */ - com.google.cloud.metastore.v1alpha.SecretOrBuilder getKeytabOrBuilder(); - - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The principal. - */ - java.lang.String getPrincipal(); - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - com.google.protobuf.ByteString getPrincipalBytes(); - - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - java.lang.String getKrb5ConfigGcsUri(); - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Lake.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Lake.java deleted file mode 100644 index b2ff2a94c1c4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Lake.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Represents a Lake resource
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Lake} - */ -public final class Lake extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Lake) - LakeOrBuilder { - private static final long serialVersionUID = 0L; - // Use Lake.newBuilder() to construct. - private Lake(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Lake() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Lake(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Lake_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Lake_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Lake.class, - com.google.cloud.metastore.v1alpha.Lake.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * The Lake resource name.
-   * Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-   * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The Lake resource name.
-   * Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-   * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.Lake)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.Lake other = (com.google.cloud.metastore.v1alpha.Lake) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Lake parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Lake prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents a Lake resource
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Lake} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Lake) - com.google.cloud.metastore.v1alpha.LakeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Lake_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Lake_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Lake.class, - com.google.cloud.metastore.v1alpha.Lake.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.Lake.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Lake_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Lake getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.Lake.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Lake build() { - com.google.cloud.metastore.v1alpha.Lake result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Lake buildPartial() { - com.google.cloud.metastore.v1alpha.Lake result = - new com.google.cloud.metastore.v1alpha.Lake(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.Lake result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.Lake) { - return mergeFrom((com.google.cloud.metastore.v1alpha.Lake) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Lake other) { - if (other == com.google.cloud.metastore.v1alpha.Lake.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Lake) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Lake) - private static final com.google.cloud.metastore.v1alpha.Lake DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Lake(); - } - - public static com.google.cloud.metastore.v1alpha.Lake getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Lake parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Lake getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LakeOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LakeOrBuilder.java deleted file mode 100644 index 0962719bb06d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LakeOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface LakeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Lake) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Lake resource name.
-   * Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-   * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The Lake resource name.
-   * Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-   * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequest.java deleted file mode 100644 index e957c658c869..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequest.java +++ /dev/null @@ -1,1363 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListBackupsRequest} - */ -public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListBackupsRequest) - ListBackupsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListBackupsRequest.newBuilder() to construct. - private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListBackupsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListBackupsRequest.class, - com.google.cloud.metastore.v1alpha.ListBackupsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of backups to return. The response may contain
-   * less than the maximum number. If unspecified, no more than 500 backups are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListBackupsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ListBackupsRequest other = - (com.google.cloud.metastore.v1alpha.ListBackupsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ListBackupsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListBackupsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListBackupsRequest) - com.google.cloud.metastore.v1alpha.ListBackupsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListBackupsRequest.class, - com.google.cloud.metastore.v1alpha.ListBackupsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ListBackupsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListBackupsRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ListBackupsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListBackupsRequest build() { - com.google.cloud.metastore.v1alpha.ListBackupsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListBackupsRequest buildPartial() { - com.google.cloud.metastore.v1alpha.ListBackupsRequest result = - new com.google.cloud.metastore.v1alpha.ListBackupsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.ListBackupsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ListBackupsRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ListBackupsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListBackupsRequest other) { - if (other == com.google.cloud.metastore.v1alpha.ListBackupsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListBackupsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListBackupsRequest) - private static final com.google.cloud.metastore.v1alpha.ListBackupsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListBackupsRequest(); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListBackupsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequestOrBuilder.java deleted file mode 100644 index 6827587eda0b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequestOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ListBackupsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListBackupsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of backups to return. The response may contain
-   * less than the maximum number. If unspecified, no more than 500 backups are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponse.java deleted file mode 100644 index 6f5a096ab4b7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponse.java +++ /dev/null @@ -1,1404 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListBackupsResponse} - */ -public final class ListBackupsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListBackupsResponse) - ListBackupsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListBackupsResponse.newBuilder() to construct. - private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListBackupsResponse() { - backups_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListBackupsResponse.class, - com.google.cloud.metastore.v1alpha.ListBackupsResponse.Builder.class); - } - - public static final int BACKUPS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List backups_; - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - @java.lang.Override - public java.util.List getBackupsList() { - return backups_; - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - @java.lang.Override - public java.util.List - getBackupsOrBuilderList() { - return backups_; - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - @java.lang.Override - public int getBackupsCount() { - return backups_.size(); - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Backup getBackups(int index) { - return backups_.get(index); - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupsOrBuilder(int index) { - return backups_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < backups_.size(); i++) { - output.writeMessage(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < backups_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListBackupsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ListBackupsResponse other = - (com.google.cloud.metastore.v1alpha.ListBackupsResponse) obj; - - if (!getBackupsList().equals(other.getBackupsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getBackupsCount() > 0) { - hash = (37 * hash) + BACKUPS_FIELD_NUMBER; - hash = (53 * hash) + getBackupsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ListBackupsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListBackupsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListBackupsResponse) - com.google.cloud.metastore.v1alpha.ListBackupsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListBackupsResponse.class, - com.google.cloud.metastore.v1alpha.ListBackupsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ListBackupsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - } else { - backups_ = null; - backupsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListBackupsResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ListBackupsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListBackupsResponse build() { - com.google.cloud.metastore.v1alpha.ListBackupsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListBackupsResponse buildPartial() { - com.google.cloud.metastore.v1alpha.ListBackupsResponse result = - new com.google.cloud.metastore.v1alpha.ListBackupsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1alpha.ListBackupsResponse result) { - if (backupsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - backups_ = java.util.Collections.unmodifiableList(backups_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.backups_ = backups_; - } else { - result.backups_ = backupsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.ListBackupsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ListBackupsResponse) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ListBackupsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListBackupsResponse other) { - if (other == com.google.cloud.metastore.v1alpha.ListBackupsResponse.getDefaultInstance()) - return this; - if (backupsBuilder_ == null) { - if (!other.backups_.isEmpty()) { - if (backups_.isEmpty()) { - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBackupsIsMutable(); - backups_.addAll(other.backups_); - } - onChanged(); - } - } else { - if (!other.backups_.isEmpty()) { - if (backupsBuilder_.isEmpty()) { - backupsBuilder_.dispose(); - backupsBuilder_ = null; - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - backupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBackupsFieldBuilder() - : null; - } else { - backupsBuilder_.addAllMessages(other.backups_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1alpha.Backup m = - input.readMessage( - com.google.cloud.metastore.v1alpha.Backup.parser(), extensionRegistry); - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(m); - } else { - backupsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List backups_ = - java.util.Collections.emptyList(); - - private void ensureBackupsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - backups_ = new java.util.ArrayList(backups_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Backup, - com.google.cloud.metastore.v1alpha.Backup.Builder, - com.google.cloud.metastore.v1alpha.BackupOrBuilder> - backupsBuilder_; - - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public java.util.List getBackupsList() { - if (backupsBuilder_ == null) { - return java.util.Collections.unmodifiableList(backups_); - } else { - return backupsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public int getBackupsCount() { - if (backupsBuilder_ == null) { - return backups_.size(); - } else { - return backupsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public com.google.cloud.metastore.v1alpha.Backup getBackups(int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); - } else { - return backupsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder setBackups(int index, com.google.cloud.metastore.v1alpha.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.set(index, value); - onChanged(); - } else { - backupsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder setBackups( - int index, com.google.cloud.metastore.v1alpha.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.set(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder addBackups(com.google.cloud.metastore.v1alpha.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(value); - onChanged(); - } else { - backupsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder addBackups(int index, com.google.cloud.metastore.v1alpha.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(index, value); - onChanged(); - } else { - backupsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder addBackups(com.google.cloud.metastore.v1alpha.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder addBackups( - int index, com.google.cloud.metastore.v1alpha.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder addAllBackups( - java.lang.Iterable values) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backups_); - onChanged(); - } else { - backupsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder clearBackups() { - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - backupsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public Builder removeBackups(int index) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.remove(index); - onChanged(); - } else { - backupsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public com.google.cloud.metastore.v1alpha.Backup.Builder getBackupsBuilder(int index) { - return getBackupsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupsOrBuilder(int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); - } else { - return backupsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public java.util.List - getBackupsOrBuilderList() { - if (backupsBuilder_ != null) { - return backupsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(backups_); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public com.google.cloud.metastore.v1alpha.Backup.Builder addBackupsBuilder() { - return getBackupsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance()); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public com.google.cloud.metastore.v1alpha.Backup.Builder addBackupsBuilder(int index) { - return getBackupsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance()); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - public java.util.List - getBackupsBuilderList() { - return getBackupsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Backup, - com.google.cloud.metastore.v1alpha.Backup.Builder, - com.google.cloud.metastore.v1alpha.BackupOrBuilder> - getBackupsFieldBuilder() { - if (backupsBuilder_ == null) { - backupsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Backup, - com.google.cloud.metastore.v1alpha.Backup.Builder, - com.google.cloud.metastore.v1alpha.BackupOrBuilder>( - backups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - backups_ = null; - } - return backupsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListBackupsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListBackupsResponse) - private static final com.google.cloud.metastore.v1alpha.ListBackupsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListBackupsResponse(); - } - - public static com.google.cloud.metastore.v1alpha.ListBackupsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListBackupsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponseOrBuilder.java deleted file mode 100644 index a8bebf3a49c6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ListBackupsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListBackupsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - java.util.List getBackupsList(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - com.google.cloud.metastore.v1alpha.Backup getBackups(int index); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - int getBackupsCount(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - java.util.List - getBackupsOrBuilderList(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; - */ - com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequest.java deleted file mode 100644 index 5b5c20db6b8a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequest.java +++ /dev/null @@ -1,1358 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for ListFederations.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListFederationsRequest} - */ -public final class ListFederationsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListFederationsRequest) - ListFederationsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListFederationsRequest.newBuilder() to construct. - private ListFederationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListFederationsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListFederationsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListFederationsRequest.class, - com.google.cloud.metastore.v1alpha.ListFederationsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location of metastore
-   * federations to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location of metastore
-   * federations to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of federations to return. The response may
-   * contain less than the maximum number. If unspecified, no more than 500
-   * services are returned. The maximum value is 1000; values above 1000 are
-   * changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListFederationsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ListFederationsRequest other = - (com.google.cloud.metastore.v1alpha.ListFederationsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ListFederationsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for ListFederations.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListFederationsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListFederationsRequest) - com.google.cloud.metastore.v1alpha.ListFederationsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListFederationsRequest.class, - com.google.cloud.metastore.v1alpha.ListFederationsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ListFederationsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListFederationsRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ListFederationsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListFederationsRequest build() { - com.google.cloud.metastore.v1alpha.ListFederationsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListFederationsRequest buildPartial() { - com.google.cloud.metastore.v1alpha.ListFederationsRequest result = - new com.google.cloud.metastore.v1alpha.ListFederationsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.ListFederationsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ListFederationsRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ListFederationsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListFederationsRequest other) { - if (other == com.google.cloud.metastore.v1alpha.ListFederationsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListFederationsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListFederationsRequest) - private static final com.google.cloud.metastore.v1alpha.ListFederationsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListFederationsRequest(); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFederationsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListFederationsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequestOrBuilder.java deleted file mode 100644 index ee9392141628..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequestOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ListFederationsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListFederationsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location of metastore
-   * federations to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location of metastore
-   * federations to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of federations to return. The response may
-   * contain less than the maximum number. If unspecified, no more than 500
-   * services are returned. The maximum value is 1000; values above 1000 are
-   * changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponse.java deleted file mode 100644 index d86f06cdfe79..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponse.java +++ /dev/null @@ -1,1405 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Response message for ListFederations
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListFederationsResponse} - */ -public final class ListFederationsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListFederationsResponse) - ListFederationsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListFederationsResponse.newBuilder() to construct. - private ListFederationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListFederationsResponse() { - federations_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListFederationsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListFederationsResponse.class, - com.google.cloud.metastore.v1alpha.ListFederationsResponse.Builder.class); - } - - public static final int FEDERATIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List federations_; - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - @java.lang.Override - public java.util.List getFederationsList() { - return federations_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - @java.lang.Override - public java.util.List - getFederationsOrBuilderList() { - return federations_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - @java.lang.Override - public int getFederationsCount() { - return federations_.size(); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation getFederations(int index) { - return federations_.get(index); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationsOrBuilder(int index) { - return federations_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < federations_.size(); i++) { - output.writeMessage(1, federations_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < federations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, federations_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListFederationsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ListFederationsResponse other = - (com.google.cloud.metastore.v1alpha.ListFederationsResponse) obj; - - if (!getFederationsList().equals(other.getFederationsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFederationsCount() > 0) { - hash = (37 * hash) + FEDERATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFederationsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ListFederationsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for ListFederations
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListFederationsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListFederationsResponse) - com.google.cloud.metastore.v1alpha.ListFederationsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListFederationsResponse.class, - com.google.cloud.metastore.v1alpha.ListFederationsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ListFederationsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (federationsBuilder_ == null) { - federations_ = java.util.Collections.emptyList(); - } else { - federations_ = null; - federationsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListFederationsResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ListFederationsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListFederationsResponse build() { - com.google.cloud.metastore.v1alpha.ListFederationsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListFederationsResponse buildPartial() { - com.google.cloud.metastore.v1alpha.ListFederationsResponse result = - new com.google.cloud.metastore.v1alpha.ListFederationsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1alpha.ListFederationsResponse result) { - if (federationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - federations_ = java.util.Collections.unmodifiableList(federations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.federations_ = federations_; - } else { - result.federations_ = federationsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.ListFederationsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ListFederationsResponse) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ListFederationsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListFederationsResponse other) { - if (other == com.google.cloud.metastore.v1alpha.ListFederationsResponse.getDefaultInstance()) - return this; - if (federationsBuilder_ == null) { - if (!other.federations_.isEmpty()) { - if (federations_.isEmpty()) { - federations_ = other.federations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFederationsIsMutable(); - federations_.addAll(other.federations_); - } - onChanged(); - } - } else { - if (!other.federations_.isEmpty()) { - if (federationsBuilder_.isEmpty()) { - federationsBuilder_.dispose(); - federationsBuilder_ = null; - federations_ = other.federations_; - bitField0_ = (bitField0_ & ~0x00000001); - federationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFederationsFieldBuilder() - : null; - } else { - federationsBuilder_.addAllMessages(other.federations_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1alpha.Federation m = - input.readMessage( - com.google.cloud.metastore.v1alpha.Federation.parser(), extensionRegistry); - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(m); - } else { - federationsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List federations_ = - java.util.Collections.emptyList(); - - private void ensureFederationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - federations_ = - new java.util.ArrayList(federations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder> - federationsBuilder_; - - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public java.util.List getFederationsList() { - if (federationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(federations_); - } else { - return federationsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public int getFederationsCount() { - if (federationsBuilder_ == null) { - return federations_.size(); - } else { - return federationsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public com.google.cloud.metastore.v1alpha.Federation getFederations(int index) { - if (federationsBuilder_ == null) { - return federations_.get(index); - } else { - return federationsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder setFederations(int index, com.google.cloud.metastore.v1alpha.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.set(index, value); - onChanged(); - } else { - federationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder setFederations( - int index, com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.set(index, builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder addFederations(com.google.cloud.metastore.v1alpha.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.add(value); - onChanged(); - } else { - federationsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder addFederations(int index, com.google.cloud.metastore.v1alpha.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.add(index, value); - onChanged(); - } else { - federationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder addFederations( - com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder addFederations( - int index, com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(index, builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder addAllFederations( - java.lang.Iterable values) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, federations_); - onChanged(); - } else { - federationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder clearFederations() { - if (federationsBuilder_ == null) { - federations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - federationsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public Builder removeFederations(int index) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.remove(index); - onChanged(); - } else { - federationsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public com.google.cloud.metastore.v1alpha.Federation.Builder getFederationsBuilder(int index) { - return getFederationsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationsOrBuilder( - int index) { - if (federationsBuilder_ == null) { - return federations_.get(index); - } else { - return federationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public java.util.List - getFederationsOrBuilderList() { - if (federationsBuilder_ != null) { - return federationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(federations_); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public com.google.cloud.metastore.v1alpha.Federation.Builder addFederationsBuilder() { - return getFederationsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public com.google.cloud.metastore.v1alpha.Federation.Builder addFederationsBuilder(int index) { - return getFederationsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - public java.util.List - getFederationsBuilderList() { - return getFederationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder> - getFederationsFieldBuilder() { - if (federationsBuilder_ == null) { - federationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder>( - federations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - federations_ = null; - } - return federationsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListFederationsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListFederationsResponse) - private static final com.google.cloud.metastore.v1alpha.ListFederationsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListFederationsResponse(); - } - - public static com.google.cloud.metastore.v1alpha.ListFederationsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFederationsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListFederationsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponseOrBuilder.java deleted file mode 100644 index 1f1c2d009a44..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ListFederationsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListFederationsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - java.util.List getFederationsList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - com.google.cloud.metastore.v1alpha.Federation getFederations(int index); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - int getFederationsCount(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - java.util.List - getFederationsOrBuilderList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; - */ - com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequest.java deleted file mode 100644 index 0c5f6c923094..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequest.java +++ /dev/null @@ -1,1367 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListMetadataImportsRequest} - */ -public final class ListMetadataImportsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) - ListMetadataImportsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListMetadataImportsRequest.newBuilder() to construct. - private ListMetadataImportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListMetadataImportsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListMetadataImportsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.class, - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of imports to return. The response may contain
-   * less than the maximum number. If unspecified, no more than 500 imports are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest other = - (com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListMetadataImportsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.class, - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest build() { - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest buildPartial() { - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest result = - new com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest other) { - if (other - == com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) - private static final com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest(); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListMetadataImportsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequestOrBuilder.java deleted file mode 100644 index 7675301a55c8..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequestOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ListMetadataImportsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of imports to return. The response may contain
-   * less than the maximum number. If unspecified, no more than 500 imports are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponse.java deleted file mode 100644 index de6441ae7464..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponse.java +++ /dev/null @@ -1,1426 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListMetadataImportsResponse} - */ -public final class ListMetadataImportsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) - ListMetadataImportsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListMetadataImportsResponse.newBuilder() to construct. - private ListMetadataImportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListMetadataImportsResponse() { - metadataImports_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListMetadataImportsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.class, - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.Builder.class); - } - - public static final int METADATA_IMPORTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List metadataImports_; - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public java.util.List - getMetadataImportsList() { - return metadataImports_; - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public java.util.List - getMetadataImportsOrBuilderList() { - return metadataImports_; - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public int getMetadataImportsCount() { - return metadataImports_.size(); - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImports(int index) { - return metadataImports_.get(index); - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportsOrBuilder( - int index) { - return metadataImports_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < metadataImports_.size(); i++) { - output.writeMessage(1, metadataImports_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < metadataImports_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metadataImports_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse other = - (com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse) obj; - - if (!getMetadataImportsList().equals(other.getMetadataImportsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getMetadataImportsCount() > 0) { - hash = (37 * hash) + METADATA_IMPORTS_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImportsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListMetadataImportsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.class, - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (metadataImportsBuilder_ == null) { - metadataImports_ = java.util.Collections.emptyList(); - } else { - metadataImports_ = null; - metadataImportsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse build() { - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse buildPartial() { - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse result = - new com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse result) { - if (metadataImportsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - metadataImports_ = java.util.Collections.unmodifiableList(metadataImports_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.metadataImports_ = metadataImports_; - } else { - result.metadataImports_ = metadataImportsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse other) { - if (other - == com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.getDefaultInstance()) - return this; - if (metadataImportsBuilder_ == null) { - if (!other.metadataImports_.isEmpty()) { - if (metadataImports_.isEmpty()) { - metadataImports_ = other.metadataImports_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMetadataImportsIsMutable(); - metadataImports_.addAll(other.metadataImports_); - } - onChanged(); - } - } else { - if (!other.metadataImports_.isEmpty()) { - if (metadataImportsBuilder_.isEmpty()) { - metadataImportsBuilder_.dispose(); - metadataImportsBuilder_ = null; - metadataImports_ = other.metadataImports_; - bitField0_ = (bitField0_ & ~0x00000001); - metadataImportsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMetadataImportsFieldBuilder() - : null; - } else { - metadataImportsBuilder_.addAllMessages(other.metadataImports_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1alpha.MetadataImport m = - input.readMessage( - com.google.cloud.metastore.v1alpha.MetadataImport.parser(), - extensionRegistry); - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(m); - } else { - metadataImportsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List metadataImports_ = - java.util.Collections.emptyList(); - - private void ensureMetadataImportsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - metadataImports_ = - new java.util.ArrayList( - metadataImports_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> - metadataImportsBuilder_; - - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public java.util.List - getMetadataImportsList() { - if (metadataImportsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metadataImports_); - } else { - return metadataImportsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public int getMetadataImportsCount() { - if (metadataImportsBuilder_ == null) { - return metadataImports_.size(); - } else { - return metadataImportsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImports(int index) { - if (metadataImportsBuilder_ == null) { - return metadataImports_.get(index); - } else { - return metadataImportsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder setMetadataImports( - int index, com.google.cloud.metastore.v1alpha.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.set(index, value); - onChanged(); - } else { - metadataImportsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder setMetadataImports( - int index, com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.set(index, builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports(com.google.cloud.metastore.v1alpha.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.add(value); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - int index, com.google.cloud.metastore.v1alpha.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.add(index, value); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - int index, com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(index, builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder addAllMetadataImports( - java.lang.Iterable values) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metadataImports_); - onChanged(); - } else { - metadataImportsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder clearMetadataImports() { - if (metadataImportsBuilder_ == null) { - metadataImports_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - metadataImportsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public Builder removeMetadataImports(int index) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.remove(index); - onChanged(); - } else { - metadataImportsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1alpha.MetadataImport.Builder getMetadataImportsBuilder( - int index) { - return getMetadataImportsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportsOrBuilder( - int index) { - if (metadataImportsBuilder_ == null) { - return metadataImports_.get(index); - } else { - return metadataImportsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public java.util.List - getMetadataImportsOrBuilderList() { - if (metadataImportsBuilder_ != null) { - return metadataImportsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metadataImports_); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1alpha.MetadataImport.Builder addMetadataImportsBuilder() { - return getMetadataImportsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1alpha.MetadataImport.Builder addMetadataImportsBuilder( - int index) { - return getMetadataImportsFieldBuilder() - .addBuilder( - index, com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - public java.util.List - getMetadataImportsBuilderList() { - return getMetadataImportsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> - getMetadataImportsFieldBuilder() { - if (metadataImportsBuilder_ == null) { - metadataImportsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder>( - metadataImports_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - metadataImports_ = null; - } - return metadataImportsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) - private static final com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse(); - } - - public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListMetadataImportsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponseOrBuilder.java deleted file mode 100644 index ef27c3fb90d9..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ListMetadataImportsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - java.util.List getMetadataImportsList(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImports(int index); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - int getMetadataImportsCount(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - java.util.List - getMetadataImportsOrBuilderList(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; - */ - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequest.java deleted file mode 100644 index a996aac869ed..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequest.java +++ /dev/null @@ -1,1367 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListServicesRequest} - */ -public final class ListServicesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListServicesRequest) - ListServicesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListServicesRequest.newBuilder() to construct. - private ListServicesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListServicesRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListServicesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListServicesRequest.class, - com.google.cloud.metastore.v1alpha.ListServicesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of services to return. The response may
-   * contain less than the maximum number. If unspecified, no more than 500
-   * services are returned. The maximum value is 1000; values above 1000 are
-   * changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListServicesRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ListServicesRequest other = - (com.google.cloud.metastore.v1alpha.ListServicesRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ListServicesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListServicesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListServicesRequest) - com.google.cloud.metastore.v1alpha.ListServicesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListServicesRequest.class, - com.google.cloud.metastore.v1alpha.ListServicesRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ListServicesRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListServicesRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ListServicesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListServicesRequest build() { - com.google.cloud.metastore.v1alpha.ListServicesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListServicesRequest buildPartial() { - com.google.cloud.metastore.v1alpha.ListServicesRequest result = - new com.google.cloud.metastore.v1alpha.ListServicesRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.ListServicesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ListServicesRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ListServicesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListServicesRequest other) { - if (other == com.google.cloud.metastore.v1alpha.ListServicesRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListServicesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListServicesRequest) - private static final com.google.cloud.metastore.v1alpha.ListServicesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListServicesRequest(); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListServicesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListServicesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequestOrBuilder.java deleted file mode 100644 index 1179e57ac9a3..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ListServicesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListServicesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of services to return. The response may
-   * contain less than the maximum number. If unspecified, no more than 500
-   * services are returned. The maximum value is 1000; values above 1000 are
-   * changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponse.java deleted file mode 100644 index 6589fb4f1ecc..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponse.java +++ /dev/null @@ -1,1404 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListServicesResponse} - */ -public final class ListServicesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListServicesResponse) - ListServicesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListServicesResponse.newBuilder() to construct. - private ListServicesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListServicesResponse() { - services_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListServicesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListServicesResponse.class, - com.google.cloud.metastore.v1alpha.ListServicesResponse.Builder.class); - } - - public static final int SERVICES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List services_; - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - @java.lang.Override - public java.util.List getServicesList() { - return services_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - @java.lang.Override - public java.util.List - getServicesOrBuilderList() { - return services_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - @java.lang.Override - public int getServicesCount() { - return services_.size(); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service getServices(int index) { - return services_.get(index); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServicesOrBuilder(int index) { - return services_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < services_.size(); i++) { - output.writeMessage(1, services_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < services_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListServicesResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.ListServicesResponse other = - (com.google.cloud.metastore.v1alpha.ListServicesResponse) obj; - - if (!getServicesList().equals(other.getServicesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getServicesCount() > 0) { - hash = (37 * hash) + SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getServicesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.ListServicesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.ListServicesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListServicesResponse) - com.google.cloud.metastore.v1alpha.ListServicesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.ListServicesResponse.class, - com.google.cloud.metastore.v1alpha.ListServicesResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.ListServicesResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - } else { - services_ = null; - servicesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListServicesResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.ListServicesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListServicesResponse build() { - com.google.cloud.metastore.v1alpha.ListServicesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListServicesResponse buildPartial() { - com.google.cloud.metastore.v1alpha.ListServicesResponse result = - new com.google.cloud.metastore.v1alpha.ListServicesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1alpha.ListServicesResponse result) { - if (servicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - services_ = java.util.Collections.unmodifiableList(services_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.services_ = services_; - } else { - result.services_ = servicesBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.ListServicesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.ListServicesResponse) { - return mergeFrom((com.google.cloud.metastore.v1alpha.ListServicesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListServicesResponse other) { - if (other == com.google.cloud.metastore.v1alpha.ListServicesResponse.getDefaultInstance()) - return this; - if (servicesBuilder_ == null) { - if (!other.services_.isEmpty()) { - if (services_.isEmpty()) { - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServicesIsMutable(); - services_.addAll(other.services_); - } - onChanged(); - } - } else { - if (!other.services_.isEmpty()) { - if (servicesBuilder_.isEmpty()) { - servicesBuilder_.dispose(); - servicesBuilder_ = null; - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - servicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getServicesFieldBuilder() - : null; - } else { - servicesBuilder_.addAllMessages(other.services_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1alpha.Service m = - input.readMessage( - com.google.cloud.metastore.v1alpha.Service.parser(), extensionRegistry); - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(m); - } else { - servicesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List services_ = - java.util.Collections.emptyList(); - - private void ensureServicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - services_ = new java.util.ArrayList(services_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder> - servicesBuilder_; - - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public java.util.List getServicesList() { - if (servicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(services_); - } else { - return servicesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public int getServicesCount() { - if (servicesBuilder_ == null) { - return services_.size(); - } else { - return servicesBuilder_.getCount(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public com.google.cloud.metastore.v1alpha.Service getServices(int index) { - if (servicesBuilder_ == null) { - return services_.get(index); - } else { - return servicesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder setServices(int index, com.google.cloud.metastore.v1alpha.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.set(index, value); - onChanged(); - } else { - servicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder setServices( - int index, com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.set(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder addServices(com.google.cloud.metastore.v1alpha.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(value); - onChanged(); - } else { - servicesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder addServices(int index, com.google.cloud.metastore.v1alpha.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(index, value); - onChanged(); - } else { - servicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder addServices(com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder addServices( - int index, com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder addAllServices( - java.lang.Iterable values) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, services_); - onChanged(); - } else { - servicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder clearServices() { - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - servicesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public Builder removeServices(int index) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.remove(index); - onChanged(); - } else { - servicesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public com.google.cloud.metastore.v1alpha.Service.Builder getServicesBuilder(int index) { - return getServicesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServicesOrBuilder(int index) { - if (servicesBuilder_ == null) { - return services_.get(index); - } else { - return servicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public java.util.List - getServicesOrBuilderList() { - if (servicesBuilder_ != null) { - return servicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(services_); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public com.google.cloud.metastore.v1alpha.Service.Builder addServicesBuilder() { - return getServicesFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public com.google.cloud.metastore.v1alpha.Service.Builder addServicesBuilder(int index) { - return getServicesFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - public java.util.List - getServicesBuilderList() { - return getServicesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder> - getServicesFieldBuilder() { - if (servicesBuilder_ == null) { - servicesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder>( - services_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - services_ = null; - } - return servicesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListServicesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListServicesResponse) - private static final com.google.cloud.metastore.v1alpha.ListServicesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListServicesResponse(); - } - - public static com.google.cloud.metastore.v1alpha.ListServicesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListServicesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ListServicesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponseOrBuilder.java deleted file mode 100644 index cd62acf17eef..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ListServicesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListServicesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - java.util.List getServicesList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - com.google.cloud.metastore.v1alpha.Service getServices(int index); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - int getServicesCount(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - java.util.List - getServicesOrBuilderList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1alpha.Service services = 1; - */ - com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServicesOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadata.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadata.java deleted file mode 100644 index 5de9e514d7ac..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadata.java +++ /dev/null @@ -1,1858 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Metadata about the service in a location.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.LocationMetadata} - */ -public final class LocationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.LocationMetadata) - LocationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use LocationMetadata.newBuilder() to construct. - private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private LocationMetadata() { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new LocationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.LocationMetadata.class, - com.google.cloud.metastore.v1alpha.LocationMetadata.Builder.class); - } - - public interface HiveMetastoreVersionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-     * Whether `version` will be chosen by the server if a metastore service is
-     * created with a `HiveMetastoreConfig` that omits the `version`.
-     * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - boolean getIsDefault(); - } - /** - * - * - *
-   * A specification of a supported version of the Hive Metastore software.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} - */ - public static final class HiveMetastoreVersion extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) - HiveMetastoreVersionOrBuilder { - private static final long serialVersionUID = 0L; - // Use HiveMetastoreVersion.newBuilder() to construct. - private HiveMetastoreVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HiveMetastoreVersion() { - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HiveMetastoreVersion(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.class, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder - .class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IS_DEFAULT_FIELD_NUMBER = 2; - private boolean isDefault_ = false; - /** - * - * - *
-     * Whether `version` will be chosen by the server if a metastore service is
-     * created with a `HiveMetastoreConfig` that omits the `version`.
-     * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - @java.lang.Override - public boolean getIsDefault() { - return isDefault_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (isDefault_ != false) { - output.writeBool(2, isDefault_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (isDefault_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isDefault_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion other = - (com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (getIsDefault() != other.getIsDefault()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A specification of a supported version of the Hive Metastore software.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.class, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder - .class); - } - - // Construct using - // com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - isDefault_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion build() { - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - buildPartial() { - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion result = - new com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.isDefault_ = isDefault_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) { - return mergeFrom( - (com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion other) { - if (other - == com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getIsDefault() != false) { - setIsDefault(other.getIsDefault()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - isDefault_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private boolean isDefault_; - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - @java.lang.Override - public boolean getIsDefault() { - return isDefault_; - } - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @param value The isDefault to set. - * @return This builder for chaining. - */ - public Builder setIsDefault(boolean value) { - - isDefault_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @return This builder for chaining. - */ - public Builder clearIsDefault() { - bitField0_ = (bitField0_ & ~0x00000002); - isDefault_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) - private static final com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion(); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HiveMetastoreVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List - supportedHiveMetastoreVersions_; - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public java.util.List - getSupportedHiveMetastoreVersionsList() { - return supportedHiveMetastoreVersions_; - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList() { - return supportedHiveMetastoreVersions_; - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public int getSupportedHiveMetastoreVersionsCount() { - return supportedHiveMetastoreVersions_.size(); - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index) { - return supportedHiveMetastoreVersions_.get(index); - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index) { - return supportedHiveMetastoreVersions_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { - output.writeMessage(1, supportedHiveMetastoreVersions_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, supportedHiveMetastoreVersions_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.LocationMetadata)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.LocationMetadata other = - (com.google.cloud.metastore.v1alpha.LocationMetadata) obj; - - if (!getSupportedHiveMetastoreVersionsList() - .equals(other.getSupportedHiveMetastoreVersionsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSupportedHiveMetastoreVersionsCount() > 0) { - hash = (37 * hash) + SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getSupportedHiveMetastoreVersionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.LocationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Metadata about the service in a location.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.LocationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.LocationMetadata) - com.google.cloud.metastore.v1alpha.LocationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.LocationMetadata.class, - com.google.cloud.metastore.v1alpha.LocationMetadata.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.LocationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - } else { - supportedHiveMetastoreVersions_ = null; - supportedHiveMetastoreVersionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_LocationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.LocationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata build() { - com.google.cloud.metastore.v1alpha.LocationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata buildPartial() { - com.google.cloud.metastore.v1alpha.LocationMetadata result = - new com.google.cloud.metastore.v1alpha.LocationMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1alpha.LocationMetadata result) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - supportedHiveMetastoreVersions_ = - java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersions_; - } else { - result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersionsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.LocationMetadata result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.LocationMetadata) { - return mergeFrom((com.google.cloud.metastore.v1alpha.LocationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.LocationMetadata other) { - if (other == com.google.cloud.metastore.v1alpha.LocationMetadata.getDefaultInstance()) - return this; - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (!other.supportedHiveMetastoreVersions_.isEmpty()) { - if (supportedHiveMetastoreVersions_.isEmpty()) { - supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.addAll(other.supportedHiveMetastoreVersions_); - } - onChanged(); - } - } else { - if (!other.supportedHiveMetastoreVersions_.isEmpty()) { - if (supportedHiveMetastoreVersionsBuilder_.isEmpty()) { - supportedHiveMetastoreVersionsBuilder_.dispose(); - supportedHiveMetastoreVersionsBuilder_ = null; - supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - supportedHiveMetastoreVersionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSupportedHiveMetastoreVersionsFieldBuilder() - : null; - } else { - supportedHiveMetastoreVersionsBuilder_.addAllMessages( - other.supportedHiveMetastoreVersions_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion m = - input.readMessage( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - .parser(), - extensionRegistry); - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(m); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - - private void ensureSupportedHiveMetastoreVersionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - supportedHiveMetastoreVersions_ = - new java.util.ArrayList< - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion>( - supportedHiveMetastoreVersions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder> - supportedHiveMetastoreVersionsBuilder_; - - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List - getSupportedHiveMetastoreVersionsList() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public int getSupportedHiveMetastoreVersionsCount() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.size(); - } else { - return supportedHiveMetastoreVersionsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.get(index); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder setSupportedHiveMetastoreVersions( - int index, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.set(index, value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder setSupportedHiveMetastoreVersions( - int index, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.set(index, builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - int index, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(index, value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - int index, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(index, builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addAllSupportedHiveMetastoreVersions( - java.lang.Iterable< - ? extends com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion> - values) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, supportedHiveMetastoreVersions_); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder clearSupportedHiveMetastoreVersions() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder removeSupportedHiveMetastoreVersions(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.remove(index); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder - getSupportedHiveMetastoreVersionsBuilder(int index) { - return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.get(index); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList() { - if (supportedHiveMetastoreVersionsBuilder_ != null) { - return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder - addSupportedHiveMetastoreVersionsBuilder() { - return getSupportedHiveMetastoreVersionsFieldBuilder() - .addBuilder( - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder - addSupportedHiveMetastoreVersionsBuilder(int index) { - return getSupportedHiveMetastoreVersionsFieldBuilder() - .addBuilder( - index, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List< - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder> - getSupportedHiveMetastoreVersionsBuilderList() { - return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsFieldBuilder() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder>( - supportedHiveMetastoreVersions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - supportedHiveMetastoreVersions_ = null; - } - return supportedHiveMetastoreVersionsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.LocationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.LocationMetadata) - private static final com.google.cloud.metastore.v1alpha.LocationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.LocationMetadata(); - } - - public static com.google.cloud.metastore.v1alpha.LocationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.LocationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadataOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadataOrBuilder.java deleted file mode 100644 index 5325c16a3073..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadataOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface LocationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.LocationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - java.util.List - getSupportedHiveMetastoreVersionsList(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - int getSupportedHiveMetastoreVersionsCount(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindow.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindow.java deleted file mode 100644 index 66200fa0206c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindow.java +++ /dev/null @@ -1,855 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Maintenance window. This specifies when Dataproc Metastore
- * may perform system maintenance operation to the service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MaintenanceWindow} - */ -public final class MaintenanceWindow extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MaintenanceWindow) - MaintenanceWindowOrBuilder { - private static final long serialVersionUID = 0L; - // Use MaintenanceWindow.newBuilder() to construct. - private MaintenanceWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MaintenanceWindow() { - dayOfWeek_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MaintenanceWindow(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MaintenanceWindow.class, - com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder.class); - } - - public static final int HOUR_OF_DAY_FIELD_NUMBER = 1; - private com.google.protobuf.Int32Value hourOfDay_; - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - @java.lang.Override - public boolean hasHourOfDay() { - return hourOfDay_ != null; - } - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - @java.lang.Override - public com.google.protobuf.Int32Value getHourOfDay() { - return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; - } - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - @java.lang.Override - public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { - return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; - } - - public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; - private int dayOfWeek_ = 0; - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - @java.lang.Override - public int getDayOfWeekValue() { - return dayOfWeek_; - } - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - @java.lang.Override - public com.google.type.DayOfWeek getDayOfWeek() { - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (hourOfDay_ != null) { - output.writeMessage(1, getHourOfDay()); - } - if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { - output.writeEnum(2, dayOfWeek_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hourOfDay_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHourOfDay()); - } - if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, dayOfWeek_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.MaintenanceWindow)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.MaintenanceWindow other = - (com.google.cloud.metastore.v1alpha.MaintenanceWindow) obj; - - if (hasHourOfDay() != other.hasHourOfDay()) return false; - if (hasHourOfDay()) { - if (!getHourOfDay().equals(other.getHourOfDay())) return false; - } - if (dayOfWeek_ != other.dayOfWeek_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHourOfDay()) { - hash = (37 * hash) + HOUR_OF_DAY_FIELD_NUMBER; - hash = (53 * hash) + getHourOfDay().hashCode(); - } - hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; - hash = (53 * hash) + dayOfWeek_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MaintenanceWindow prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Maintenance window. This specifies when Dataproc Metastore
-   * may perform system maintenance operation to the service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MaintenanceWindow} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MaintenanceWindow) - com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MaintenanceWindow.class, - com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.MaintenanceWindow.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hourOfDay_ = null; - if (hourOfDayBuilder_ != null) { - hourOfDayBuilder_.dispose(); - hourOfDayBuilder_ = null; - } - dayOfWeek_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MaintenanceWindow getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MaintenanceWindow build() { - com.google.cloud.metastore.v1alpha.MaintenanceWindow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MaintenanceWindow buildPartial() { - com.google.cloud.metastore.v1alpha.MaintenanceWindow result = - new com.google.cloud.metastore.v1alpha.MaintenanceWindow(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.MaintenanceWindow result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hourOfDay_ = hourOfDayBuilder_ == null ? hourOfDay_ : hourOfDayBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dayOfWeek_ = dayOfWeek_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.MaintenanceWindow) { - return mergeFrom((com.google.cloud.metastore.v1alpha.MaintenanceWindow) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MaintenanceWindow other) { - if (other == com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance()) - return this; - if (other.hasHourOfDay()) { - mergeHourOfDay(other.getHourOfDay()); - } - if (other.dayOfWeek_ != 0) { - setDayOfWeekValue(other.getDayOfWeekValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getHourOfDayFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - dayOfWeek_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Int32Value hourOfDay_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder> - hourOfDayBuilder_; - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - public boolean hasHourOfDay() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - public com.google.protobuf.Int32Value getHourOfDay() { - if (hourOfDayBuilder_ == null) { - return hourOfDay_ == null - ? com.google.protobuf.Int32Value.getDefaultInstance() - : hourOfDay_; - } else { - return hourOfDayBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder setHourOfDay(com.google.protobuf.Int32Value value) { - if (hourOfDayBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hourOfDay_ = value; - } else { - hourOfDayBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder setHourOfDay(com.google.protobuf.Int32Value.Builder builderForValue) { - if (hourOfDayBuilder_ == null) { - hourOfDay_ = builderForValue.build(); - } else { - hourOfDayBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder mergeHourOfDay(com.google.protobuf.Int32Value value) { - if (hourOfDayBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && hourOfDay_ != null - && hourOfDay_ != com.google.protobuf.Int32Value.getDefaultInstance()) { - getHourOfDayBuilder().mergeFrom(value); - } else { - hourOfDay_ = value; - } - } else { - hourOfDayBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder clearHourOfDay() { - bitField0_ = (bitField0_ & ~0x00000001); - hourOfDay_ = null; - if (hourOfDayBuilder_ != null) { - hourOfDayBuilder_.dispose(); - hourOfDayBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public com.google.protobuf.Int32Value.Builder getHourOfDayBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHourOfDayFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { - if (hourOfDayBuilder_ != null) { - return hourOfDayBuilder_.getMessageOrBuilder(); - } else { - return hourOfDay_ == null - ? com.google.protobuf.Int32Value.getDefaultInstance() - : hourOfDay_; - } - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder> - getHourOfDayFieldBuilder() { - if (hourOfDayBuilder_ == null) { - hourOfDayBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder>( - getHourOfDay(), getParentForChildren(), isClean()); - hourOfDay_ = null; - } - return hourOfDayBuilder_; - } - - private int dayOfWeek_ = 0; - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - @java.lang.Override - public int getDayOfWeekValue() { - return dayOfWeek_; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @param value The enum numeric value on the wire for dayOfWeek to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeekValue(int value) { - dayOfWeek_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - @java.lang.Override - public com.google.type.DayOfWeek getDayOfWeek() { - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @param value The dayOfWeek to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeek(com.google.type.DayOfWeek value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - dayOfWeek_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return This builder for chaining. - */ - public Builder clearDayOfWeek() { - bitField0_ = (bitField0_ & ~0x00000002); - dayOfWeek_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MaintenanceWindow) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MaintenanceWindow) - private static final com.google.cloud.metastore.v1alpha.MaintenanceWindow DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MaintenanceWindow(); - } - - public static com.google.cloud.metastore.v1alpha.MaintenanceWindow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MaintenanceWindow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MaintenanceWindow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindowOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindowOrBuilder.java deleted file mode 100644 index ffbd29c58300..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindowOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface MaintenanceWindowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MaintenanceWindow) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - boolean hasHourOfDay(); - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - com.google.protobuf.Int32Value getHourOfDay(); - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder(); - - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - int getDayOfWeekValue(); - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - com.google.type.DayOfWeek getDayOfWeek(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExport.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExport.java deleted file mode 100644 index e00fbef4434f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExport.java +++ /dev/null @@ -1,1862 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * The details of a metadata export operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataExport} - */ -public final class MetadataExport extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataExport) - MetadataExportOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataExport.newBuilder() to construct. - private MetadataExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataExport() { - state_ = 0; - databaseDumpType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataExport(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataExport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataExport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataExport.class, - com.google.cloud.metastore.v1alpha.MetadataExport.Builder.class); - } - - /** - * - * - *
-   * The current state of the metadata export.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.MetadataExport.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata export is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata export is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata export completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata export failed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - * - * - *
-     * The metadata export is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata export is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata export is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata export completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata export failed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - * - * - *
-     * The metadata export is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return FAILED; - case 4: - return CANCELLED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetadataExport.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.MetadataExport.State) - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DESTINATION_GCS_URI(4), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 4: - return DESTINATION_GCS_URI; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int DESTINATION_GCS_URI_FIELD_NUMBER = 4; - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - public boolean hasDestinationGcsUri() { - return destinationCase_ == 4; - } - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - public java.lang.String getDestinationGcsUri() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 4) { - destination_ = s; - } - return s; - } - } - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - public com.google.protobuf.ByteString getDestinationGcsUriBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 4) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataExport.State getState() { - com.google.cloud.metastore.v1alpha.MetadataExport.State result = - com.google.cloud.metastore.v1alpha.MetadataExport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1alpha.MetadataExport.State.UNRECOGNIZED - : result; - } - - public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 5; - private int databaseDumpType_ = 0; - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (state_ - != com.google.cloud.metastore.v1alpha.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (destinationCase_ == 4) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destination_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, databaseDumpType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (state_ - != com.google.cloud.metastore.v1alpha.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); - } - if (destinationCase_ == 4) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destination_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, databaseDumpType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataExport)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.MetadataExport other = - (com.google.cloud.metastore.v1alpha.MetadataExport) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (databaseDumpType_ != other.databaseDumpType_) return false; - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 4: - if (!getDestinationGcsUri().equals(other.getDestinationGcsUri())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseDumpType_; - switch (destinationCase_) { - case 4: - hash = (37 * hash) + DESTINATION_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getDestinationGcsUri().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MetadataExport prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a metadata export operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataExport} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataExport) - com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataExport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataExport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataExport.class, - com.google.cloud.metastore.v1alpha.MetadataExport.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.MetadataExport.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - databaseDumpType_ = 0; - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataExport_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataExport getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.MetadataExport.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataExport build() { - com.google.cloud.metastore.v1alpha.MetadataExport result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataExport buildPartial() { - com.google.cloud.metastore.v1alpha.MetadataExport result = - new com.google.cloud.metastore.v1alpha.MetadataExport(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.MetadataExport result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.databaseDumpType_ = databaseDumpType_; - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.MetadataExport result) { - result.destinationCase_ = destinationCase_; - result.destination_ = this.destination_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.MetadataExport) { - return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataExport) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataExport other) { - if (other == com.google.cloud.metastore.v1alpha.MetadataExport.getDefaultInstance()) - return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.databaseDumpType_ != 0) { - setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); - } - switch (other.getDestinationCase()) { - case DESTINATION_GCS_URI: - { - destinationCase_ = 4; - destination_ = other.destination_; - onChanged(); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 24: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 24 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 4; - destination_ = s; - break; - } // case 34 - case 40: - { - databaseDumpType_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - @java.lang.Override - public boolean hasDestinationGcsUri() { - return destinationCase_ == 4; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - @java.lang.Override - public java.lang.String getDestinationGcsUri() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 4) { - destination_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDestinationGcsUriBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 4) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The destinationGcsUri to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationCase_ = 4; - destination_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDestinationGcsUri() { - if (destinationCase_ == 4) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for destinationGcsUri to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - destinationCase_ = 4; - destination_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && startTime_ != null - && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000002); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000004); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataExport.State getState() { - com.google.cloud.metastore.v1alpha.MetadataExport.State result = - com.google.cloud.metastore.v1alpha.MetadataExport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1alpha.MetadataExport.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1alpha.MetadataExport.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000008); - state_ = 0; - onChanged(); - return this; - } - - private int databaseDumpType_ = 0; - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpTypeValue(int value) { - databaseDumpType_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpType( - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - databaseDumpType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseDumpType() { - bitField0_ = (bitField0_ & ~0x00000010); - databaseDumpType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataExport) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataExport) - private static final com.google.cloud.metastore.v1alpha.MetadataExport DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataExport(); - } - - public static com.google.cloud.metastore.v1alpha.MetadataExport getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataExport parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataExport getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExportOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExportOrBuilder.java deleted file mode 100644 index 84265ec4f5c9..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExportOrBuilder.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface MetadataExportOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataExport) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - boolean hasDestinationGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - java.lang.String getDestinationGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - com.google.protobuf.ByteString getDestinationGcsUriBytes(); - - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1alpha.MetadataExport.State getState(); - - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - int getDatabaseDumpTypeValue(); - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType(); - - public com.google.cloud.metastore.v1alpha.MetadataExport.DestinationCase getDestinationCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImport.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImport.java deleted file mode 100644 index 6843fac8e0ec..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImport.java +++ /dev/null @@ -1,3905 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * A metastore resource that imports metadata.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataImport} - */ -public final class MetadataImport extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataImport) - MetadataImportOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataImport.newBuilder() to construct. - private MetadataImport(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataImport() { - name_ = ""; - description_ = ""; - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataImport(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataImport.class, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder.class); - } - - /** - * - * - *
-   * The current state of the metadata import.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.MetadataImport.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata import is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata import is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata import completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata import is being updated.
-     * 
- * - * UPDATING = 3; - */ - UPDATING(3), - /** - * - * - *
-     * The metadata import failed, and attempted metadata changes were rolled
-     * back.
-     * 
- * - * FAILED = 4; - */ - FAILED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata import is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata import is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata import completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata import is being updated.
-     * 
- * - * UPDATING = 3; - */ - public static final int UPDATING_VALUE = 3; - /** - * - * - *
-     * The metadata import failed, and attempted metadata changes were rolled
-     * back.
-     * 
- * - * FAILED = 4; - */ - public static final int FAILED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return UPDATING; - case 4: - return FAILED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetadataImport.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.MetadataImport.State) - } - - public interface DatabaseDumpOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Deprecated - int getDatabaseTypeValue(); - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @return The databaseType. - */ - @java.lang.Deprecated - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType getDatabaseType(); - - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - java.lang.String getGcsUri(); - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - com.google.protobuf.ByteString getGcsUriBytes(); - - /** - * - * - *
-     * The name of the source database.
-     * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @return The sourceDatabase. - */ - @java.lang.Deprecated - java.lang.String getSourceDatabase(); - /** - * - * - *
-     * The name of the source database.
-     * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @return The bytes for sourceDatabase. - */ - @java.lang.Deprecated - com.google.protobuf.ByteString getSourceDatabaseBytes(); - - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getType(); - } - /** - * - * - *
-   * A specification of the location of and metadata about a database dump from
-   * a relational database management system.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} - */ - public static final class DatabaseDump extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) - DatabaseDumpOrBuilder { - private static final long serialVersionUID = 0L; - // Use DatabaseDump.newBuilder() to construct. - private DatabaseDump(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DatabaseDump() { - databaseType_ = 0; - gcsUri_ = ""; - sourceDatabase_ = ""; - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DatabaseDump(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.class, - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder.class); - } - - /** - * - * - *
-     * The type of the database.
-     * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType} - */ - public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * The type of the source database is unknown.
-       * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - DATABASE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-       * The type of the source database is MySQL.
-       * 
- * - * MYSQL = 1; - */ - MYSQL(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * The type of the source database is unknown.
-       * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * The type of the source database is MySQL.
-       * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DatabaseType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DatabaseType forNumber(int value) { - switch (value) { - case 0: - return DATABASE_TYPE_UNSPECIFIED; - case 1: - return MYSQL; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DatabaseType findValueByNumber(int number) { - return DatabaseType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final DatabaseType[] VALUES = values(); - - public static DatabaseType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DatabaseType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType) - } - - public static final int DATABASE_TYPE_FIELD_NUMBER = 1; - private int databaseType_ = 0; - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @return The databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType - getDatabaseType() { - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType result = - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.forNumber( - databaseType_); - return result == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED - : result; - } - - public static final int GCS_URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object gcsUri_ = ""; - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - @java.lang.Override - public java.lang.String getGcsUri() { - java.lang.Object ref = gcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsUri_ = s; - return s; - } - } - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGcsUriBytes() { - java.lang.Object ref = gcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_DATABASE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object sourceDatabase_ = ""; - /** - * - * - *
-     * The name of the source database.
-     * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @return The sourceDatabase. - */ - @java.lang.Override - @java.lang.Deprecated - public java.lang.String getSourceDatabase() { - java.lang.Object ref = sourceDatabase_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceDatabase_ = s; - return s; - } - } - /** - * - * - *
-     * The name of the source database.
-     * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @return The bytes for sourceDatabase. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.protobuf.ByteString getSourceDatabaseBytes() { - java.lang.Object ref = sourceDatabase_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceDatabase_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 4; - private int type_ = 0; - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getType() { - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (databaseType_ - != com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType - .DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, databaseType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceDatabase_); - } - if (type_ - != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, type_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (databaseType_ - != com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType - .DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, databaseType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceDatabase_); - } - if (type_ - != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump other = - (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) obj; - - if (databaseType_ != other.databaseType_) return false; - if (!getGcsUri().equals(other.getGcsUri())) return false; - if (!getSourceDatabase().equals(other.getSourceDatabase())) return false; - if (type_ != other.type_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseType_; - hash = (37 * hash) + GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getGcsUri().hashCode(); - hash = (37 * hash) + SOURCE_DATABASE_FIELD_NUMBER; - hash = (53 * hash) + getSourceDatabase().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A specification of the location of and metadata about a database dump from
-     * a relational database management system.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.class, - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - databaseType_ = 0; - gcsUri_ = ""; - sourceDatabase_ = ""; - type_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump build() { - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump buildPartial() { - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump result = - new com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.databaseType_ = databaseType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.gcsUri_ = gcsUri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.sourceDatabase_ = sourceDatabase_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.type_ = type_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) { - return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump other) { - if (other - == com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance()) - return this; - if (other.databaseType_ != 0) { - setDatabaseTypeValue(other.getDatabaseTypeValue()); - } - if (!other.getGcsUri().isEmpty()) { - gcsUri_ = other.gcsUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getSourceDatabase().isEmpty()) { - sourceDatabase_ = other.sourceDatabase_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - databaseType_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - gcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - sourceDatabase_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int databaseType_ = 0; - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @param value The enum numeric value on the wire for databaseType to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setDatabaseTypeValue(int value) { - databaseType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @return The databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType - getDatabaseType() { - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType result = - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.forNumber( - databaseType_); - return result == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType - .UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @param value The databaseType to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setDatabaseType( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - databaseType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=691 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearDatabaseType() { - bitField0_ = (bitField0_ & ~0x00000001); - databaseType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object gcsUri_ = ""; - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - public java.lang.String getGcsUri() { - java.lang.Object ref = gcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - public com.google.protobuf.ByteString getGcsUriBytes() { - java.lang.Object ref = gcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @param value The gcsUri to set. - * @return This builder for chaining. - */ - public Builder setGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - gcsUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearGcsUri() { - gcsUri_ = getDefaultInstance().getGcsUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @param value The bytes for gcsUri to set. - * @return This builder for chaining. - */ - public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - gcsUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object sourceDatabase_ = ""; - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @return The sourceDatabase. - */ - @java.lang.Deprecated - public java.lang.String getSourceDatabase() { - java.lang.Object ref = sourceDatabase_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceDatabase_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @return The bytes for sourceDatabase. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getSourceDatabaseBytes() { - java.lang.Object ref = sourceDatabase_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceDatabase_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @param value The sourceDatabase to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setSourceDatabase(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceDatabase_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearSourceDatabase() { - sourceDatabase_ = getDefaultInstance().getSourceDatabase(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1alpha/metastore.proto;l=698 - * @param value The bytes for sourceDatabase to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setSourceDatabaseBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceDatabase_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getType() { - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000008); - type_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) - private static final com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump(); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DatabaseDump parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int metadataCase_ = 0; - private java.lang.Object metadata_; - - public enum MetadataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DATABASE_DUMP(6), - METADATA_NOT_SET(0); - private final int value; - - private MetadataCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetadataCase valueOf(int value) { - return forNumber(value); - } - - public static MetadataCase forNumber(int value) { - switch (value) { - case 6: - return DATABASE_DUMP; - case 0: - return METADATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MetadataCase getMetadataCase() { - return MetadataCase.forNumber(metadataCase_); - } - - public static final int DATABASE_DUMP_FIELD_NUMBER = 6; - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - @java.lang.Override - public boolean hasDatabaseDump() { - return metadataCase_ == 6; - } - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDatabaseDump() { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); - } - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder - getDatabaseDumpOrBuilder() { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 5; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.State getState() { - com.google.cloud.metastore.v1alpha.MetadataImport.State result = - com.google.cloud.metastore.v1alpha.MetadataImport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.State.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (createTime_ != null) { - output.writeMessage(3, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(4, getUpdateTime()); - } - if (state_ - != com.google.cloud.metastore.v1alpha.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, state_); - } - if (metadataCase_ == 6) { - output.writeMessage( - 6, (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_); - } - if (endTime_ != null) { - output.writeMessage(7, getEndTime()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); - } - if (state_ - != com.google.cloud.metastore.v1alpha.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); - } - if (metadataCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEndTime()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataImport)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.MetadataImport other = - (com.google.cloud.metastore.v1alpha.MetadataImport) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (!getMetadataCase().equals(other.getMetadataCase())) return false; - switch (metadataCase_) { - case 6: - if (!getDatabaseDump().equals(other.getDatabaseDump())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - switch (metadataCase_) { - case 6: - hash = (37 * hash) + DATABASE_DUMP_FIELD_NUMBER; - hash = (53 * hash) + getDatabaseDump().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MetadataImport prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A metastore resource that imports metadata.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataImport} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataImport) - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataImport.class, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.MetadataImport.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (databaseDumpBuilder_ != null) { - databaseDumpBuilder_.clear(); - } - name_ = ""; - description_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - metadataCase_ = 0; - metadata_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataImport_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport build() { - com.google.cloud.metastore.v1alpha.MetadataImport result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport buildPartial() { - com.google.cloud.metastore.v1alpha.MetadataImport result = - new com.google.cloud.metastore.v1alpha.MetadataImport(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.MetadataImport result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.state_ = state_; - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.MetadataImport result) { - result.metadataCase_ = metadataCase_; - result.metadata_ = this.metadata_; - if (metadataCase_ == 6 && databaseDumpBuilder_ != null) { - result.metadata_ = databaseDumpBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.MetadataImport) { - return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataImport) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataImport other) { - if (other == com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - switch (other.getMetadataCase()) { - case DATABASE_DUMP: - { - mergeDatabaseDump(other.getDatabaseDump()); - break; - } - case METADATA_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 40: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 40 - case 50: - { - input.readMessage(getDatabaseDumpFieldBuilder().getBuilder(), extensionRegistry); - metadataCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int metadataCase_ = 0; - private java.lang.Object metadata_; - - public MetadataCase getMetadataCase() { - return MetadataCase.forNumber(metadataCase_); - } - - public Builder clearMetadata() { - metadataCase_ = 0; - metadata_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder> - databaseDumpBuilder_; - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - @java.lang.Override - public boolean hasDatabaseDump() { - return metadataCase_ == 6; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDatabaseDump() { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); - } else { - if (metadataCase_ == 6) { - return databaseDumpBuilder_.getMessage(); - } - return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); - } - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setDatabaseDump( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump value) { - if (databaseDumpBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - onChanged(); - } else { - databaseDumpBuilder_.setMessage(value); - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setDatabaseDump( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder builderForValue) { - if (databaseDumpBuilder_ == null) { - metadata_ = builderForValue.build(); - onChanged(); - } else { - databaseDumpBuilder_.setMessage(builderForValue.build()); - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeDatabaseDump( - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump value) { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6 - && metadata_ - != com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump - .getDefaultInstance()) { - metadata_ = - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.newBuilder( - (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_) - .mergeFrom(value) - .buildPartial(); - } else { - metadata_ = value; - } - onChanged(); - } else { - if (metadataCase_ == 6) { - databaseDumpBuilder_.mergeFrom(value); - } else { - databaseDumpBuilder_.setMessage(value); - } - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearDatabaseDump() { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6) { - metadataCase_ = 0; - metadata_ = null; - onChanged(); - } - } else { - if (metadataCase_ == 6) { - metadataCase_ = 0; - metadata_ = null; - } - databaseDumpBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder - getDatabaseDumpBuilder() { - return getDatabaseDumpFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder - getDatabaseDumpOrBuilder() { - if ((metadataCase_ == 6) && (databaseDumpBuilder_ != null)) { - return databaseDumpBuilder_.getMessageOrBuilder(); - } else { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); - } - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder> - getDatabaseDumpFieldBuilder() { - if (databaseDumpBuilder_ == null) { - if (!(metadataCase_ == 6)) { - metadata_ = - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); - } - databaseDumpBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder>( - (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_, - getParentForChildren(), - isClean()); - metadata_ = null; - } - metadataCase_ = 6; - onChanged(); - return databaseDumpBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000010); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000020); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport.State getState() { - com.google.cloud.metastore.v1alpha.MetadataImport.State result = - com.google.cloud.metastore.v1alpha.MetadataImport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1alpha.MetadataImport.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000040); - state_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataImport) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataImport) - private static final com.google.cloud.metastore.v1alpha.MetadataImport DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataImport(); - } - - public static com.google.cloud.metastore.v1alpha.MetadataImport getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataImport parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportOrBuilder.java deleted file mode 100644 index d4129c3fa711..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportOrBuilder.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface MetadataImportOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataImport) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - boolean hasDatabaseDump(); - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDatabaseDump(); - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder - getDatabaseDumpOrBuilder(); - - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1alpha.MetadataImport.State getState(); - - public com.google.cloud.metastore.v1alpha.MetadataImport.MetadataCase getMetadataCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegration.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegration.java deleted file mode 100644 index 0fdbe2951884..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegration.java +++ /dev/null @@ -1,989 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Specifies how metastore metadata should be integrated with external services.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataIntegration} - */ -public final class MetadataIntegration extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataIntegration) - MetadataIntegrationOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataIntegration.newBuilder() to construct. - private MetadataIntegration(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataIntegration() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataIntegration(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataIntegration.class, - com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder.class); - } - - public static final int DATA_CATALOG_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.metastore.v1alpha.DataCatalogConfig dataCatalogConfig_; - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - * - * @return Whether the dataCatalogConfig field is set. - */ - @java.lang.Override - public boolean hasDataCatalogConfig() { - return dataCatalogConfig_ != null; - } - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - * - * @return The dataCatalogConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataCatalogConfig getDataCatalogConfig() { - return dataCatalogConfig_ == null - ? com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance() - : dataCatalogConfig_; - } - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder - getDataCatalogConfigOrBuilder() { - return dataCatalogConfig_ == null - ? com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance() - : dataCatalogConfig_; - } - - public static final int DATAPLEX_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1alpha.DataplexConfig dataplexConfig_; - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - * - * @return Whether the dataplexConfig field is set. - */ - @java.lang.Override - public boolean hasDataplexConfig() { - return dataplexConfig_ != null; - } - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - * - * @return The dataplexConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataplexConfig getDataplexConfig() { - return dataplexConfig_ == null - ? com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance() - : dataplexConfig_; - } - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder getDataplexConfigOrBuilder() { - return dataplexConfig_ == null - ? com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance() - : dataplexConfig_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (dataCatalogConfig_ != null) { - output.writeMessage(1, getDataCatalogConfig()); - } - if (dataplexConfig_ != null) { - output.writeMessage(2, getDataplexConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataCatalogConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataCatalogConfig()); - } - if (dataplexConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataplexConfig()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataIntegration)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.MetadataIntegration other = - (com.google.cloud.metastore.v1alpha.MetadataIntegration) obj; - - if (hasDataCatalogConfig() != other.hasDataCatalogConfig()) return false; - if (hasDataCatalogConfig()) { - if (!getDataCatalogConfig().equals(other.getDataCatalogConfig())) return false; - } - if (hasDataplexConfig() != other.hasDataplexConfig()) return false; - if (hasDataplexConfig()) { - if (!getDataplexConfig().equals(other.getDataplexConfig())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDataCatalogConfig()) { - hash = (37 * hash) + DATA_CATALOG_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDataCatalogConfig().hashCode(); - } - if (hasDataplexConfig()) { - hash = (37 * hash) + DATAPLEX_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDataplexConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.MetadataIntegration prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies how metastore metadata should be integrated with external services.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataIntegration} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataIntegration) - com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataIntegration.class, - com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.MetadataIntegration.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dataCatalogConfig_ = null; - if (dataCatalogConfigBuilder_ != null) { - dataCatalogConfigBuilder_.dispose(); - dataCatalogConfigBuilder_ = null; - } - dataplexConfig_ = null; - if (dataplexConfigBuilder_ != null) { - dataplexConfigBuilder_.dispose(); - dataplexConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataIntegration getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataIntegration build() { - com.google.cloud.metastore.v1alpha.MetadataIntegration result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataIntegration buildPartial() { - com.google.cloud.metastore.v1alpha.MetadataIntegration result = - new com.google.cloud.metastore.v1alpha.MetadataIntegration(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.MetadataIntegration result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dataCatalogConfig_ = - dataCatalogConfigBuilder_ == null - ? dataCatalogConfig_ - : dataCatalogConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dataplexConfig_ = - dataplexConfigBuilder_ == null ? dataplexConfig_ : dataplexConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.MetadataIntegration) { - return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataIntegration) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataIntegration other) { - if (other == com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance()) - return this; - if (other.hasDataCatalogConfig()) { - mergeDataCatalogConfig(other.getDataCatalogConfig()); - } - if (other.hasDataplexConfig()) { - mergeDataplexConfig(other.getDataplexConfig()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - getDataCatalogConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getDataplexConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.metastore.v1alpha.DataCatalogConfig dataCatalogConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.DataCatalogConfig, - com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder, - com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder> - dataCatalogConfigBuilder_; - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - * - * @return Whether the dataCatalogConfig field is set. - */ - public boolean hasDataCatalogConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - * - * @return The dataCatalogConfig. - */ - public com.google.cloud.metastore.v1alpha.DataCatalogConfig getDataCatalogConfig() { - if (dataCatalogConfigBuilder_ == null) { - return dataCatalogConfig_ == null - ? com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance() - : dataCatalogConfig_; - } else { - return dataCatalogConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - public Builder setDataCatalogConfig( - com.google.cloud.metastore.v1alpha.DataCatalogConfig value) { - if (dataCatalogConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataCatalogConfig_ = value; - } else { - dataCatalogConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - public Builder setDataCatalogConfig( - com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder builderForValue) { - if (dataCatalogConfigBuilder_ == null) { - dataCatalogConfig_ = builderForValue.build(); - } else { - dataCatalogConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - public Builder mergeDataCatalogConfig( - com.google.cloud.metastore.v1alpha.DataCatalogConfig value) { - if (dataCatalogConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && dataCatalogConfig_ != null - && dataCatalogConfig_ - != com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance()) { - getDataCatalogConfigBuilder().mergeFrom(value); - } else { - dataCatalogConfig_ = value; - } - } else { - dataCatalogConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - public Builder clearDataCatalogConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - dataCatalogConfig_ = null; - if (dataCatalogConfigBuilder_ != null) { - dataCatalogConfigBuilder_.dispose(); - dataCatalogConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - public com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder - getDataCatalogConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getDataCatalogConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - public com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder - getDataCatalogConfigOrBuilder() { - if (dataCatalogConfigBuilder_ != null) { - return dataCatalogConfigBuilder_.getMessageOrBuilder(); - } else { - return dataCatalogConfig_ == null - ? com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance() - : dataCatalogConfig_; - } - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.DataCatalogConfig, - com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder, - com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder> - getDataCatalogConfigFieldBuilder() { - if (dataCatalogConfigBuilder_ == null) { - dataCatalogConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.DataCatalogConfig, - com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder, - com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder>( - getDataCatalogConfig(), getParentForChildren(), isClean()); - dataCatalogConfig_ = null; - } - return dataCatalogConfigBuilder_; - } - - private com.google.cloud.metastore.v1alpha.DataplexConfig dataplexConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.DataplexConfig, - com.google.cloud.metastore.v1alpha.DataplexConfig.Builder, - com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder> - dataplexConfigBuilder_; - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - * - * @return Whether the dataplexConfig field is set. - */ - public boolean hasDataplexConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - * - * @return The dataplexConfig. - */ - public com.google.cloud.metastore.v1alpha.DataplexConfig getDataplexConfig() { - if (dataplexConfigBuilder_ == null) { - return dataplexConfig_ == null - ? com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance() - : dataplexConfig_; - } else { - return dataplexConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - public Builder setDataplexConfig(com.google.cloud.metastore.v1alpha.DataplexConfig value) { - if (dataplexConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataplexConfig_ = value; - } else { - dataplexConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - public Builder setDataplexConfig( - com.google.cloud.metastore.v1alpha.DataplexConfig.Builder builderForValue) { - if (dataplexConfigBuilder_ == null) { - dataplexConfig_ = builderForValue.build(); - } else { - dataplexConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - public Builder mergeDataplexConfig(com.google.cloud.metastore.v1alpha.DataplexConfig value) { - if (dataplexConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && dataplexConfig_ != null - && dataplexConfig_ - != com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance()) { - getDataplexConfigBuilder().mergeFrom(value); - } else { - dataplexConfig_ = value; - } - } else { - dataplexConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - public Builder clearDataplexConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - dataplexConfig_ = null; - if (dataplexConfigBuilder_ != null) { - dataplexConfigBuilder_.dispose(); - dataplexConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - public com.google.cloud.metastore.v1alpha.DataplexConfig.Builder getDataplexConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDataplexConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - public com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder getDataplexConfigOrBuilder() { - if (dataplexConfigBuilder_ != null) { - return dataplexConfigBuilder_.getMessageOrBuilder(); - } else { - return dataplexConfig_ == null - ? com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance() - : dataplexConfig_; - } - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.DataplexConfig, - com.google.cloud.metastore.v1alpha.DataplexConfig.Builder, - com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder> - getDataplexConfigFieldBuilder() { - if (dataplexConfigBuilder_ == null) { - dataplexConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.DataplexConfig, - com.google.cloud.metastore.v1alpha.DataplexConfig.Builder, - com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder>( - getDataplexConfig(), getParentForChildren(), isClean()); - dataplexConfig_ = null; - } - return dataplexConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataIntegration) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataIntegration) - private static final com.google.cloud.metastore.v1alpha.MetadataIntegration DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataIntegration(); - } - - public static com.google.cloud.metastore.v1alpha.MetadataIntegration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataIntegration parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataIntegration getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegrationOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegrationOrBuilder.java deleted file mode 100644 index 18ebef5aefeb..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegrationOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface MetadataIntegrationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataIntegration) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - * - * @return Whether the dataCatalogConfig field is set. - */ - boolean hasDataCatalogConfig(); - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - * - * @return The dataCatalogConfig. - */ - com.google.cloud.metastore.v1alpha.DataCatalogConfig getDataCatalogConfig(); - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; - */ - com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder getDataCatalogConfigOrBuilder(); - - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - * - * @return Whether the dataplexConfig field is set. - */ - boolean hasDataplexConfig(); - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - * - * @return The dataplexConfig. - */ - com.google.cloud.metastore.v1alpha.DataplexConfig getDataplexConfig(); - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; - */ - com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder getDataplexConfigOrBuilder(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivity.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivity.java deleted file mode 100644 index 23c4f6069018..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivity.java +++ /dev/null @@ -1,1541 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * The metadata management activities of the metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataManagementActivity} - */ -public final class MetadataManagementActivity extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataManagementActivity) - MetadataManagementActivityOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataManagementActivity.newBuilder() to construct. - private MetadataManagementActivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataManagementActivity() { - metadataExports_ = java.util.Collections.emptyList(); - restores_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataManagementActivity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataManagementActivity.class, - com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder.class); - } - - public static final int METADATA_EXPORTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List metadataExports_; - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getMetadataExportsList() { - return metadataExports_; - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getMetadataExportsOrBuilderList() { - return metadataExports_; - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getMetadataExportsCount() { - return metadataExports_.size(); - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataExport getMetadataExports(int index) { - return metadataExports_.get(index); - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder getMetadataExportsOrBuilder( - int index) { - return metadataExports_.get(index); - } - - public static final int RESTORES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List restores_; - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getRestoresList() { - return restores_; - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getRestoresOrBuilderList() { - return restores_; - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getRestoresCount() { - return restores_.size(); - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore getRestores(int index) { - return restores_.get(index); - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RestoreOrBuilder getRestoresOrBuilder(int index) { - return restores_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < metadataExports_.size(); i++) { - output.writeMessage(1, metadataExports_.get(i)); - } - for (int i = 0; i < restores_.size(); i++) { - output.writeMessage(2, restores_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < metadataExports_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metadataExports_.get(i)); - } - for (int i = 0; i < restores_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, restores_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataManagementActivity)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.MetadataManagementActivity other = - (com.google.cloud.metastore.v1alpha.MetadataManagementActivity) obj; - - if (!getMetadataExportsList().equals(other.getMetadataExportsList())) return false; - if (!getRestoresList().equals(other.getRestoresList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getMetadataExportsCount() > 0) { - hash = (37 * hash) + METADATA_EXPORTS_FIELD_NUMBER; - hash = (53 * hash) + getMetadataExportsList().hashCode(); - } - if (getRestoresCount() > 0) { - hash = (37 * hash) + RESTORES_FIELD_NUMBER; - hash = (53 * hash) + getRestoresList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.MetadataManagementActivity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The metadata management activities of the metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataManagementActivity} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataManagementActivity) - com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MetadataManagementActivity.class, - com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.MetadataManagementActivity.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (metadataExportsBuilder_ == null) { - metadataExports_ = java.util.Collections.emptyList(); - } else { - metadataExports_ = null; - metadataExportsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (restoresBuilder_ == null) { - restores_ = java.util.Collections.emptyList(); - } else { - restores_ = null; - restoresBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataManagementActivity - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataManagementActivity build() { - com.google.cloud.metastore.v1alpha.MetadataManagementActivity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataManagementActivity buildPartial() { - com.google.cloud.metastore.v1alpha.MetadataManagementActivity result = - new com.google.cloud.metastore.v1alpha.MetadataManagementActivity(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1alpha.MetadataManagementActivity result) { - if (metadataExportsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - metadataExports_ = java.util.Collections.unmodifiableList(metadataExports_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.metadataExports_ = metadataExports_; - } else { - result.metadataExports_ = metadataExportsBuilder_.build(); - } - if (restoresBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - restores_ = java.util.Collections.unmodifiableList(restores_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.restores_ = restores_; - } else { - result.restores_ = restoresBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.MetadataManagementActivity result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.MetadataManagementActivity) { - return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataManagementActivity) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataManagementActivity other) { - if (other - == com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance()) - return this; - if (metadataExportsBuilder_ == null) { - if (!other.metadataExports_.isEmpty()) { - if (metadataExports_.isEmpty()) { - metadataExports_ = other.metadataExports_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMetadataExportsIsMutable(); - metadataExports_.addAll(other.metadataExports_); - } - onChanged(); - } - } else { - if (!other.metadataExports_.isEmpty()) { - if (metadataExportsBuilder_.isEmpty()) { - metadataExportsBuilder_.dispose(); - metadataExportsBuilder_ = null; - metadataExports_ = other.metadataExports_; - bitField0_ = (bitField0_ & ~0x00000001); - metadataExportsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMetadataExportsFieldBuilder() - : null; - } else { - metadataExportsBuilder_.addAllMessages(other.metadataExports_); - } - } - } - if (restoresBuilder_ == null) { - if (!other.restores_.isEmpty()) { - if (restores_.isEmpty()) { - restores_ = other.restores_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRestoresIsMutable(); - restores_.addAll(other.restores_); - } - onChanged(); - } - } else { - if (!other.restores_.isEmpty()) { - if (restoresBuilder_.isEmpty()) { - restoresBuilder_.dispose(); - restoresBuilder_ = null; - restores_ = other.restores_; - bitField0_ = (bitField0_ & ~0x00000002); - restoresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRestoresFieldBuilder() - : null; - } else { - restoresBuilder_.addAllMessages(other.restores_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1alpha.MetadataExport m = - input.readMessage( - com.google.cloud.metastore.v1alpha.MetadataExport.parser(), - extensionRegistry); - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(m); - } else { - metadataExportsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - com.google.cloud.metastore.v1alpha.Restore m = - input.readMessage( - com.google.cloud.metastore.v1alpha.Restore.parser(), extensionRegistry); - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(m); - } else { - restoresBuilder_.addMessage(m); - } - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List metadataExports_ = - java.util.Collections.emptyList(); - - private void ensureMetadataExportsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - metadataExports_ = - new java.util.ArrayList( - metadataExports_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataExport, - com.google.cloud.metastore.v1alpha.MetadataExport.Builder, - com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder> - metadataExportsBuilder_; - - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMetadataExportsList() { - if (metadataExportsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metadataExports_); - } else { - return metadataExportsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getMetadataExportsCount() { - if (metadataExportsBuilder_ == null) { - return metadataExports_.size(); - } else { - return metadataExportsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataExport getMetadataExports(int index) { - if (metadataExportsBuilder_ == null) { - return metadataExports_.get(index); - } else { - return metadataExportsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataExports( - int index, com.google.cloud.metastore.v1alpha.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.set(index, value); - onChanged(); - } else { - metadataExportsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataExports( - int index, com.google.cloud.metastore.v1alpha.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.set(index, builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports(com.google.cloud.metastore.v1alpha.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.add(value); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - int index, com.google.cloud.metastore.v1alpha.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.add(index, value); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - com.google.cloud.metastore.v1alpha.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - int index, com.google.cloud.metastore.v1alpha.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(index, builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllMetadataExports( - java.lang.Iterable values) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metadataExports_); - onChanged(); - } else { - metadataExportsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMetadataExports() { - if (metadataExportsBuilder_ == null) { - metadataExports_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - metadataExportsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeMetadataExports(int index) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.remove(index); - onChanged(); - } else { - metadataExportsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataExport.Builder getMetadataExportsBuilder( - int index) { - return getMetadataExportsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder getMetadataExportsOrBuilder( - int index) { - if (metadataExportsBuilder_ == null) { - return metadataExports_.get(index); - } else { - return metadataExportsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMetadataExportsOrBuilderList() { - if (metadataExportsBuilder_ != null) { - return metadataExportsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metadataExports_); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataExport.Builder addMetadataExportsBuilder() { - return getMetadataExportsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1alpha.MetadataExport.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataExport.Builder addMetadataExportsBuilder( - int index) { - return getMetadataExportsFieldBuilder() - .addBuilder( - index, com.google.cloud.metastore.v1alpha.MetadataExport.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMetadataExportsBuilderList() { - return getMetadataExportsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataExport, - com.google.cloud.metastore.v1alpha.MetadataExport.Builder, - com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder> - getMetadataExportsFieldBuilder() { - if (metadataExportsBuilder_ == null) { - metadataExportsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataExport, - com.google.cloud.metastore.v1alpha.MetadataExport.Builder, - com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder>( - metadataExports_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - metadataExports_ = null; - } - return metadataExportsBuilder_; - } - - private java.util.List restores_ = - java.util.Collections.emptyList(); - - private void ensureRestoresIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - restores_ = new java.util.ArrayList(restores_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Restore, - com.google.cloud.metastore.v1alpha.Restore.Builder, - com.google.cloud.metastore.v1alpha.RestoreOrBuilder> - restoresBuilder_; - - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getRestoresList() { - if (restoresBuilder_ == null) { - return java.util.Collections.unmodifiableList(restores_); - } else { - return restoresBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getRestoresCount() { - if (restoresBuilder_ == null) { - return restores_.size(); - } else { - return restoresBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.Restore getRestores(int index) { - if (restoresBuilder_ == null) { - return restores_.get(index); - } else { - return restoresBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRestores(int index, com.google.cloud.metastore.v1alpha.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.set(index, value); - onChanged(); - } else { - restoresBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRestores( - int index, com.google.cloud.metastore.v1alpha.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.set(index, builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(com.google.cloud.metastore.v1alpha.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.add(value); - onChanged(); - } else { - restoresBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(int index, com.google.cloud.metastore.v1alpha.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.add(index, value); - onChanged(); - } else { - restoresBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(com.google.cloud.metastore.v1alpha.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores( - int index, com.google.cloud.metastore.v1alpha.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(index, builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllRestores( - java.lang.Iterable values) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restores_); - onChanged(); - } else { - restoresBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearRestores() { - if (restoresBuilder_ == null) { - restores_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - restoresBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeRestores(int index) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.remove(index); - onChanged(); - } else { - restoresBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.Restore.Builder getRestoresBuilder(int index) { - return getRestoresFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.RestoreOrBuilder getRestoresOrBuilder(int index) { - if (restoresBuilder_ == null) { - return restores_.get(index); - } else { - return restoresBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getRestoresOrBuilderList() { - if (restoresBuilder_ != null) { - return restoresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(restores_); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.Restore.Builder addRestoresBuilder() { - return getRestoresFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1alpha.Restore.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.Restore.Builder addRestoresBuilder(int index) { - return getRestoresFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1alpha.Restore.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getRestoresBuilderList() { - return getRestoresFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Restore, - com.google.cloud.metastore.v1alpha.Restore.Builder, - com.google.cloud.metastore.v1alpha.RestoreOrBuilder> - getRestoresFieldBuilder() { - if (restoresBuilder_ == null) { - restoresBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Restore, - com.google.cloud.metastore.v1alpha.Restore.Builder, - com.google.cloud.metastore.v1alpha.RestoreOrBuilder>( - restores_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - restores_ = null; - } - return restoresBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataManagementActivity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataManagementActivity) - private static final com.google.cloud.metastore.v1alpha.MetadataManagementActivity - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataManagementActivity(); - } - - public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataManagementActivity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataManagementActivity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivityOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivityOrBuilder.java deleted file mode 100644 index 704474dc2c04..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivityOrBuilder.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface MetadataManagementActivityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataManagementActivity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getMetadataExportsList(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1alpha.MetadataExport getMetadataExports(int index); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getMetadataExportsCount(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getMetadataExportsOrBuilderList(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder getMetadataExportsOrBuilder(int index); - - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getRestoresList(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1alpha.Restore getRestores(int index); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getRestoresCount(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getRestoresOrBuilderList(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1alpha.RestoreOrBuilder getRestoresOrBuilder(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreFederationProto.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreFederationProto.java deleted file mode 100644 index 7bc0085397df..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreFederationProto.java +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public final class MetastoreFederationProto { - private MetastoreFederationProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Federation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Federation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_BackendMetastore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n9google/cloud/metastore/v1alpha/metasto" - + "re_federation.proto\022\036google.cloud.metast" - + "ore.v1alpha\032\034google/api/annotations.prot" - + "o\032\027google/api/client.proto\032\037google/api/f" - + "ield_behavior.proto\032\031google/api/resource" - + ".proto\032#google/longrunning/operations.pr" - + "oto\032 google/protobuf/field_mask.proto\032\037g" - + "oogle/protobuf/timestamp.proto\"\277\006\n\nFeder" - + "ation\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030" - + "\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224" - + "\n\013update_time\030\003 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\022F\n\006labels\030\004 \003(\01326.google.cl" - + "oud.metastore.v1alpha.Federation.LabelsE" - + "ntry\022\024\n\007version\030\005 \001(\tB\003\340A\005\022]\n\022backend_me" - + "tastores\030\006 \003(\0132A.google.cloud.metastore." - + "v1alpha.Federation.BackendMetastoresEntr" - + "y\022\031\n\014endpoint_uri\030\007 \001(\tB\003\340A\003\022D\n\005state\030\010 " - + "\001(\01620.google.cloud.metastore.v1alpha.Fed" - + "eration.StateB\003\340A\003\022\032\n\rstate_message\030\t \001(" - + "\tB\003\340A\003\022\020\n\003uid\030\n \001(\tB\003\340A\003\032-\n\013LabelsEntry\022" - + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032j\n\026Backe" - + "ndMetastoresEntry\022\013\n\003key\030\001 \001(\005\022?\n\005value\030" - + "\002 \001(\01320.google.cloud.metastore.v1alpha.B" - + "ackendMetastore:\0028\001\"_\n\005State\022\025\n\021STATE_UN" - + "SPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n" - + "\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\t\n\005ERROR\020\005:j\352A" - + "g\n#metastore.googleapis.com/Federation\022@" - + "projects/{project}/locations/{location}/" - + "federations/{federation}\"\317\001\n\020BackendMeta" - + "store\022\014\n\004name\030\001 \001(\t\022V\n\016metastore_type\030\002 " - + "\001(\0162>.google.cloud.metastore.v1alpha.Bac" - + "kendMetastore.MetastoreType\"U\n\rMetastore" - + "Type\022\036\n\032METASTORE_TYPE_UNSPECIFIED\020\000\022\014\n\010" - + "BIGQUERY\020\002\022\026\n\022DATAPROC_METASTORE\020\003\"\262\001\n\026L" - + "istFederationsRequest\022;\n\006parent\030\001 \001(\tB+\340" - + "A\002\372A%\022#metastore.googleapis.com/Federati" - + "on\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token" - + "\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010orde" - + "r_by\030\005 \001(\tB\003\340A\001\"\210\001\n\027ListFederationsRespo" - + "nse\022?\n\013federations\030\001 \003(\0132*.google.cloud." - + "metastore.v1alpha.Federation\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Q\n\024Ge" - + "tFederationRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%" - + "\n#metastore.googleapis.com/Federation\"\320\001" - + "\n\027CreateFederationRequest\022;\n\006parent\030\001 \001(" - + "\tB+\340A\002\372A%\022#metastore.googleapis.com/Fede" - + "ration\022\032\n\rfederation_id\030\002 \001(\tB\003\340A\002\022C\n\nfe" - + "deration\030\003 \001(\0132*.google.cloud.metastore." - + "v1alpha.FederationB\003\340A\002\022\027\n\nrequest_id\030\004 " - + "\001(\tB\003\340A\001\"\255\001\n\027UpdateFederationRequest\0224\n\013" - + "update_mask\030\001 \001(\0132\032.google.protobuf.Fiel" - + "dMaskB\003\340A\002\022C\n\nfederation\030\002 \001(\0132*.google." - + "cloud.metastore.v1alpha.FederationB\003\340A\002\022" - + "\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"m\n\027DeleteFedera" - + "tionRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#metas" - + "tore.googleapis.com/Federation\022\027\n\nreques" - + "t_id\030\002 \001(\tB\003\340A\0012\247\n\n\033DataprocMetastoreFed" - + "eration\022\311\001\n\017ListFederations\0226.google.clo" - + "ud.metastore.v1alpha.ListFederationsRequ" - + "est\0327.google.cloud.metastore.v1alpha.Lis" - + "tFederationsResponse\"E\202\323\344\223\0026\0224/v1alpha/{" - + "parent=projects/*/locations/*}/federatio" - + "ns\332A\006parent\022\266\001\n\rGetFederation\0224.google.c" - + "loud.metastore.v1alpha.GetFederationRequ" - + "est\032*.google.cloud.metastore.v1alpha.Fed" - + "eration\"C\202\323\344\223\0026\0224/v1alpha/{name=projects" - + "/*/locations/*/federations/*}\332A\004name\022\230\002\n" - + "\020CreateFederation\0227.google.cloud.metasto" - + "re.v1alpha.CreateFederationRequest\032\035.goo" - + "gle.longrunning.Operation\"\253\001\202\323\344\223\002B\"4/v1a" - + "lpha/{parent=projects/*/locations/*}/fed" - + "erations:\nfederation\332A\037parent,federation" - + ",federation_id\312A>\n\nFederation\0220google.cl" - + "oud.metastore.v1alpha.OperationMetadata\022" - + "\232\002\n\020UpdateFederation\0227.google.cloud.meta" - + "store.v1alpha.UpdateFederationRequest\032\035." - + "google.longrunning.Operation\"\255\001\202\323\344\223\002M2?/" - + "v1alpha/{federation.name=projects/*/loca" - + "tions/*/federations/*}:\nfederation\332A\026fed" - + "eration,update_mask\312A>\n\nFederation\0220goog" - + "le.cloud.metastore.v1alpha.OperationMeta" - + "data\022\374\001\n\020DeleteFederation\0227.google.cloud" - + ".metastore.v1alpha.DeleteFederationReque" - + "st\032\035.google.longrunning.Operation\"\217\001\202\323\344\223" - + "\0026*4/v1alpha/{name=projects/*/locations/" - + "*/federations/*}\332A\004name\312AI\n\025google.proto" - + "buf.Empty\0220google.cloud.metastore.v1alph" - + "a.OperationMetadata\032L\312A\030metastore.google" - + "apis.com\322A.https://www.googleapis.com/au" - + "th/cloud-platformB\202\001\n\"com.google.cloud.m" - + "etastore.v1alphaB\030MetastoreFederationPro" - + "toP\001Z@cloud.google.com/go/metastore/apiv" - + "1alpha/metastorepb;metastorepbb\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_metastore_v1alpha_Federation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_metastore_v1alpha_Federation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_Federation_descriptor, - new java.lang.String[] { - "Name", - "CreateTime", - "UpdateTime", - "Labels", - "Version", - "BackendMetastores", - "EndpointUri", - "State", - "StateMessage", - "Uid", - }); - internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_descriptor = - internal_static_google_cloud_metastore_v1alpha_Federation_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_descriptor = - internal_static_google_cloud_metastore_v1alpha_Federation_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_metastore_v1alpha_BackendMetastore_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor, - new java.lang.String[] { - "Name", "MetastoreType", - }); - internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", "Filter", "OrderBy", - }); - internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor, - new java.lang.String[] { - "Federations", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor, - new java.lang.String[] { - "Parent", "FederationId", "Federation", "RequestId", - }); - internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor, - new java.lang.String[] { - "UpdateMask", "Federation", "RequestId", - }); - internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor, - new java.lang.String[] { - "Name", "RequestId", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreProto.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreProto.java deleted file mode 100644 index e6083d15e0f5..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreProto.java +++ /dev/null @@ -1,1199 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public final class MetastoreProto { - private MetastoreProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Service_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Service_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Service_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Service_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_DataplexConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_DataplexConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_DataplexConfig_LakeResourcesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_DataplexConfig_LakeResourcesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Lake_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Lake_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_ConfigOverridesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_ConfigOverridesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_AuxiliaryVersionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_KerberosConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_KerberosConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Secret_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Secret_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_ConfigOverridesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_NetworkConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_NetworkConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_MetadataImport_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_MetadataImport_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_MetadataExport_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_MetadataExport_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Backup_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Backup_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_Restore_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_Restore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_OperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_LocationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_LocationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n.google/cloud/metastore/v1alpha/metasto" - + "re.proto\022\036google.cloud.metastore.v1alpha" - + "\032\034google/api/annotations.proto\032\027google/a" - + "pi/client.proto\032\037google/api/field_behavi" - + "or.proto\032\031google/api/resource.proto\032#goo" - + "gle/longrunning/operations.proto\032 google" - + "/protobuf/field_mask.proto\032\037google/proto" - + "buf/timestamp.proto\032\036google/protobuf/wra" - + "ppers.proto\032\033google/type/dayofweek.proto" - + "\"\333\r\n\007Service\022T\n\025hive_metastore_config\030\005 " - + "\001(\01323.google.cloud.metastore.v1alpha.Hiv" - + "eMetastoreConfigH\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n" - + "\013create_time\030\002 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.googl" - + "e.protobuf.TimestampB\003\340A\003\022C\n\006labels\030\004 \003(" - + "\01323.google.cloud.metastore.v1alpha.Servi" - + "ce.LabelsEntry\0227\n\007network\030\007 \001(\tB&\340A\005\372A \n" - + "\036compute.googleapis.com/Network\022\031\n\014endpo" - + "int_uri\030\010 \001(\tB\003\340A\003\022\014\n\004port\030\t \001(\005\022A\n\005stat" - + "e\030\n \001(\0162-.google.cloud.metastore.v1alpha" - + ".Service.StateB\003\340A\003\022\032\n\rstate_message\030\013 \001" - + "(\tB\003\340A\003\022\035\n\020artifact_gcs_uri\030\014 \001(\tB\003\340A\003\022:" - + "\n\004tier\030\r \001(\0162,.google.cloud.metastore.v1" - + "alpha.Service.Tier\022Q\n\024metadata_integrati" - + "on\030\016 \001(\01323.google.cloud.metastore.v1alph" - + "a.MetadataIntegration\022M\n\022maintenance_win" - + "dow\030\017 \001(\01321.google.cloud.metastore.v1alp" - + "ha.MaintenanceWindow\022\020\n\003uid\030\020 \001(\tB\003\340A\003\022e" - + "\n\034metadata_management_activity\030\021 \001(\0132:.g" - + "oogle.cloud.metastore.v1alpha.MetadataMa" - + "nagementActivityB\003\340A\003\022T\n\017release_channel" - + "\030\023 \001(\01626.google.cloud.metastore.v1alpha." - + "Service.ReleaseChannelB\003\340A\005\022P\n\021encryptio" - + "n_config\030\024 \001(\01320.google.cloud.metastore." - + "v1alpha.EncryptionConfigB\003\340A\005\022E\n\016network" - + "_config\030\025 \001(\0132-.google.cloud.metastore.v" - + "1alpha.NetworkConfig\022P\n\rdatabase_type\030\026 " - + "\001(\01624.google.cloud.metastore.v1alpha.Ser" - + "vice.DatabaseTypeB\003\340A\005\022I\n\020telemetry_conf" - + "ig\030\027 \001(\0132/.google.cloud.metastore.v1alph" - + "a.TelemetryConfig\032-\n\013LabelsEntry\022\013\n\003key\030" - + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"~\n\005State\022\025\n\021STA" - + "TE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE" - + "\020\002\022\016\n\nSUSPENDING\020\003\022\r\n\tSUSPENDED\020\004\022\014\n\010UPD" - + "ATING\020\005\022\014\n\010DELETING\020\006\022\t\n\005ERROR\020\007\";\n\004Tier" - + "\022\024\n\020TIER_UNSPECIFIED\020\000\022\r\n\tDEVELOPER\020\001\022\016\n" - + "\nENTERPRISE\020\003\"I\n\016ReleaseChannel\022\037\n\033RELEA" - + "SE_CHANNEL_UNSPECIFIED\020\000\022\n\n\006CANARY\020\001\022\n\n\006" - + "STABLE\020\002\"E\n\014DatabaseType\022\035\n\031DATABASE_TYP" - + "E_UNSPECIFIED\020\000\022\t\n\005MYSQL\020\001\022\013\n\007SPANNER\020\002:" - + "a\352A^\n metastore.googleapis.com/Service\022:" - + "projects/{project}/locations/{location}/" - + "services/{service}B\022\n\020metastore_config\"\256" - + "\001\n\023MetadataIntegration\022N\n\023data_catalog_c" - + "onfig\030\001 \001(\01321.google.cloud.metastore.v1a" - + "lpha.DataCatalogConfig\022G\n\017dataplex_confi" - + "g\030\002 \001(\0132..google.cloud.metastore.v1alpha" - + ".DataplexConfig\"$\n\021DataCatalogConfig\022\017\n\007" - + "enabled\030\002 \001(\010\"\307\001\n\016DataplexConfig\022Y\n\016lake" - + "_resources\030\001 \003(\0132A.google.cloud.metastor" - + "e.v1alpha.DataplexConfig.LakeResourcesEn" - + "try\032Z\n\022LakeResourcesEntry\022\013\n\003key\030\001 \001(\t\0223" - + "\n\005value\030\002 \001(\0132$.google.cloud.metastore.v" - + "1alpha.Lake:\0028\001\"7\n\004Lake\022/\n\004name\030\001 \001(\tB!\372" - + "A\036\n\034dataplex.googleapis.com/Lake\"r\n\021Main" - + "tenanceWindow\0220\n\013hour_of_day\030\001 \001(\0132\033.goo" - + "gle.protobuf.Int32Value\022+\n\013day_of_week\030\002" - + " \001(\0162\026.google.type.DayOfWeek\"\230\005\n\023HiveMet" - + "astoreConfig\022\024\n\007version\030\001 \001(\tB\003\340A\005\022b\n\020co" - + "nfig_overrides\030\002 \003(\0132H.google.cloud.meta" - + "store.v1alpha.HiveMetastoreConfig.Config" - + "OverridesEntry\022G\n\017kerberos_config\030\003 \001(\0132" - + "..google.cloud.metastore.v1alpha.Kerbero" - + "sConfig\022_\n\021endpoint_protocol\030\004 \001(\0162D.goo" - + "gle.cloud.metastore.v1alpha.HiveMetastor" - + "eConfig.EndpointProtocol\022f\n\022auxiliary_ve" - + "rsions\030\005 \003(\0132J.google.cloud.metastore.v1" - + "alpha.HiveMetastoreConfig.AuxiliaryVersi" - + "onsEntry\0326\n\024ConfigOverridesEntry\022\013\n\003key\030" - + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032p\n\026AuxiliaryVer" - + "sionsEntry\022\013\n\003key\030\001 \001(\t\022E\n\005value\030\002 \001(\01326" - + ".google.cloud.metastore.v1alpha.Auxiliar" - + "yVersionConfig:\0028\001\"K\n\020EndpointProtocol\022!" - + "\n\035ENDPOINT_PROTOCOL_UNSPECIFIED\020\000\022\n\n\006THR" - + "IFT\020\001\022\010\n\004GRPC\020\002\"x\n\016KerberosConfig\0226\n\006key" - + "tab\030\001 \001(\0132&.google.cloud.metastore.v1alp" - + "ha.Secret\022\021\n\tprincipal\030\002 \001(\t\022\033\n\023krb5_con" - + "fig_gcs_uri\030\003 \001(\t\")\n\006Secret\022\026\n\014cloud_sec" - + "ret\030\002 \001(\tH\000B\007\n\005value\"#\n\020EncryptionConfig" - + "\022\017\n\007kms_key\030\001 \001(\t\"\224\002\n\026AuxiliaryVersionCo" - + "nfig\022\017\n\007version\030\001 \001(\t\022e\n\020config_override" - + "s\030\002 \003(\0132K.google.cloud.metastore.v1alpha" - + ".AuxiliaryVersionConfig.ConfigOverridesE" - + "ntry\022J\n\016network_config\030\003 \001(\0132-.google.cl" - + "oud.metastore.v1alpha.NetworkConfigB\003\340A\003" - + "\0326\n\024ConfigOverridesEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"\327\001\n\rNetworkConfig\022N\n\tco" - + "nsumers\030\001 \003(\01326.google.cloud.metastore.v" - + "1alpha.NetworkConfig.ConsumerB\003\340A\005\032v\n\010Co" - + "nsumer\022?\n\nsubnetwork\030\001 \001(\tB)\340A\005\372A#\n!comp" - + "ute.googleapis.com/SubnetworkH\000\022\031\n\014endpo" - + "int_uri\030\003 \001(\tB\003\340A\003B\016\n\014vpc_resource\"\237\001\n\017T" - + "elemetryConfig\022M\n\nlog_format\030\001 \001(\01629.goo" - + "gle.cloud.metastore.v1alpha.TelemetryCon" - + "fig.LogFormat\"=\n\tLogFormat\022\032\n\026LOG_FORMAT" - + "_UNSPECIFIED\020\000\022\n\n\006LEGACY\020\001\022\010\n\004JSON\020\002\"\253\001\n" - + "\032MetadataManagementActivity\022M\n\020metadata_" - + "exports\030\001 \003(\0132..google.cloud.metastore.v" - + "1alpha.MetadataExportB\003\340A\003\022>\n\010restores\030\002" - + " \003(\0132\'.google.cloud.metastore.v1alpha.Re" - + "storeB\003\340A\003\"\224\007\n\016MetadataImport\022Y\n\rdatabas" - + "e_dump\030\006 \001(\0132;.google.cloud.metastore.v1" - + "alpha.MetadataImport.DatabaseDumpB\003\340A\005H\000" - + "\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\023\n\013description\030\002 \001(\t" - + "\0224\n\013create_time\030\003 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\0224\n\013update_time\030\004 \001(\0132\032.go" - + "ogle.protobuf.TimestampB\003\340A\003\0221\n\010end_time" - + "\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" - + "H\n\005state\030\005 \001(\01624.google.cloud.metastore." - + "v1alpha.MetadataImport.StateB\003\340A\003\032\245\002\n\014Da" - + "tabaseDump\022c\n\rdatabase_type\030\001 \001(\0162H.goog" - + "le.cloud.metastore.v1alpha.MetadataImpor" - + "t.DatabaseDump.DatabaseTypeB\002\030\001\022\017\n\007gcs_u" - + "ri\030\002 \001(\t\022\033\n\017source_database\030\003 \001(\tB\002\030\001\022H\n" - + "\004type\030\004 \001(\01625.google.cloud.metastore.v1a" - + "lpha.DatabaseDumpSpec.TypeB\003\340A\001\"8\n\014Datab" - + "aseType\022\035\n\031DATABASE_TYPE_UNSPECIFIED\020\000\022\t" - + "\n\005MYSQL\020\001\"T\n\005State\022\025\n\021STATE_UNSPECIFIED\020" - + "\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002\022\014\n\010UPDATIN" - + "G\020\003\022\n\n\006FAILED\020\004:\213\001\352A\207\001\n\'metastore.google" - + "apis.com/MetadataImport\022\\projects/{proje" - + "ct}/locations/{location}/services/{servi" - + "ce}/metadataImports/{metadata_import}B\n\n" - + "\010metadata\"\244\003\n\016MetadataExport\022\"\n\023destinat" - + "ion_gcs_uri\030\004 \001(\tB\003\340A\003H\000\0223\n\nstart_time\030\001" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" - + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\022H\n\005state\030\003 \001(\01624.google.cloud.m" - + "etastore.v1alpha.MetadataExport.StateB\003\340" - + "A\003\022V\n\022database_dump_type\030\005 \001(\01625.google." - + "cloud.metastore.v1alpha.DatabaseDumpSpec" - + ".TypeB\003\340A\003\"U\n\005State\022\025\n\021STATE_UNSPECIFIED" - + "\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILED" - + "\020\003\022\r\n\tCANCELLED\020\004B\r\n\013destination\"\232\004\n\006Bac" - + "kup\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030\002 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n\010" - + "end_time\030\003 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\003\022@\n\005state\030\004 \001(\0162,.google.cloud.me" - + "tastore.v1alpha.Backup.StateB\003\340A\003\022F\n\020ser" - + "vice_revision\030\005 \001(\0132\'.google.cloud.metas" - + "tore.v1alpha.ServiceB\003\340A\003\022\023\n\013description" - + "\030\006 \001(\t\022\037\n\022restoring_services\030\007 \003(\tB\003\340A\003\"" - + "a\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREAT" - + "ING\020\001\022\014\n\010DELETING\020\002\022\n\n\006ACTIVE\020\003\022\n\n\006FAILE" - + "D\020\004\022\r\n\tRESTORING\020\005:q\352An\n\037metastore.googl" - + "eapis.com/Backup\022Kprojects/{project}/loc" - + "ations/{location}/services/{service}/bac" - + "kups/{backup}\"\354\003\n\007Restore\0223\n\nstart_time\030" - + "\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221" - + "\n\010end_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\022A\n\005state\030\003 \001(\0162-.google.cloud." - + "metastore.v1alpha.Restore.StateB\003\340A\003\0227\n\006" - + "backup\030\004 \001(\tB\'\340A\003\372A!\n\037metastore.googleap" - + "is.com/Backup\022F\n\004type\030\005 \001(\01623.google.clo" - + "ud.metastore.v1alpha.Restore.RestoreType" - + "B\003\340A\003\022\024\n\007details\030\006 \001(\tB\003\340A\003\"U\n\005State\022\025\n\021" - + "STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCC" - + "EEDED\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED\020\004\"H\n\013Re" - + "storeType\022\034\n\030RESTORE_TYPE_UNSPECIFIED\020\000\022" - + "\010\n\004FULL\020\001\022\021\n\rMETADATA_ONLY\020\002\"\254\001\n\023ListSer" - + "vicesRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 me" - + "tastore.googleapis.com/Service\022\026\n\tpage_s" - + "ize\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022" - + "\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003" - + "\340A\001\"\177\n\024ListServicesResponse\0229\n\010services\030" - + "\001 \003(\0132\'.google.cloud.metastore.v1alpha.S" - + "ervice\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unrea" - + "chable\030\003 \003(\t\"K\n\021GetServiceRequest\0226\n\004nam" - + "e\030\001 \001(\tB(\340A\002\372A\"\n metastore.googleapis.co" - + "m/Service\"\301\001\n\024CreateServiceRequest\0228\n\006pa" - + "rent\030\001 \001(\tB(\340A\002\372A\"\022 metastore.googleapis" - + ".com/Service\022\027\n\nservice_id\030\002 \001(\tB\003\340A\002\022=\n" - + "\007service\030\003 \001(\0132\'.google.cloud.metastore." - + "v1alpha.ServiceB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\t" - + "B\003\340A\001\"\244\001\n\024UpdateServiceRequest\0224\n\013update" - + "_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB" - + "\003\340A\002\022=\n\007service\030\002 \001(\0132\'.google.cloud.met" - + "astore.v1alpha.ServiceB\003\340A\002\022\027\n\nrequest_i" - + "d\030\003 \001(\tB\003\340A\001\"g\n\024DeleteServiceRequest\0226\n\004" - + "name\030\001 \001(\tB(\340A\002\372A\"\n metastore.googleapis" - + ".com/Service\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\272\001" - + "\n\032ListMetadataImportsRequest\022?\n\006parent\030\001" - + " \001(\tB/\340A\002\372A)\022\'metastore.googleapis.com/M" - + "etadataImport\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" - + "\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003" - + "\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\225\001\n\033ListMetad" - + "ataImportsResponse\022H\n\020metadata_imports\030\001" - + " \003(\0132..google.cloud.metastore.v1alpha.Me" - + "tadataImport\022\027\n\017next_page_token\030\002 \001(\t\022\023\n" - + "\013unreachable\030\003 \003(\t\"Y\n\030GetMetadataImportR" - + "equest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'metastore." - + "googleapis.com/MetadataImport\"\346\001\n\033Create" - + "MetadataImportRequest\022?\n\006parent\030\001 \001(\tB/\340" - + "A\002\372A)\022\'metastore.googleapis.com/Metadata" - + "Import\022\037\n\022metadata_import_id\030\002 \001(\tB\003\340A\002\022" - + "L\n\017metadata_import\030\003 \001(\0132..google.cloud." - + "metastore.v1alpha.MetadataImportB\003\340A\002\022\027\n" - + "\nrequest_id\030\004 \001(\tB\003\340A\001\"\272\001\n\033UpdateMetadat" - + "aImportRequest\0224\n\013update_mask\030\001 \001(\0132\032.go" - + "ogle.protobuf.FieldMaskB\003\340A\002\022L\n\017metadata" - + "_import\030\002 \001(\0132..google.cloud.metastore.v" - + "1alpha.MetadataImportB\003\340A\002\022\027\n\nrequest_id" - + "\030\003 \001(\tB\003\340A\001\"\252\001\n\022ListBackupsRequest\0227\n\006pa" - + "rent\030\001 \001(\tB\'\340A\002\372A!\022\037metastore.googleapis" - + ".com/Backup\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\np" - + "age_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A" - + "\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"|\n\023ListBackupsR" - + "esponse\0227\n\007backups\030\001 \003(\0132&.google.cloud." - + "metastore.v1alpha.Backup\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"I\n\020GetBac" - + "kupRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037metast" - + "ore.googleapis.com/Backup\"\274\001\n\023CreateBack" - + "upRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037metas" - + "tore.googleapis.com/Backup\022\026\n\tbackup_id\030" - + "\002 \001(\tB\003\340A\002\022;\n\006backup\030\003 \001(\0132&.google.clou" - + "d.metastore.v1alpha.BackupB\003\340A\002\022\027\n\nreque" - + "st_id\030\004 \001(\tB\003\340A\001\"e\n\023DeleteBackupRequest\022" - + "5\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037metastore.googlea" - + "pis.com/Backup\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"" - + "\364\001\n\025ExportMetadataRequest\022 \n\026destination" - + "_gcs_folder\030\002 \001(\tH\000\0229\n\007service\030\001 \001(\tB(\340A" - + "\002\372A\"\n metastore.googleapis.com/Service\022\027" - + "\n\nrequest_id\030\003 \001(\tB\003\340A\001\022V\n\022database_dump" - + "_type\030\004 \001(\01625.google.cloud.metastore.v1a" - + "lpha.DatabaseDumpSpec.TypeB\003\340A\001B\r\n\013desti" - + "nation\"\364\001\n\025RestoreServiceRequest\0229\n\007serv" - + "ice\030\001 \001(\tB(\340A\002\372A\"\n metastore.googleapis." - + "com/Service\0227\n\006backup\030\002 \001(\tB\'\340A\002\372A!\n\037met" - + "astore.googleapis.com/Backup\022N\n\014restore_" - + "type\030\003 \001(\01623.google.cloud.metastore.v1al" - + "pha.Restore.RestoreTypeB\003\340A\001\022\027\n\nrequest_" - + "id\030\004 \001(\tB\003\340A\001\"\200\002\n\021OperationMetadata\0224\n\013c" - + "reate_time\030\001 \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A" - + "\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005" - + " \001(\tB\003\340A\003\022#\n\026requested_cancellation\030\006 \001(" - + "\010B\003\340A\003\022\030\n\013api_version\030\007 \001(\tB\003\340A\003\"\301\001\n\020Loc" - + "ationMetadata\022p\n!supported_hive_metastor" - + "e_versions\030\001 \003(\0132E.google.cloud.metastor" - + "e.v1alpha.LocationMetadata.HiveMetastore" - + "Version\032;\n\024HiveMetastoreVersion\022\017\n\007versi" - + "on\030\001 \001(\t\022\022\n\nis_default\030\002 \001(\010\"E\n\020Database" - + "DumpSpec\"1\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t" - + "\n\005MYSQL\020\001\022\010\n\004AVRO\020\002\"P\n\026RemoveIamPolicyRe" - + "quest\022\033\n\010resource\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022\031\n\014as" - + "ynchronous\030\002 \001(\010B\003\340A\001\"*\n\027RemoveIamPolicy" - + "Response\022\017\n\007success\030\001 \001(\010\"e\n\024QueryMetada" - + "taRequest\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n meta" - + "store.googleapis.com/Service\022\022\n\005query\030\002 " - + "\001(\tB\003\340A\002\"4\n\025QueryMetadataResponse\022\033\n\023res" - + "ult_manifest_uri\030\001 \001(\t\"\250\001\n\032MoveTableToDa" - + "tabaseRequest\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n " - + "metastore.googleapis.com/Service\022\027\n\ntabl" - + "e_name\030\002 \001(\tB\003\340A\002\022\024\n\007db_name\030\003 \001(\tB\003\340A\002\022" - + " \n\023destination_db_name\030\004 \001(\tB\003\340A\002\"\035\n\033Mov" - + "eTableToDatabaseResponse\"\230\001\n$AlterMetada" - + "taResourceLocationRequest\0229\n\007service\030\001 \001" - + "(\tB(\340A\002\372A\"\n metastore.googleapis.com/Ser" - + "vice\022\032\n\rresource_name\030\002 \001(\tB\003\340A\002\022\031\n\014loca" - + "tion_uri\030\003 \001(\tB\003\340A\002\"\'\n%AlterMetadataReso" - + "urceLocationResponse2\310%\n\021DataprocMetasto" - + "re\022\275\001\n\014ListServices\0223.google.cloud.metas" - + "tore.v1alpha.ListServicesRequest\0324.googl" - + "e.cloud.metastore.v1alpha.ListServicesRe" - + "sponse\"B\202\323\344\223\0023\0221/v1alpha/{parent=project" - + "s/*/locations/*}/services\332A\006parent\022\252\001\n\nG" - + "etService\0221.google.cloud.metastore.v1alp" - + "ha.GetServiceRequest\032\'.google.cloud.meta" - + "store.v1alpha.Service\"@\202\323\344\223\0023\0221/v1alpha/" - + "{name=projects/*/locations/*/services/*}" - + "\332A\004name\022\203\002\n\rCreateService\0224.google.cloud" - + ".metastore.v1alpha.CreateServiceRequest\032" - + "\035.google.longrunning.Operation\"\234\001\202\323\344\223\002<\"" - + "1/v1alpha/{parent=projects/*/locations/*" - + "}/services:\007service\332A\031parent,service,ser" - + "vice_id\312A;\n\007Service\0220google.cloud.metast" - + "ore.v1alpha.OperationMetadata\022\205\002\n\rUpdate" - + "Service\0224.google.cloud.metastore.v1alpha" - + ".UpdateServiceRequest\032\035.google.longrunni" - + "ng.Operation\"\236\001\202\323\344\223\002D29/v1alpha/{service" - + ".name=projects/*/locations/*/services/*}" - + ":\007service\332A\023service,update_mask\312A;\n\007Serv" - + "ice\0220google.cloud.metastore.v1alpha.Oper" - + "ationMetadata\022\363\001\n\rDeleteService\0224.google" - + ".cloud.metastore.v1alpha.DeleteServiceRe" - + "quest\032\035.google.longrunning.Operation\"\214\001\202" - + "\323\344\223\0023*1/v1alpha/{name=projects/*/locatio" - + "ns/*/services/*}\332A\004name\312AI\n\025google.proto" - + "buf.Empty\0220google.cloud.metastore.v1alph" - + "a.OperationMetadata\022\344\001\n\023ListMetadataImpo" - + "rts\022:.google.cloud.metastore.v1alpha.Lis" - + "tMetadataImportsRequest\032;.google.cloud.m" - + "etastore.v1alpha.ListMetadataImportsResp" - + "onse\"T\202\323\344\223\002E\022C/v1alpha/{parent=projects/" - + "*/locations/*/services/*}/metadataImport" - + "s\332A\006parent\022\321\001\n\021GetMetadataImport\0228.googl" - + "e.cloud.metastore.v1alpha.GetMetadataImp" - + "ortRequest\032..google.cloud.metastore.v1al" - + "pha.MetadataImport\"R\202\323\344\223\002E\022C/v1alpha/{na" - + "me=projects/*/locations/*/services/*/met" - + "adataImports/*}\332A\004name\022\302\002\n\024CreateMetadat" - + "aImport\022;.google.cloud.metastore.v1alpha" - + ".CreateMetadataImportRequest\032\035.google.lo" - + "ngrunning.Operation\"\315\001\202\323\344\223\002V\"C/v1alpha/{" - + "parent=projects/*/locations/*/services/*" - + "}/metadataImports:\017metadata_import\332A)par" - + "ent,metadata_import,metadata_import_id\312A" - + "B\n\016MetadataImport\0220google.cloud.metastor" - + "e.v1alpha.OperationMetadata\022\304\002\n\024UpdateMe" - + "tadataImport\022;.google.cloud.metastore.v1" - + "alpha.UpdateMetadataImportRequest\032\035.goog" - + "le.longrunning.Operation\"\317\001\202\323\344\223\002f2S/v1al" - + "pha/{metadata_import.name=projects/*/loc" - + "ations/*/services/*/metadataImports/*}:\017" - + "metadata_import\332A\033metadata_import,update" - + "_mask\312AB\n\016MetadataImport\0220google.cloud.m" - + "etastore.v1alpha.OperationMetadata\022\374\001\n\016E" - + "xportMetadata\0225.google.cloud.metastore.v" - + "1alpha.ExportMetadataRequest\032\035.google.lo" - + "ngrunning.Operation\"\223\001\202\323\344\223\002H\"C/v1alpha/{" - + "service=projects/*/locations/*/services/" - + "*}:exportMetadata:\001*\312AB\n\016MetadataExport\022" - + "0google.cloud.metastore.v1alpha.Operatio" - + "nMetadata\022\377\001\n\016RestoreService\0225.google.cl" - + "oud.metastore.v1alpha.RestoreServiceRequ" - + "est\032\035.google.longrunning.Operation\"\226\001\202\323\344" - + "\223\002A\" - * Request message for - * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase]. - * - * - * Protobuf type {@code google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest} - */ -public final class MoveTableToDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) - MoveTableToDatabaseRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use MoveTableToDatabaseRequest.newBuilder() to construct. - private MoveTableToDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MoveTableToDatabaseRequest() { - service_ = ""; - tableName_ = ""; - dbName_ = ""; - destinationDbName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveTableToDatabaseRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.class, - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object tableName_ = ""; - /** - * - * - *
-   * Required. The name of the table to be moved.
-   * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The tableName. - */ - @java.lang.Override - public java.lang.String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the table to be moved.
-   * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for tableName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DB_NAME_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object dbName_ = ""; - /** - * - * - *
-   * Required. The name of the database where the table resides.
-   * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dbName. - */ - @java.lang.Override - public java.lang.String getDbName() { - java.lang.Object ref = dbName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dbName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the database where the table resides.
-   * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dbName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDbNameBytes() { - java.lang.Object ref = dbName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dbName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESTINATION_DB_NAME_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object destinationDbName_ = ""; - /** - * - * - *
-   * Required. The name of the database where the table should be moved.
-   * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The destinationDbName. - */ - @java.lang.Override - public java.lang.String getDestinationDbName() { - java.lang.Object ref = destinationDbName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationDbName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the database where the table should be moved.
-   * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for destinationDbName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDestinationDbNameBytes() { - java.lang.Object ref = destinationDbName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - destinationDbName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dbName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationDbName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destinationDbName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dbName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationDbName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destinationDbName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest other = - (com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getTableName().equals(other.getTableName())) return false; - if (!getDbName().equals(other.getDbName())) return false; - if (!getDestinationDbName().equals(other.getDestinationDbName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getTableName().hashCode(); - hash = (37 * hash) + DB_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDbName().hashCode(); - hash = (37 * hash) + DESTINATION_DB_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDestinationDbName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.class, - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - tableName_ = ""; - dbName_ = ""; - destinationDbName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest build() { - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest buildPartial() { - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest result = - new com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.tableName_ = tableName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.dbName_ = dbName_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.destinationDbName_ = destinationDbName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest other) { - if (other - == com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getTableName().isEmpty()) { - tableName_ = other.tableName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDbName().isEmpty()) { - dbName_ = other.dbName_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getDestinationDbName().isEmpty()) { - destinationDbName_ = other.destinationDbName_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - tableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - dbName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - destinationDbName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object tableName_ = ""; - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The tableName. - */ - public java.lang.String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for tableName. - */ - public com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The tableName to set. - * @return This builder for chaining. - */ - public Builder setTableName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - tableName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTableName() { - tableName_ = getDefaultInstance().getTableName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for tableName to set. - * @return This builder for chaining. - */ - public Builder setTableNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - tableName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object dbName_ = ""; - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dbName. - */ - public java.lang.String getDbName() { - java.lang.Object ref = dbName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dbName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dbName. - */ - public com.google.protobuf.ByteString getDbNameBytes() { - java.lang.Object ref = dbName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dbName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The dbName to set. - * @return This builder for chaining. - */ - public Builder setDbName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - dbName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDbName() { - dbName_ = getDefaultInstance().getDbName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for dbName to set. - * @return This builder for chaining. - */ - public Builder setDbNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - dbName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object destinationDbName_ = ""; - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The destinationDbName. - */ - public java.lang.String getDestinationDbName() { - java.lang.Object ref = destinationDbName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationDbName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for destinationDbName. - */ - public com.google.protobuf.ByteString getDestinationDbNameBytes() { - java.lang.Object ref = destinationDbName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - destinationDbName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The destinationDbName to set. - * @return This builder for chaining. - */ - public Builder setDestinationDbName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationDbName_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDestinationDbName() { - destinationDbName_ = getDefaultInstance().getDestinationDbName(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for destinationDbName to set. - * @return This builder for chaining. - */ - public Builder setDestinationDbNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - destinationDbName_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) - private static final com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest(); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MoveTableToDatabaseRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseRequestOrBuilder.java deleted file mode 100644 index d5979df24c76..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseRequestOrBuilder.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface MoveTableToDatabaseRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Required. The name of the table to be moved.
-   * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The tableName. - */ - java.lang.String getTableName(); - /** - * - * - *
-   * Required. The name of the table to be moved.
-   * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for tableName. - */ - com.google.protobuf.ByteString getTableNameBytes(); - - /** - * - * - *
-   * Required. The name of the database where the table resides.
-   * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dbName. - */ - java.lang.String getDbName(); - /** - * - * - *
-   * Required. The name of the database where the table resides.
-   * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dbName. - */ - com.google.protobuf.ByteString getDbNameBytes(); - - /** - * - * - *
-   * Required. The name of the database where the table should be moved.
-   * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The destinationDbName. - */ - java.lang.String getDestinationDbName(); - /** - * - * - *
-   * Required. The name of the database where the table should be moved.
-   * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for destinationDbName. - */ - com.google.protobuf.ByteString getDestinationDbNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponse.java deleted file mode 100644 index a8fea150c049..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponse.java +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse} - */ -public final class MoveTableToDatabaseResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) - MoveTableToDatabaseResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use MoveTableToDatabaseResponse.newBuilder() to construct. - private MoveTableToDatabaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MoveTableToDatabaseResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveTableToDatabaseResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.class, - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse other = - (com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.class, - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse build() { - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse buildPartial() { - com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse result = - new com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) { - return mergeFrom((com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse other) { - if (other - == com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) - private static final com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse(); - } - - public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MoveTableToDatabaseResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponseOrBuilder.java deleted file mode 100644 index fa3a1964d48b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponseOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface MoveTableToDatabaseResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfig.java deleted file mode 100644 index bdb5d7056a9d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfig.java +++ /dev/null @@ -1,2134 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Network configuration for the Dataproc Metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.NetworkConfig} - */ -public final class NetworkConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.NetworkConfig) - NetworkConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use NetworkConfig.newBuilder() to construct. - private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NetworkConfig() { - consumers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NetworkConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.NetworkConfig.class, - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder.class); - } - - public interface ConsumerOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - boolean hasSubnetwork(); - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - java.lang.String getSubnetwork(); - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - com.google.protobuf.ByteString getSubnetworkBytes(); - - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore
-     * service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore
-     * service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.VpcResourceCase - getVpcResourceCase(); - } - /** - * - * - *
-   * Contains information of the customer's network configurations.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.NetworkConfig.Consumer} - */ - public static final class Consumer extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) - ConsumerOrBuilder { - private static final long serialVersionUID = 0L; - // Use Consumer.newBuilder() to construct. - private Consumer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Consumer() { - endpointUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Consumer(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.class, - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder.class); - } - - private int vpcResourceCase_ = 0; - private java.lang.Object vpcResource_; - - public enum VpcResourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SUBNETWORK(1), - VPCRESOURCE_NOT_SET(0); - private final int value; - - private VpcResourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VpcResourceCase valueOf(int value) { - return forNumber(value); - } - - public static VpcResourceCase forNumber(int value) { - switch (value) { - case 1: - return SUBNETWORK; - case 0: - return VPCRESOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VpcResourceCase getVpcResourceCase() { - return VpcResourceCase.forNumber(vpcResourceCase_); - } - - public static final int SUBNETWORK_FIELD_NUMBER = 1; - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - public boolean hasSubnetwork() { - return vpcResourceCase_ == 1; - } - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - public java.lang.String getSubnetwork() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (vpcResourceCase_ == 1) { - vpcResource_ = s; - } - return s; - } - } - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - public com.google.protobuf.ByteString getSubnetworkBytes() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (vpcResourceCase_ == 1) { - vpcResource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore
-     * service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore
-     * service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (vpcResourceCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vpcResource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (vpcResourceCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vpcResource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer other = - (com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer) obj; - - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (!getVpcResourceCase().equals(other.getVpcResourceCase())) return false; - switch (vpcResourceCase_) { - case 1: - if (!getSubnetwork().equals(other.getSubnetwork())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - switch (vpcResourceCase_) { - case 1: - hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; - hash = (53 * hash) + getSubnetwork().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Contains information of the customer's network configurations.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.NetworkConfig.Consumer} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) - com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.class, - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpointUri_ = ""; - vpcResourceCase_ = 0; - vpcResource_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer build() { - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer buildPartial() { - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer result = - new com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endpointUri_ = endpointUri_; - } - } - - private void buildPartialOneofs( - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer result) { - result.vpcResourceCase_ = vpcResourceCase_; - result.vpcResource_ = this.vpcResource_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer) { - return mergeFrom((com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer other) { - if (other == com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.getDefaultInstance()) - return this; - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - switch (other.getVpcResourceCase()) { - case SUBNETWORK: - { - vpcResourceCase_ = 1; - vpcResource_ = other.vpcResource_; - onChanged(); - break; - } - case VPCRESOURCE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - vpcResourceCase_ = 1; - vpcResource_ = s; - break; - } // case 10 - case 26: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int vpcResourceCase_ = 0; - private java.lang.Object vpcResource_; - - public VpcResourceCase getVpcResourceCase() { - return VpcResourceCase.forNumber(vpcResourceCase_); - } - - public Builder clearVpcResource() { - vpcResourceCase_ = 0; - vpcResource_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - @java.lang.Override - public boolean hasSubnetwork() { - return vpcResourceCase_ == 1; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - @java.lang.Override - public java.lang.String getSubnetwork() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (vpcResourceCase_ == 1) { - vpcResource_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSubnetworkBytes() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (vpcResourceCase_ == 1) { - vpcResource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The subnetwork to set. - * @return This builder for chaining. - */ - public Builder setSubnetwork(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - vpcResourceCase_ = 1; - vpcResource_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearSubnetwork() { - if (vpcResourceCase_ == 1) { - vpcResourceCase_ = 0; - vpcResource_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for subnetwork to set. - * @return This builder for chaining. - */ - public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - vpcResourceCase_ = 1; - vpcResource_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) - private static final com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer(); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Consumer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int CONSUMERS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List consumers_; - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public java.util.List - getConsumersList() { - return consumers_; - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder> - getConsumersOrBuilderList() { - return consumers_; - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public int getConsumersCount() { - return consumers_.size(); - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getConsumers(int index) { - return consumers_.get(index); - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( - int index) { - return consumers_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < consumers_.size(); i++) { - output.writeMessage(1, consumers_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < consumers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, consumers_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.NetworkConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.NetworkConfig other = - (com.google.cloud.metastore.v1alpha.NetworkConfig) obj; - - if (!getConsumersList().equals(other.getConsumersList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConsumersCount() > 0) { - hash = (37 * hash) + CONSUMERS_FIELD_NUMBER; - hash = (53 * hash) + getConsumersList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.NetworkConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Network configuration for the Dataproc Metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.NetworkConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.NetworkConfig) - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.NetworkConfig.class, - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.NetworkConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (consumersBuilder_ == null) { - consumers_ = java.util.Collections.emptyList(); - } else { - consumers_ = null; - consumersBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_NetworkConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig build() { - com.google.cloud.metastore.v1alpha.NetworkConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig buildPartial() { - com.google.cloud.metastore.v1alpha.NetworkConfig result = - new com.google.cloud.metastore.v1alpha.NetworkConfig(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1alpha.NetworkConfig result) { - if (consumersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - consumers_ = java.util.Collections.unmodifiableList(consumers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.consumers_ = consumers_; - } else { - result.consumers_ = consumersBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.NetworkConfig result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.NetworkConfig) { - return mergeFrom((com.google.cloud.metastore.v1alpha.NetworkConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.NetworkConfig other) { - if (other == com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance()) - return this; - if (consumersBuilder_ == null) { - if (!other.consumers_.isEmpty()) { - if (consumers_.isEmpty()) { - consumers_ = other.consumers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConsumersIsMutable(); - consumers_.addAll(other.consumers_); - } - onChanged(); - } - } else { - if (!other.consumers_.isEmpty()) { - if (consumersBuilder_.isEmpty()) { - consumersBuilder_.dispose(); - consumersBuilder_ = null; - consumers_ = other.consumers_; - bitField0_ = (bitField0_ & ~0x00000001); - consumersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getConsumersFieldBuilder() - : null; - } else { - consumersBuilder_.addAllMessages(other.consumers_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer m = - input.readMessage( - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.parser(), - extensionRegistry); - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(m); - } else { - consumersBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List consumers_ = - java.util.Collections.emptyList(); - - private void ensureConsumersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - consumers_ = - new java.util.ArrayList( - consumers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer, - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder> - consumersBuilder_; - - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getConsumersList() { - if (consumersBuilder_ == null) { - return java.util.Collections.unmodifiableList(consumers_); - } else { - return consumersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public int getConsumersCount() { - if (consumersBuilder_ == null) { - return consumers_.size(); - } else { - return consumersBuilder_.getCount(); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getConsumers(int index) { - if (consumersBuilder_ == null) { - return consumers_.get(index); - } else { - return consumersBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setConsumers( - int index, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.set(index, value); - onChanged(); - } else { - consumersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setConsumers( - int index, - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.set(index, builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers(com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.add(value); - onChanged(); - } else { - consumersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - int index, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.add(index, value); - onChanged(); - } else { - consumersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - int index, - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(index, builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addAllConsumers( - java.lang.Iterable - values) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumers_); - onChanged(); - } else { - consumersBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearConsumers() { - if (consumersBuilder_ == null) { - consumers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - consumersBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder removeConsumers(int index) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.remove(index); - onChanged(); - } else { - consumersBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder getConsumersBuilder( - int index) { - return getConsumersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( - int index) { - if (consumersBuilder_ == null) { - return consumers_.get(index); - } else { - return consumersBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List< - ? extends com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder> - getConsumersOrBuilderList() { - if (consumersBuilder_ != null) { - return consumersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(consumers_); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder addConsumersBuilder() { - return getConsumersFieldBuilder() - .addBuilder( - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.getDefaultInstance()); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder addConsumersBuilder( - int index) { - return getConsumersFieldBuilder() - .addBuilder( - index, - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.getDefaultInstance()); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getConsumersBuilderList() { - return getConsumersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer, - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder> - getConsumersFieldBuilder() { - if (consumersBuilder_ == null) { - consumersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer, - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder>( - consumers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - consumers_ = null; - } - return consumersBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.NetworkConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.NetworkConfig) - private static final com.google.cloud.metastore.v1alpha.NetworkConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.NetworkConfig(); - } - - public static com.google.cloud.metastore.v1alpha.NetworkConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NetworkConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfigOrBuilder.java deleted file mode 100644 index ea107d4a0619..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfigOrBuilder.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface NetworkConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.NetworkConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - java.util.List getConsumersList(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getConsumers(int index); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - int getConsumersCount(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - java.util.List - getConsumersOrBuilderList(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( - int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadata.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadata.java deleted file mode 100644 index ad07178f538f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadata.java +++ /dev/null @@ -1,1833 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Represents the metadata of a long-running operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.OperationMetadata} - */ -public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.OperationMetadata) - OperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OperationMetadata() { - target_ = ""; - verb_ = ""; - statusMessage_ = ""; - apiVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.OperationMetadata.class, - com.google.cloud.metastore.v1alpha.OperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int TARGET_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object target_ = ""; - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERB_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object verb_ = ""; - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - @java.lang.Override - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object statusMessage_ = ""; - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - @java.lang.Override - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; - private boolean requestedCancellation_ = false; - /** - * - * - *
-   * Output only. Identifies whether the caller has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a
-   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-   * `Code.CANCELLED`.
-   * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - @java.lang.Override - public boolean getRequestedCancellation() { - return requestedCancellation_; - } - - public static final int API_VERSION_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object apiVersion_ = ""; - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - @java.lang.Override - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); - } - if (requestedCancellation_ != false) { - output.writeBool(6, requestedCancellation_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); - } - if (requestedCancellation_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.OperationMetadata other = - (com.google.cloud.metastore.v1alpha.OperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (!getTarget().equals(other.getTarget())) return false; - if (!getVerb().equals(other.getVerb())) return false; - if (!getStatusMessage().equals(other.getStatusMessage())) return false; - if (getRequestedCancellation() != other.getRequestedCancellation()) return false; - if (!getApiVersion().equals(other.getApiVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - hash = (37 * hash) + VERB_FIELD_NUMBER; - hash = (53 * hash) + getVerb().hashCode(); - hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStatusMessage().hashCode(); - hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the metadata of a long-running operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.OperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.OperationMetadata) - com.google.cloud.metastore.v1alpha.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.OperationMetadata.class, - com.google.cloud.metastore.v1alpha.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.OperationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - target_ = ""; - verb_ = ""; - statusMessage_ = ""; - requestedCancellation_ = false; - apiVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.OperationMetadata build() { - com.google.cloud.metastore.v1alpha.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.OperationMetadata buildPartial() { - com.google.cloud.metastore.v1alpha.OperationMetadata result = - new com.google.cloud.metastore.v1alpha.OperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.OperationMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.target_ = target_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.verb_ = verb_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.statusMessage_ = statusMessage_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.requestedCancellation_ = requestedCancellation_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.apiVersion_ = apiVersion_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.OperationMetadata) { - return mergeFrom((com.google.cloud.metastore.v1alpha.OperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.OperationMetadata other) { - if (other == com.google.cloud.metastore.v1alpha.OperationMetadata.getDefaultInstance()) - return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getStatusMessage().isEmpty()) { - statusMessage_ = other.statusMessage_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.getRequestedCancellation() != false) { - setRequestedCancellation(other.getRequestedCancellation()); - } - if (!other.getApiVersion().isEmpty()) { - apiVersion_ = other.apiVersion_; - bitField0_ |= 0x00000040; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - target_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - verb_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - statusMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 48: - { - requestedCancellation_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 58: - { - apiVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000001); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000002); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object target_ = ""; - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The target to set. - * @return This builder for chaining. - */ - public Builder setTarget(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - target_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearTarget() { - target_ = getDefaultInstance().getTarget(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for target to set. - * @return This builder for chaining. - */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - target_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The verb to set. - * @return This builder for chaining. - */ - public Builder setVerb(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - verb_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearVerb() { - verb_ = getDefaultInstance().getVerb(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for verb to set. - * @return This builder for chaining. - */ - public Builder setVerbBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - verb_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object statusMessage_ = ""; - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - public com.google.protobuf.ByteString getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - statusMessage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStatusMessage() { - statusMessage_ = getDefaultInstance().getStatusMessage(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - statusMessage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private boolean requestedCancellation_; - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - @java.lang.Override - public boolean getRequestedCancellation() { - return requestedCancellation_; - } - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The requestedCancellation to set. - * @return This builder for chaining. - */ - public Builder setRequestedCancellation(boolean value) { - - requestedCancellation_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearRequestedCancellation() { - bitField0_ = (bitField0_ & ~0x00000020); - requestedCancellation_ = false; - onChanged(); - return this; - } - - private java.lang.Object apiVersion_ = ""; - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - apiVersion_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearApiVersion() { - apiVersion_ = getDefaultInstance().getApiVersion(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - apiVersion_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.OperationMetadata) - private static final com.google.cloud.metastore.v1alpha.OperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.OperationMetadata(); - } - - public static com.google.cloud.metastore.v1alpha.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadataOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadataOrBuilder.java deleted file mode 100644 index 01b84efb9227..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface OperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - java.lang.String getTarget(); - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - com.google.protobuf.ByteString getTargetBytes(); - - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - java.lang.String getVerb(); - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - com.google.protobuf.ByteString getVerbBytes(); - - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - java.lang.String getStatusMessage(); - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - com.google.protobuf.ByteString getStatusMessageBytes(); - - /** - * - * - *
-   * Output only. Identifies whether the caller has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a
-   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-   * `Code.CANCELLED`.
-   * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - boolean getRequestedCancellation(); - - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - java.lang.String getApiVersion(); - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - com.google.protobuf.ByteString getApiVersionBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequest.java deleted file mode 100644 index 12e9479d1161..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequest.java +++ /dev/null @@ -1,849 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.QueryMetadataRequest} - */ -public final class QueryMetadataRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.QueryMetadataRequest) - QueryMetadataRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use QueryMetadataRequest.newBuilder() to construct. - private QueryMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private QueryMetadataRequest() { - service_ = ""; - query_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryMetadataRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.QueryMetadataRequest.class, - com.google.cloud.metastore.v1alpha.QueryMetadataRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to query
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to query
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object query_ = ""; - /** - * - * - *
-   * Required. A read-only SQL query to execute against the metadata database.
-   * The query cannot change or mutate the data.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The query. - */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } - } - /** - * - * - *
-   * Required. A read-only SQL query to execute against the metadata database.
-   * The query cannot change or mutate the data.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for query. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.QueryMetadataRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.QueryMetadataRequest other = - (com.google.cloud.metastore.v1alpha.QueryMetadataRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getQuery().equals(other.getQuery())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.QueryMetadataRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.QueryMetadataRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.QueryMetadataRequest) - com.google.cloud.metastore.v1alpha.QueryMetadataRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.QueryMetadataRequest.class, - com.google.cloud.metastore.v1alpha.QueryMetadataRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.QueryMetadataRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - query_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.QueryMetadataRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.QueryMetadataRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.QueryMetadataRequest build() { - com.google.cloud.metastore.v1alpha.QueryMetadataRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.QueryMetadataRequest buildPartial() { - com.google.cloud.metastore.v1alpha.QueryMetadataRequest result = - new com.google.cloud.metastore.v1alpha.QueryMetadataRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.QueryMetadataRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.query_ = query_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.QueryMetadataRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.QueryMetadataRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.QueryMetadataRequest other) { - if (other == com.google.cloud.metastore.v1alpha.QueryMetadataRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - query_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object query_ = ""; - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The query. - */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for query. - */ - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The query to set. - * @return This builder for chaining. - */ - public Builder setQuery(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - query_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearQuery() { - query_ = getDefaultInstance().getQuery(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for query to set. - * @return This builder for chaining. - */ - public Builder setQueryBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - query_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.QueryMetadataRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.QueryMetadataRequest) - private static final com.google.cloud.metastore.v1alpha.QueryMetadataRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.QueryMetadataRequest(); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryMetadataRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.QueryMetadataRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequestOrBuilder.java deleted file mode 100644 index cd71495e1417..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface QueryMetadataRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.QueryMetadataRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to query
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to query
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Required. A read-only SQL query to execute against the metadata database.
-   * The query cannot change or mutate the data.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The query. - */ - java.lang.String getQuery(); - /** - * - * - *
-   * Required. A read-only SQL query to execute against the metadata database.
-   * The query cannot change or mutate the data.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for query. - */ - com.google.protobuf.ByteString getQueryBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponse.java deleted file mode 100644 index c6bc2905828d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponse.java +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.QueryMetadataResponse} - */ -public final class QueryMetadataResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.QueryMetadataResponse) - QueryMetadataResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use QueryMetadataResponse.newBuilder() to construct. - private QueryMetadataResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private QueryMetadataResponse() { - resultManifestUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryMetadataResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.QueryMetadataResponse.class, - com.google.cloud.metastore.v1alpha.QueryMetadataResponse.Builder.class); - } - - public static final int RESULT_MANIFEST_URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object resultManifestUri_ = ""; - /** - * - * - *
-   * The manifest URI  is link to a JSON instance in Cloud Storage.
-   * This instance manifests immediately along with QueryMetadataResponse. The
-   * content of the URI is not retriable until the long-running operation query
-   * against the metadata finishes.
-   * 
- * - * string result_manifest_uri = 1; - * - * @return The resultManifestUri. - */ - @java.lang.Override - public java.lang.String getResultManifestUri() { - java.lang.Object ref = resultManifestUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resultManifestUri_ = s; - return s; - } - } - /** - * - * - *
-   * The manifest URI  is link to a JSON instance in Cloud Storage.
-   * This instance manifests immediately along with QueryMetadataResponse. The
-   * content of the URI is not retriable until the long-running operation query
-   * against the metadata finishes.
-   * 
- * - * string result_manifest_uri = 1; - * - * @return The bytes for resultManifestUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResultManifestUriBytes() { - java.lang.Object ref = resultManifestUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resultManifestUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resultManifestUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resultManifestUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resultManifestUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resultManifestUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.QueryMetadataResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.QueryMetadataResponse other = - (com.google.cloud.metastore.v1alpha.QueryMetadataResponse) obj; - - if (!getResultManifestUri().equals(other.getResultManifestUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESULT_MANIFEST_URI_FIELD_NUMBER; - hash = (53 * hash) + getResultManifestUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.QueryMetadataResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.QueryMetadataResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.QueryMetadataResponse) - com.google.cloud.metastore.v1alpha.QueryMetadataResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.QueryMetadataResponse.class, - com.google.cloud.metastore.v1alpha.QueryMetadataResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.QueryMetadataResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resultManifestUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.QueryMetadataResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.QueryMetadataResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.QueryMetadataResponse build() { - com.google.cloud.metastore.v1alpha.QueryMetadataResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.QueryMetadataResponse buildPartial() { - com.google.cloud.metastore.v1alpha.QueryMetadataResponse result = - new com.google.cloud.metastore.v1alpha.QueryMetadataResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.QueryMetadataResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resultManifestUri_ = resultManifestUri_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.QueryMetadataResponse) { - return mergeFrom((com.google.cloud.metastore.v1alpha.QueryMetadataResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.QueryMetadataResponse other) { - if (other == com.google.cloud.metastore.v1alpha.QueryMetadataResponse.getDefaultInstance()) - return this; - if (!other.getResultManifestUri().isEmpty()) { - resultManifestUri_ = other.resultManifestUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - resultManifestUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object resultManifestUri_ = ""; - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @return The resultManifestUri. - */ - public java.lang.String getResultManifestUri() { - java.lang.Object ref = resultManifestUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resultManifestUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @return The bytes for resultManifestUri. - */ - public com.google.protobuf.ByteString getResultManifestUriBytes() { - java.lang.Object ref = resultManifestUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resultManifestUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @param value The resultManifestUri to set. - * @return This builder for chaining. - */ - public Builder setResultManifestUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - resultManifestUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearResultManifestUri() { - resultManifestUri_ = getDefaultInstance().getResultManifestUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @param value The bytes for resultManifestUri to set. - * @return This builder for chaining. - */ - public Builder setResultManifestUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - resultManifestUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.QueryMetadataResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.QueryMetadataResponse) - private static final com.google.cloud.metastore.v1alpha.QueryMetadataResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.QueryMetadataResponse(); - } - - public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryMetadataResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.QueryMetadataResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponseOrBuilder.java deleted file mode 100644 index a07baa2162cb..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponseOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface QueryMetadataResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.QueryMetadataResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The manifest URI  is link to a JSON instance in Cloud Storage.
-   * This instance manifests immediately along with QueryMetadataResponse. The
-   * content of the URI is not retriable until the long-running operation query
-   * against the metadata finishes.
-   * 
- * - * string result_manifest_uri = 1; - * - * @return The resultManifestUri. - */ - java.lang.String getResultManifestUri(); - /** - * - * - *
-   * The manifest URI  is link to a JSON instance in Cloud Storage.
-   * This instance manifests immediately along with QueryMetadataResponse. The
-   * content of the URI is not retriable until the long-running operation query
-   * against the metadata finishes.
-   * 
- * - * string result_manifest_uri = 1; - * - * @return The bytes for resultManifestUri. - */ - com.google.protobuf.ByteString getResultManifestUriBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequest.java deleted file mode 100644 index 8be98362f68e..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequest.java +++ /dev/null @@ -1,771 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.RemoveIamPolicyRequest} - */ -public final class RemoveIamPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) - RemoveIamPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use RemoveIamPolicyRequest.newBuilder() to construct. - private RemoveIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RemoveIamPolicyRequest() { - resource_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RemoveIamPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.class, - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.Builder.class); - } - - public static final int RESOURCE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object resource_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the dataplane resource to remove
-   * IAM policy, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-   * or
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the dataplane resource to remove
-   * IAM policy, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-   * or
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASYNCHRONOUS_FIELD_NUMBER = 2; - private boolean asynchronous_ = false; - /** - * - * - *
-   * Optional. Removes IAM policy attached to database or table asynchronously
-   * when it is set. The default is false.
-   * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The asynchronous. - */ - @java.lang.Override - public boolean getAsynchronous() { - return asynchronous_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - if (asynchronous_ != false) { - output.writeBool(2, asynchronous_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - if (asynchronous_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, asynchronous_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest other = - (com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) obj; - - if (!getResource().equals(other.getResource())) return false; - if (getAsynchronous() != other.getAsynchronous()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - hash = (37 * hash) + ASYNCHRONOUS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAsynchronous()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.RemoveIamPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.class, - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resource_ = ""; - asynchronous_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest build() { - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest buildPartial() { - com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest result = - new com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resource_ = resource_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.asynchronous_ = asynchronous_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest other) { - if (other == com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.getDefaultInstance()) - return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getAsynchronous() != false) { - setAsynchronous(other.getAsynchronous()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - resource_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - asynchronous_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object resource_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - resource_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearResource() { - resource_ = getDefaultInstance().getResource(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - resource_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private boolean asynchronous_; - /** - * - * - *
-     * Optional. Removes IAM policy attached to database or table asynchronously
-     * when it is set. The default is false.
-     * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The asynchronous. - */ - @java.lang.Override - public boolean getAsynchronous() { - return asynchronous_; - } - /** - * - * - *
-     * Optional. Removes IAM policy attached to database or table asynchronously
-     * when it is set. The default is false.
-     * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The asynchronous to set. - * @return This builder for chaining. - */ - public Builder setAsynchronous(boolean value) { - - asynchronous_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Removes IAM policy attached to database or table asynchronously
-     * when it is set. The default is false.
-     * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearAsynchronous() { - bitField0_ = (bitField0_ & ~0x00000002); - asynchronous_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) - private static final com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest(); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveIamPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequestOrBuilder.java deleted file mode 100644 index 5fac916de142..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequestOrBuilder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface RemoveIamPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the dataplane resource to remove
-   * IAM policy, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-   * or
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - java.lang.String getResource(); - /** - * - * - *
-   * Required. The relative resource name of the dataplane resource to remove
-   * IAM policy, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-   * or
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - com.google.protobuf.ByteString getResourceBytes(); - - /** - * - * - *
-   * Optional. Removes IAM policy attached to database or table asynchronously
-   * when it is set. The default is false.
-   * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The asynchronous. - */ - boolean getAsynchronous(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponse.java deleted file mode 100644 index 6c2cb8d9d03c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponse.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.RemoveIamPolicyResponse} - */ -public final class RemoveIamPolicyResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) - RemoveIamPolicyResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use RemoveIamPolicyResponse.newBuilder() to construct. - private RemoveIamPolicyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RemoveIamPolicyResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RemoveIamPolicyResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.class, - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.Builder.class); - } - - public static final int SUCCESS_FIELD_NUMBER = 1; - private boolean success_ = false; - /** - * - * - *
-   * True if the policy is successfully removed.
-   * 
- * - * bool success = 1; - * - * @return The success. - */ - @java.lang.Override - public boolean getSuccess() { - return success_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (success_ != false) { - output.writeBool(1, success_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (success_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, success_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse other = - (com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) obj; - - if (getSuccess() != other.getSuccess()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SUCCESS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSuccess()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.RemoveIamPolicyResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.class, - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - success_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse build() { - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse buildPartial() { - com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse result = - new com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.success_ = success_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) { - return mergeFrom((com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse other) { - if (other == com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.getDefaultInstance()) - return this; - if (other.getSuccess() != false) { - setSuccess(other.getSuccess()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - success_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private boolean success_; - /** - * - * - *
-     * True if the policy is successfully removed.
-     * 
- * - * bool success = 1; - * - * @return The success. - */ - @java.lang.Override - public boolean getSuccess() { - return success_; - } - /** - * - * - *
-     * True if the policy is successfully removed.
-     * 
- * - * bool success = 1; - * - * @param value The success to set. - * @return This builder for chaining. - */ - public Builder setSuccess(boolean value) { - - success_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * True if the policy is successfully removed.
-     * 
- * - * bool success = 1; - * - * @return This builder for chaining. - */ - public Builder clearSuccess() { - bitField0_ = (bitField0_ & ~0x00000001); - success_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) - private static final com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse(); - } - - public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveIamPolicyResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponseOrBuilder.java deleted file mode 100644 index 2ef0614386de..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponseOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface RemoveIamPolicyResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * True if the policy is successfully removed.
-   * 
- * - * bool success = 1; - * - * @return The success. - */ - boolean getSuccess(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Restore.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Restore.java deleted file mode 100644 index 9bc6a4ce32c7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Restore.java +++ /dev/null @@ -1,2073 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * The details of a metadata restore operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Restore} - */ -public final class Restore extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Restore) - RestoreOrBuilder { - private static final long serialVersionUID = 0L; - // Use Restore.newBuilder() to construct. - private Restore(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Restore() { - state_ = 0; - backup_ = ""; - type_ = 0; - details_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Restore(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Restore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Restore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Restore.class, - com.google.cloud.metastore.v1alpha.Restore.Builder.class); - } - - /** - * - * - *
-   * The current state of the restore.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.Restore.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata restore is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata restore is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata restore completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata restore failed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - * - * - *
-     * The metadata restore is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata restore is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata restore is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata restore completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata restore failed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - * - * - *
-     * The metadata restore is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return FAILED; - case 4: - return CANCELLED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.Restore.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Restore.State) - } - - /** - * - * - *
-   * The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.Restore.RestoreType} - */ - public enum RestoreType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The restore type is unknown.
-     * 
- * - * RESTORE_TYPE_UNSPECIFIED = 0; - */ - RESTORE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * The service's metadata and configuration are restored.
-     * 
- * - * FULL = 1; - */ - FULL(1), - /** - * - * - *
-     * Only the service's metadata is restored.
-     * 
- * - * METADATA_ONLY = 2; - */ - METADATA_ONLY(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The restore type is unknown.
-     * 
- * - * RESTORE_TYPE_UNSPECIFIED = 0; - */ - public static final int RESTORE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The service's metadata and configuration are restored.
-     * 
- * - * FULL = 1; - */ - public static final int FULL_VALUE = 1; - /** - * - * - *
-     * Only the service's metadata is restored.
-     * 
- * - * METADATA_ONLY = 2; - */ - public static final int METADATA_ONLY_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RestoreType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static RestoreType forNumber(int value) { - switch (value) { - case 0: - return RESTORE_TYPE_UNSPECIFIED; - case 1: - return FULL; - case 2: - return METADATA_ONLY; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RestoreType findValueByNumber(int number) { - return RestoreType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.Restore.getDescriptor().getEnumTypes().get(1); - } - - private static final RestoreType[] VALUES = values(); - - public static RestoreType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private RestoreType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Restore.RestoreType) - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore.State getState() { - com.google.cloud.metastore.v1alpha.Restore.State result = - com.google.cloud.metastore.v1alpha.Restore.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1alpha.Restore.State.UNRECOGNIZED : result; - } - - public static final int BACKUP_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object backup_ = ""; - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - @java.lang.Override - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 5; - private int type_ = 0; - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore.RestoreType getType() { - com.google.cloud.metastore.v1alpha.Restore.RestoreType result = - com.google.cloud.metastore.v1alpha.Restore.RestoreType.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1alpha.Restore.RestoreType.UNRECOGNIZED - : result; - } - - public static final int DETAILS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object details_ = ""; - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to
-   * be restored to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - @java.lang.Override - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to
-   * be restored to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1alpha.Restore.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, backup_); - } - if (type_ - != com.google.cloud.metastore.v1alpha.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(5, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, details_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1alpha.Restore.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, backup_); - } - if (type_ - != com.google.cloud.metastore.v1alpha.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, details_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.Restore)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.Restore other = - (com.google.cloud.metastore.v1alpha.Restore) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (!getBackup().equals(other.getBackup())) return false; - if (type_ != other.type_) return false; - if (!getDetails().equals(other.getDetails())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Restore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Restore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a metadata restore operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Restore} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Restore) - com.google.cloud.metastore.v1alpha.RestoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Restore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Restore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Restore.class, - com.google.cloud.metastore.v1alpha.Restore.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.Restore.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - backup_ = ""; - type_ = 0; - details_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Restore_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.Restore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore build() { - com.google.cloud.metastore.v1alpha.Restore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore buildPartial() { - com.google.cloud.metastore.v1alpha.Restore result = - new com.google.cloud.metastore.v1alpha.Restore(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.Restore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.backup_ = backup_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.details_ = details_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.Restore) { - return mergeFrom((com.google.cloud.metastore.v1alpha.Restore) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Restore other) { - if (other == com.google.cloud.metastore.v1alpha.Restore.getDefaultInstance()) return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getBackup().isEmpty()) { - backup_ = other.backup_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getDetails().isEmpty()) { - details_ = other.details_; - bitField0_ |= 0x00000020; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - backup_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: - { - details_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && startTime_ != null - && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000001); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000002); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore.State getState() { - com.google.cloud.metastore.v1alpha.Restore.State result = - com.google.cloud.metastore.v1alpha.Restore.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1alpha.Restore.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1alpha.Restore.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000004); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object backup_ = ""; - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The backup to set. - * @return This builder for chaining. - */ - public Builder setBackup(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearBackup() { - backup_ = getDefaultInstance().getBackup(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for backup to set. - * @return This builder for chaining. - */ - public Builder setBackupBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backup_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore.RestoreType getType() { - com.google.cloud.metastore.v1alpha.Restore.RestoreType result = - com.google.cloud.metastore.v1alpha.Restore.RestoreType.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1alpha.Restore.RestoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.metastore.v1alpha.Restore.RestoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000010); - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object details_ = ""; - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The details to set. - * @return This builder for chaining. - */ - public Builder setDetails(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDetails() { - details_ = getDefaultInstance().getDetails(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for details to set. - * @return This builder for chaining. - */ - public Builder setDetailsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - details_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Restore) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Restore) - private static final com.google.cloud.metastore.v1alpha.Restore DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Restore(); - } - - public static com.google.cloud.metastore.v1alpha.Restore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Restore parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreOrBuilder.java deleted file mode 100644 index f04c230c91c0..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreOrBuilder.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface RestoreOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Restore) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1alpha.Restore.State getState(); - - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - java.lang.String getBackup(); - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - com.google.protobuf.ByteString getBackupBytes(); - - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - com.google.cloud.metastore.v1alpha.Restore.RestoreType getType(); - - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to
-   * be restored to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - java.lang.String getDetails(); - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to
-   * be restored to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - com.google.protobuf.ByteString getDetailsBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequest.java deleted file mode 100644 index bdcf64d13247..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequest.java +++ /dev/null @@ -1,1283 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for [DataprocMetastore.Restore][].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.RestoreServiceRequest} - */ -public final class RestoreServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.RestoreServiceRequest) - RestoreServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use RestoreServiceRequest.newBuilder() to construct. - private RestoreServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RestoreServiceRequest() { - service_ = ""; - backup_ = ""; - restoreType_ = 0; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.RestoreServiceRequest.class, - com.google.cloud.metastore.v1alpha.RestoreServiceRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * restore, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * restore, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - @java.lang.Override - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } - } - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESTORE_TYPE_FIELD_NUMBER = 3; - private int restoreType_ = 0; - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - @java.lang.Override - public int getRestoreTypeValue() { - return restoreType_; - } - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore.RestoreType getRestoreType() { - com.google.cloud.metastore.v1alpha.Restore.RestoreType result = - com.google.cloud.metastore.v1alpha.Restore.RestoreType.forNumber(restoreType_); - return result == null - ? com.google.cloud.metastore.v1alpha.Restore.RestoreType.UNRECOGNIZED - : result; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backup_); - } - if (restoreType_ - != com.google.cloud.metastore.v1alpha.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, restoreType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backup_); - } - if (restoreType_ - != com.google.cloud.metastore.v1alpha.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, restoreType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.RestoreServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.RestoreServiceRequest other = - (com.google.cloud.metastore.v1alpha.RestoreServiceRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getBackup().equals(other.getBackup())) return false; - if (restoreType_ != other.restoreType_) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - hash = (37 * hash) + RESTORE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + restoreType_; - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.RestoreServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.Restore][].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.RestoreServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.RestoreServiceRequest) - com.google.cloud.metastore.v1alpha.RestoreServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.RestoreServiceRequest.class, - com.google.cloud.metastore.v1alpha.RestoreServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.RestoreServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - backup_ = ""; - restoreType_ = 0; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RestoreServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.RestoreServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RestoreServiceRequest build() { - com.google.cloud.metastore.v1alpha.RestoreServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RestoreServiceRequest buildPartial() { - com.google.cloud.metastore.v1alpha.RestoreServiceRequest result = - new com.google.cloud.metastore.v1alpha.RestoreServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.RestoreServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.backup_ = backup_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.restoreType_ = restoreType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.RestoreServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.RestoreServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.RestoreServiceRequest other) { - if (other == com.google.cloud.metastore.v1alpha.RestoreServiceRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBackup().isEmpty()) { - backup_ = other.backup_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.restoreType_ != 0) { - setRestoreTypeValue(other.getRestoreTypeValue()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - backup_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - restoreType_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The backup to set. - * @return This builder for chaining. - */ - public Builder setBackup(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearBackup() { - backup_ = getDefaultInstance().getBackup(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for backup to set. - * @return This builder for chaining. - */ - public Builder setBackupBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backup_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int restoreType_ = 0; - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - @java.lang.Override - public int getRestoreTypeValue() { - return restoreType_; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for restoreType to set. - * @return This builder for chaining. - */ - public Builder setRestoreTypeValue(int value) { - restoreType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Restore.RestoreType getRestoreType() { - com.google.cloud.metastore.v1alpha.Restore.RestoreType result = - com.google.cloud.metastore.v1alpha.Restore.RestoreType.forNumber(restoreType_); - return result == null - ? com.google.cloud.metastore.v1alpha.Restore.RestoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The restoreType to set. - * @return This builder for chaining. - */ - public Builder setRestoreType(com.google.cloud.metastore.v1alpha.Restore.RestoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - restoreType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearRestoreType() { - bitField0_ = (bitField0_ & ~0x00000004); - restoreType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.RestoreServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.RestoreServiceRequest) - private static final com.google.cloud.metastore.v1alpha.RestoreServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.RestoreServiceRequest(); - } - - public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RestoreServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.RestoreServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequestOrBuilder.java deleted file mode 100644 index 3e74e24cf055..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequestOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface RestoreServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.RestoreServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * restore, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * restore, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - java.lang.String getBackup(); - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - com.google.protobuf.ByteString getBackupBytes(); - - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - int getRestoreTypeValue(); - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - com.google.cloud.metastore.v1alpha.Restore.RestoreType getRestoreType(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Secret.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Secret.java deleted file mode 100644 index b4b0769eb981..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Secret.java +++ /dev/null @@ -1,775 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * A securely stored value.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Secret} - */ -public final class Secret extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Secret) - SecretOrBuilder { - private static final long serialVersionUID = 0L; - // Use Secret.newBuilder() to construct. - private Secret(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Secret() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Secret(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Secret_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Secret_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Secret.class, - com.google.cloud.metastore.v1alpha.Secret.Builder.class); - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public enum ValueCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CLOUD_SECRET(2), - VALUE_NOT_SET(0); - private final int value; - - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 2: - return CLOUD_SECRET; - case 0: - return VALUE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public static final int CLOUD_SECRET_FIELD_NUMBER = 2; - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - public boolean hasCloudSecret() { - return valueCase_ == 2; - } - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - public java.lang.String getCloudSecret() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 2) { - value_ = s; - } - return s; - } - } - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - public com.google.protobuf.ByteString getCloudSecretBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (valueCase_ == 2) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (valueCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.Secret)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.Secret other = - (com.google.cloud.metastore.v1alpha.Secret) obj; - - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 2: - if (!getCloudSecret().equals(other.getCloudSecret())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (valueCase_) { - case 2: - hash = (37 * hash) + CLOUD_SECRET_FIELD_NUMBER; - hash = (53 * hash) + getCloudSecret().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Secret parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Secret prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A securely stored value.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Secret} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Secret) - com.google.cloud.metastore.v1alpha.SecretOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Secret_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Secret_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Secret.class, - com.google.cloud.metastore.v1alpha.Secret.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.Secret.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Secret_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Secret getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Secret build() { - com.google.cloud.metastore.v1alpha.Secret result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Secret buildPartial() { - com.google.cloud.metastore.v1alpha.Secret result = - new com.google.cloud.metastore.v1alpha.Secret(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.Secret result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.Secret result) { - result.valueCase_ = valueCase_; - result.value_ = this.value_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.Secret) { - return mergeFrom((com.google.cloud.metastore.v1alpha.Secret) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Secret other) { - if (other == com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance()) return this; - switch (other.getValueCase()) { - case CLOUD_SECRET: - { - valueCase_ = 2; - value_ = other.value_; - onChanged(); - break; - } - case VALUE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - valueCase_ = 2; - value_ = s; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - @java.lang.Override - public boolean hasCloudSecret() { - return valueCase_ == 2; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - @java.lang.Override - public java.lang.String getCloudSecret() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 2) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCloudSecretBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (valueCase_ == 2) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @param value The cloudSecret to set. - * @return This builder for chaining. - */ - public Builder setCloudSecret(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return This builder for chaining. - */ - public Builder clearCloudSecret() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @param value The bytes for cloudSecret to set. - * @return This builder for chaining. - */ - public Builder setCloudSecretBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Secret) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Secret) - private static final com.google.cloud.metastore.v1alpha.Secret DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Secret(); - } - - public static com.google.cloud.metastore.v1alpha.Secret getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Secret parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Secret getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/SecretOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/SecretOrBuilder.java deleted file mode 100644 index 1f8e4478620f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/SecretOrBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface SecretOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Secret) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - boolean hasCloudSecret(); - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - java.lang.String getCloudSecret(); - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - com.google.protobuf.ByteString getCloudSecretBytes(); - - public com.google.cloud.metastore.v1alpha.Secret.ValueCase getValueCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Service.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Service.java deleted file mode 100644 index 360fc09c2b8a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Service.java +++ /dev/null @@ -1,6170 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * A managed metastore service that serves metadata queries.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Service} - */ -public final class Service extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Service) - ServiceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Service.newBuilder() to construct. - private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Service() { - name_ = ""; - network_ = ""; - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - artifactGcsUri_ = ""; - tier_ = 0; - uid_ = ""; - releaseChannel_ = 0; - databaseType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Service(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Service_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Service.class, - com.google.cloud.metastore.v1alpha.Service.Builder.class); - } - - /** - * - * - *
-   * The current state of the metastore service.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.Service.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metastore service is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metastore service is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The metastore service is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - ACTIVE(2), - /** - * - * - *
-     * The metastore service is entering suspension. Its query-serving
-     * availability may cease unexpectedly.
-     * 
- * - * SUSPENDING = 3; - */ - SUSPENDING(3), - /** - * - * - *
-     * The metastore service is suspended and unable to serve queries.
-     * 
- * - * SUSPENDED = 4; - */ - SUSPENDED(4), - /** - * - * - *
-     * The metastore service is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 5; - */ - UPDATING(5), - /** - * - * - *
-     * The metastore service is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 6; - */ - DELETING(6), - /** - * - * - *
-     * The metastore service has encountered an error and cannot be used. The
-     * metastore service should be deleted.
-     * 
- * - * ERROR = 7; - */ - ERROR(7), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metastore service is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metastore service is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The metastore service is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - public static final int ACTIVE_VALUE = 2; - /** - * - * - *
-     * The metastore service is entering suspension. Its query-serving
-     * availability may cease unexpectedly.
-     * 
- * - * SUSPENDING = 3; - */ - public static final int SUSPENDING_VALUE = 3; - /** - * - * - *
-     * The metastore service is suspended and unable to serve queries.
-     * 
- * - * SUSPENDED = 4; - */ - public static final int SUSPENDED_VALUE = 4; - /** - * - * - *
-     * The metastore service is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 5; - */ - public static final int UPDATING_VALUE = 5; - /** - * - * - *
-     * The metastore service is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 6; - */ - public static final int DELETING_VALUE = 6; - /** - * - * - *
-     * The metastore service has encountered an error and cannot be used. The
-     * metastore service should be deleted.
-     * 
- * - * ERROR = 7; - */ - public static final int ERROR_VALUE = 7; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return ACTIVE; - case 3: - return SUSPENDING; - case 4: - return SUSPENDED; - case 5: - return UPDATING; - case 6: - return DELETING; - case 7: - return ERROR; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.Service.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Service.State) - } - - /** - * - * - *
-   * Available service tiers.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.Service.Tier} - */ - public enum Tier implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The tier is not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - TIER_UNSPECIFIED(0), - /** - * - * - *
-     * The developer tier provides limited scalability and no fault tolerance.
-     * Good for low-cost proof-of-concept.
-     * 
- * - * DEVELOPER = 1; - */ - DEVELOPER(1), - /** - * - * - *
-     * The enterprise tier provides multi-zone high availability, and sufficient
-     * scalability for enterprise-level Dataproc Metastore workloads.
-     * 
- * - * ENTERPRISE = 3; - */ - ENTERPRISE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The tier is not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - public static final int TIER_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The developer tier provides limited scalability and no fault tolerance.
-     * Good for low-cost proof-of-concept.
-     * 
- * - * DEVELOPER = 1; - */ - public static final int DEVELOPER_VALUE = 1; - /** - * - * - *
-     * The enterprise tier provides multi-zone high availability, and sufficient
-     * scalability for enterprise-level Dataproc Metastore workloads.
-     * 
- * - * ENTERPRISE = 3; - */ - public static final int ENTERPRISE_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Tier valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Tier forNumber(int value) { - switch (value) { - case 0: - return TIER_UNSPECIFIED; - case 1: - return DEVELOPER; - case 3: - return ENTERPRISE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Tier findValueByNumber(int number) { - return Tier.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.Service.getDescriptor().getEnumTypes().get(1); - } - - private static final Tier[] VALUES = values(); - - public static Tier valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Tier(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Service.Tier) - } - - /** - * - * - *
-   * Release channels bundle features of varying levels of stability. Newer
-   * features may be introduced initially into less stable release channels and
-   * can be automatically promoted into more stable release channels.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.Service.ReleaseChannel} - */ - public enum ReleaseChannel implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Release channel is not specified.
-     * 
- * - * RELEASE_CHANNEL_UNSPECIFIED = 0; - */ - RELEASE_CHANNEL_UNSPECIFIED(0), - /** - * - * - *
-     * The `CANARY` release channel contains the newest features, which may be
-     * unstable and subject to unresolved issues with no known workarounds.
-     * Services using the `CANARY` release channel are not subject to any SLAs.
-     * 
- * - * CANARY = 1; - */ - CANARY(1), - /** - * - * - *
-     * The `STABLE` release channel contains features that are considered stable
-     * and have been validated for production use.
-     * 
- * - * STABLE = 2; - */ - STABLE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Release channel is not specified.
-     * 
- * - * RELEASE_CHANNEL_UNSPECIFIED = 0; - */ - public static final int RELEASE_CHANNEL_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The `CANARY` release channel contains the newest features, which may be
-     * unstable and subject to unresolved issues with no known workarounds.
-     * Services using the `CANARY` release channel are not subject to any SLAs.
-     * 
- * - * CANARY = 1; - */ - public static final int CANARY_VALUE = 1; - /** - * - * - *
-     * The `STABLE` release channel contains features that are considered stable
-     * and have been validated for production use.
-     * 
- * - * STABLE = 2; - */ - public static final int STABLE_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ReleaseChannel valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ReleaseChannel forNumber(int value) { - switch (value) { - case 0: - return RELEASE_CHANNEL_UNSPECIFIED; - case 1: - return CANARY; - case 2: - return STABLE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ReleaseChannel findValueByNumber(int number) { - return ReleaseChannel.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.Service.getDescriptor().getEnumTypes().get(2); - } - - private static final ReleaseChannel[] VALUES = values(); - - public static ReleaseChannel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ReleaseChannel(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Service.ReleaseChannel) - } - - /** - * - * - *
-   * The backend database type for the metastore service.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1alpha.Service.DatabaseType} - */ - public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The DATABASE_TYPE is not set.
-     * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - DATABASE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * MySQL is used to persist the metastore data.
-     * 
- * - * MYSQL = 1; - */ - MYSQL(1), - /** - * - * - *
-     * Spanner is used to persist the metastore data.
-     * 
- * - * SPANNER = 2; - */ - SPANNER(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The DATABASE_TYPE is not set.
-     * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * MySQL is used to persist the metastore data.
-     * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - /** - * - * - *
-     * Spanner is used to persist the metastore data.
-     * 
- * - * SPANNER = 2; - */ - public static final int SPANNER_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DatabaseType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DatabaseType forNumber(int value) { - switch (value) { - case 0: - return DATABASE_TYPE_UNSPECIFIED; - case 1: - return MYSQL; - case 2: - return SPANNER; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DatabaseType findValueByNumber(int number) { - return DatabaseType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.Service.getDescriptor().getEnumTypes().get(3); - } - - private static final DatabaseType[] VALUES = values(); - - public static DatabaseType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DatabaseType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Service.DatabaseType) - } - - private int metastoreConfigCase_ = 0; - private java.lang.Object metastoreConfig_; - - public enum MetastoreConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - HIVE_METASTORE_CONFIG(5), - METASTORECONFIG_NOT_SET(0); - private final int value; - - private MetastoreConfigCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetastoreConfigCase valueOf(int value) { - return forNumber(value); - } - - public static MetastoreConfigCase forNumber(int value) { - switch (value) { - case 5: - return HIVE_METASTORE_CONFIG; - case 0: - return METASTORECONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MetastoreConfigCase getMetastoreConfigCase() { - return MetastoreConfigCase.forNumber(metastoreConfigCase_); - } - - public static final int HIVE_METASTORE_CONFIG_FIELD_NUMBER = 5; - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - @java.lang.Override - public boolean hasHiveMetastoreConfig() { - return metastoreConfigCase_ == 5; - } - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getHiveMetastoreConfig() { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); - } - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder - getHiveMetastoreConfigOrBuilder() { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the
-   * following format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the
-   * following format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Service_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int NETWORK_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object network_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the
-   * instance can be accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - @java.lang.Override - public java.lang.String getNetwork() { - java.lang.Object ref = network_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - network_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the
-   * instance can be accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNetworkBytes() { - java.lang.Object ref = network_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - network_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PORT_FIELD_NUMBER = 9; - private int port_ = 0; - /** - * - * - *
-   * The TCP port at which the metastore service is reached. Default: 9083.
-   * 
- * - * int32 port = 9; - * - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - - public static final int STATE_FIELD_NUMBER = 10; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service.State getState() { - com.google.cloud.metastore.v1alpha.Service.State result = - com.google.cloud.metastore.v1alpha.Service.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1alpha.Service.State.UNRECOGNIZED : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private volatile java.lang.Object stateMessage_ = ""; - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore service, if available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - @java.lang.Override - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore service, if available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARTIFACT_GCS_URI_FIELD_NUMBER = 12; - - @SuppressWarnings("serial") - private volatile java.lang.Object artifactGcsUri_ = ""; - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-   * where artifacts related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - @java.lang.Override - public java.lang.String getArtifactGcsUri() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactGcsUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-   * where artifacts related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getArtifactGcsUriBytes() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - artifactGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TIER_FIELD_NUMBER = 13; - private int tier_ = 0; - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override - public int getTierValue() { - return tier_; - } - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @return The tier. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service.Tier getTier() { - com.google.cloud.metastore.v1alpha.Service.Tier result = - com.google.cloud.metastore.v1alpha.Service.Tier.forNumber(tier_); - return result == null ? com.google.cloud.metastore.v1alpha.Service.Tier.UNRECOGNIZED : result; - } - - public static final int METADATA_INTEGRATION_FIELD_NUMBER = 14; - private com.google.cloud.metastore.v1alpha.MetadataIntegration metadataIntegration_; - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - * - * @return Whether the metadataIntegration field is set. - */ - @java.lang.Override - public boolean hasMetadataIntegration() { - return metadataIntegration_ != null; - } - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - * - * @return The metadataIntegration. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataIntegration getMetadataIntegration() { - return metadataIntegration_ == null - ? com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance() - : metadataIntegration_; - } - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder - getMetadataIntegrationOrBuilder() { - return metadataIntegration_ == null - ? com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance() - : metadataIntegration_; - } - - public static final int MAINTENANCE_WINDOW_FIELD_NUMBER = 15; - private com.google.cloud.metastore.v1alpha.MaintenanceWindow maintenanceWindow_; - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - @java.lang.Override - public boolean hasMaintenanceWindow() { - return maintenanceWindow_ != null; - } - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MaintenanceWindow getMaintenanceWindow() { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder - getMaintenanceWindowOrBuilder() { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - - public static final int UID_FIELD_NUMBER = 16; - - @SuppressWarnings("serial") - private volatile java.lang.Object uid_ = ""; - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER = 17; - private com.google.cloud.metastore.v1alpha.MetadataManagementActivity metadataManagementActivity_; - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - @java.lang.Override - public boolean hasMetadataManagementActivity() { - return metadataManagementActivity_ != null; - } - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataManagementActivity - getMetadataManagementActivity() { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder() { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - - public static final int RELEASE_CHANNEL_FIELD_NUMBER = 19; - private int releaseChannel_ = 0; - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - @java.lang.Override - public int getReleaseChannelValue() { - return releaseChannel_; - } - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service.ReleaseChannel getReleaseChannel() { - com.google.cloud.metastore.v1alpha.Service.ReleaseChannel result = - com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.forNumber(releaseChannel_); - return result == null - ? com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.UNRECOGNIZED - : result; - } - - public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 20; - private com.google.cloud.metastore.v1alpha.EncryptionConfig encryptionConfig_; - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - @java.lang.Override - public boolean hasEncryptionConfig() { - return encryptionConfig_ != null; - } - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.EncryptionConfig getEncryptionConfig() { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder - getEncryptionConfigOrBuilder() { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - - public static final int NETWORK_CONFIG_FIELD_NUMBER = 21; - private com.google.cloud.metastore.v1alpha.NetworkConfig networkConfig_; - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - @java.lang.Override - public boolean hasNetworkConfig() { - return networkConfig_ != null; - } - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - - public static final int DATABASE_TYPE_FIELD_NUMBER = 22; - private int databaseType_ = 0; - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service.DatabaseType getDatabaseType() { - com.google.cloud.metastore.v1alpha.Service.DatabaseType result = - com.google.cloud.metastore.v1alpha.Service.DatabaseType.forNumber(databaseType_); - return result == null - ? com.google.cloud.metastore.v1alpha.Service.DatabaseType.UNRECOGNIZED - : result; - } - - public static final int TELEMETRY_CONFIG_FIELD_NUMBER = 23; - private com.google.cloud.metastore.v1alpha.TelemetryConfig telemetryConfig_; - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - @java.lang.Override - public boolean hasTelemetryConfig() { - return telemetryConfig_ != null; - } - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.TelemetryConfig getTelemetryConfig() { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (metastoreConfigCase_ == 5) { - output.writeMessage( - 5, (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, network_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpointUri_); - } - if (port_ != 0) { - output.writeInt32(9, port_); - } - if (state_ != com.google.cloud.metastore.v1alpha.Service.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(10, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, artifactGcsUri_); - } - if (tier_ != com.google.cloud.metastore.v1alpha.Service.Tier.TIER_UNSPECIFIED.getNumber()) { - output.writeEnum(13, tier_); - } - if (metadataIntegration_ != null) { - output.writeMessage(14, getMetadataIntegration()); - } - if (maintenanceWindow_ != null) { - output.writeMessage(15, getMaintenanceWindow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, uid_); - } - if (metadataManagementActivity_ != null) { - output.writeMessage(17, getMetadataManagementActivity()); - } - if (releaseChannel_ - != com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED - .getNumber()) { - output.writeEnum(19, releaseChannel_); - } - if (encryptionConfig_ != null) { - output.writeMessage(20, getEncryptionConfig()); - } - if (networkConfig_ != null) { - output.writeMessage(21, getNetworkConfig()); - } - if (databaseType_ - != com.google.cloud.metastore.v1alpha.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(22, databaseType_); - } - if (telemetryConfig_ != null) { - output.writeMessage(23, getTelemetryConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (metastoreConfigCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, network_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpointUri_); - } - if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, port_); - } - if (state_ != com.google.cloud.metastore.v1alpha.Service.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, artifactGcsUri_); - } - if (tier_ != com.google.cloud.metastore.v1alpha.Service.Tier.TIER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, tier_); - } - if (metadataIntegration_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(14, getMetadataIntegration()); - } - if (maintenanceWindow_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getMaintenanceWindow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, uid_); - } - if (metadataManagementActivity_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 17, getMetadataManagementActivity()); - } - if (releaseChannel_ - != com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, releaseChannel_); - } - if (encryptionConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getEncryptionConfig()); - } - if (networkConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getNetworkConfig()); - } - if (databaseType_ - != com.google.cloud.metastore.v1alpha.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, databaseType_); - } - if (telemetryConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getTelemetryConfig()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.Service)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.Service other = - (com.google.cloud.metastore.v1alpha.Service) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getNetwork().equals(other.getNetwork())) return false; - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (getPort() != other.getPort()) return false; - if (state_ != other.state_) return false; - if (!getStateMessage().equals(other.getStateMessage())) return false; - if (!getArtifactGcsUri().equals(other.getArtifactGcsUri())) return false; - if (tier_ != other.tier_) return false; - if (hasMetadataIntegration() != other.hasMetadataIntegration()) return false; - if (hasMetadataIntegration()) { - if (!getMetadataIntegration().equals(other.getMetadataIntegration())) return false; - } - if (hasMaintenanceWindow() != other.hasMaintenanceWindow()) return false; - if (hasMaintenanceWindow()) { - if (!getMaintenanceWindow().equals(other.getMaintenanceWindow())) return false; - } - if (!getUid().equals(other.getUid())) return false; - if (hasMetadataManagementActivity() != other.hasMetadataManagementActivity()) return false; - if (hasMetadataManagementActivity()) { - if (!getMetadataManagementActivity().equals(other.getMetadataManagementActivity())) - return false; - } - if (releaseChannel_ != other.releaseChannel_) return false; - if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; - if (hasEncryptionConfig()) { - if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; - } - if (hasNetworkConfig() != other.hasNetworkConfig()) return false; - if (hasNetworkConfig()) { - if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; - } - if (databaseType_ != other.databaseType_) return false; - if (hasTelemetryConfig() != other.hasTelemetryConfig()) return false; - if (hasTelemetryConfig()) { - if (!getTelemetryConfig().equals(other.getTelemetryConfig())) return false; - } - if (!getMetastoreConfigCase().equals(other.getMetastoreConfigCase())) return false; - switch (metastoreConfigCase_) { - case 5: - if (!getHiveMetastoreConfig().equals(other.getHiveMetastoreConfig())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getNetwork().hashCode(); - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - hash = (37 * hash) + ARTIFACT_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getArtifactGcsUri().hashCode(); - hash = (37 * hash) + TIER_FIELD_NUMBER; - hash = (53 * hash) + tier_; - if (hasMetadataIntegration()) { - hash = (37 * hash) + METADATA_INTEGRATION_FIELD_NUMBER; - hash = (53 * hash) + getMetadataIntegration().hashCode(); - } - if (hasMaintenanceWindow()) { - hash = (37 * hash) + MAINTENANCE_WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getMaintenanceWindow().hashCode(); - } - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - if (hasMetadataManagementActivity()) { - hash = (37 * hash) + METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER; - hash = (53 * hash) + getMetadataManagementActivity().hashCode(); - } - hash = (37 * hash) + RELEASE_CHANNEL_FIELD_NUMBER; - hash = (53 * hash) + releaseChannel_; - if (hasEncryptionConfig()) { - hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getEncryptionConfig().hashCode(); - } - if (hasNetworkConfig()) { - hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNetworkConfig().hashCode(); - } - hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseType_; - if (hasTelemetryConfig()) { - hash = (37 * hash) + TELEMETRY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getTelemetryConfig().hashCode(); - } - switch (metastoreConfigCase_) { - case 5: - hash = (37 * hash) + HIVE_METASTORE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getHiveMetastoreConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Service parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Service parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.Service parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Service prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A managed metastore service that serves metadata queries.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.Service} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Service) - com.google.cloud.metastore.v1alpha.ServiceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Service_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.Service.class, - com.google.cloud.metastore.v1alpha.Service.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.Service.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (hiveMetastoreConfigBuilder_ != null) { - hiveMetastoreConfigBuilder_.clear(); - } - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - network_ = ""; - endpointUri_ = ""; - port_ = 0; - state_ = 0; - stateMessage_ = ""; - artifactGcsUri_ = ""; - tier_ = 0; - metadataIntegration_ = null; - if (metadataIntegrationBuilder_ != null) { - metadataIntegrationBuilder_.dispose(); - metadataIntegrationBuilder_ = null; - } - maintenanceWindow_ = null; - if (maintenanceWindowBuilder_ != null) { - maintenanceWindowBuilder_.dispose(); - maintenanceWindowBuilder_ = null; - } - uid_ = ""; - metadataManagementActivity_ = null; - if (metadataManagementActivityBuilder_ != null) { - metadataManagementActivityBuilder_.dispose(); - metadataManagementActivityBuilder_ = null; - } - releaseChannel_ = 0; - encryptionConfig_ = null; - if (encryptionConfigBuilder_ != null) { - encryptionConfigBuilder_.dispose(); - encryptionConfigBuilder_ = null; - } - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - databaseType_ = 0; - telemetryConfig_ = null; - if (telemetryConfigBuilder_ != null) { - telemetryConfigBuilder_.dispose(); - telemetryConfigBuilder_ = null; - } - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_Service_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.Service.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service build() { - com.google.cloud.metastore.v1alpha.Service result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service buildPartial() { - com.google.cloud.metastore.v1alpha.Service result = - new com.google.cloud.metastore.v1alpha.Service(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.Service result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.network_ = network_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.endpointUri_ = endpointUri_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.port_ = port_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.stateMessage_ = stateMessage_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.artifactGcsUri_ = artifactGcsUri_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.tier_ = tier_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.metadataIntegration_ = - metadataIntegrationBuilder_ == null - ? metadataIntegration_ - : metadataIntegrationBuilder_.build(); - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.maintenanceWindow_ = - maintenanceWindowBuilder_ == null - ? maintenanceWindow_ - : maintenanceWindowBuilder_.build(); - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.uid_ = uid_; - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.metadataManagementActivity_ = - metadataManagementActivityBuilder_ == null - ? metadataManagementActivity_ - : metadataManagementActivityBuilder_.build(); - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.releaseChannel_ = releaseChannel_; - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.encryptionConfig_ = - encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.networkConfig_ = - networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00080000) != 0)) { - result.databaseType_ = databaseType_; - } - if (((from_bitField0_ & 0x00100000) != 0)) { - result.telemetryConfig_ = - telemetryConfigBuilder_ == null ? telemetryConfig_ : telemetryConfigBuilder_.build(); - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.Service result) { - result.metastoreConfigCase_ = metastoreConfigCase_; - result.metastoreConfig_ = this.metastoreConfig_; - if (metastoreConfigCase_ == 5 && hiveMetastoreConfigBuilder_ != null) { - result.metastoreConfig_ = hiveMetastoreConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.Service) { - return mergeFrom((com.google.cloud.metastore.v1alpha.Service) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Service other) { - if (other == com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000010; - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.getPort() != 0) { - setPort(other.getPort()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - bitField0_ |= 0x00000200; - onChanged(); - } - if (!other.getArtifactGcsUri().isEmpty()) { - artifactGcsUri_ = other.artifactGcsUri_; - bitField0_ |= 0x00000400; - onChanged(); - } - if (other.tier_ != 0) { - setTierValue(other.getTierValue()); - } - if (other.hasMetadataIntegration()) { - mergeMetadataIntegration(other.getMetadataIntegration()); - } - if (other.hasMaintenanceWindow()) { - mergeMaintenanceWindow(other.getMaintenanceWindow()); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - bitField0_ |= 0x00004000; - onChanged(); - } - if (other.hasMetadataManagementActivity()) { - mergeMetadataManagementActivity(other.getMetadataManagementActivity()); - } - if (other.releaseChannel_ != 0) { - setReleaseChannelValue(other.getReleaseChannelValue()); - } - if (other.hasEncryptionConfig()) { - mergeEncryptionConfig(other.getEncryptionConfig()); - } - if (other.hasNetworkConfig()) { - mergeNetworkConfig(other.getNetworkConfig()); - } - if (other.databaseType_ != 0) { - setDatabaseTypeValue(other.getDatabaseTypeValue()); - } - if (other.hasTelemetryConfig()) { - mergeTelemetryConfig(other.getTelemetryConfig()); - } - switch (other.getMetastoreConfigCase()) { - case HIVE_METASTORE_CONFIG: - { - mergeHiveMetastoreConfig(other.getHiveMetastoreConfig()); - break; - } - case METASTORECONFIG_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - input.readMessage( - getHiveMetastoreConfigFieldBuilder().getBuilder(), extensionRegistry); - metastoreConfigCase_ = 5; - break; - } // case 42 - case 58: - { - network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 58 - case 66: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 66 - case 72: - { - port_ = input.readInt32(); - bitField0_ |= 0x00000080; - break; - } // case 72 - case 80: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 80 - case 90: - { - stateMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - break; - } // case 90 - case 98: - { - artifactGcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - break; - } // case 98 - case 104: - { - tier_ = input.readEnum(); - bitField0_ |= 0x00000800; - break; - } // case 104 - case 114: - { - input.readMessage( - getMetadataIntegrationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 114 - case 122: - { - input.readMessage( - getMaintenanceWindowFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; - break; - } // case 122 - case 130: - { - uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - break; - } // case 130 - case 138: - { - input.readMessage( - getMetadataManagementActivityFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; - break; - } // case 138 - case 152: - { - releaseChannel_ = input.readEnum(); - bitField0_ |= 0x00010000; - break; - } // case 152 - case 162: - { - input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; - break; - } // case 162 - case 170: - { - input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00040000; - break; - } // case 170 - case 176: - { - databaseType_ = input.readEnum(); - bitField0_ |= 0x00080000; - break; - } // case 176 - case 186: - { - input.readMessage(getTelemetryConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00100000; - break; - } // case 186 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int metastoreConfigCase_ = 0; - private java.lang.Object metastoreConfig_; - - public MetastoreConfigCase getMetastoreConfigCase() { - return MetastoreConfigCase.forNumber(metastoreConfigCase_); - } - - public Builder clearMetastoreConfig() { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig, - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder> - hiveMetastoreConfigBuilder_; - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - @java.lang.Override - public boolean hasHiveMetastoreConfig() { - return metastoreConfigCase_ == 5; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getHiveMetastoreConfig() { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); - } else { - if (metastoreConfigCase_ == 5) { - return hiveMetastoreConfigBuilder_.getMessage(); - } - return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder setHiveMetastoreConfig( - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig value) { - if (hiveMetastoreConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metastoreConfig_ = value; - onChanged(); - } else { - hiveMetastoreConfigBuilder_.setMessage(value); - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder setHiveMetastoreConfig( - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder builderForValue) { - if (hiveMetastoreConfigBuilder_ == null) { - metastoreConfig_ = builderForValue.build(); - onChanged(); - } else { - hiveMetastoreConfigBuilder_.setMessage(builderForValue.build()); - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder mergeHiveMetastoreConfig( - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig value) { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5 - && metastoreConfig_ - != com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance()) { - metastoreConfig_ = - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.newBuilder( - (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - metastoreConfig_ = value; - } - onChanged(); - } else { - if (metastoreConfigCase_ == 5) { - hiveMetastoreConfigBuilder_.mergeFrom(value); - } else { - hiveMetastoreConfigBuilder_.setMessage(value); - } - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder clearHiveMetastoreConfig() { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5) { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - onChanged(); - } - } else { - if (metastoreConfigCase_ == 5) { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - } - hiveMetastoreConfigBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder - getHiveMetastoreConfigBuilder() { - return getHiveMetastoreConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder - getHiveMetastoreConfigOrBuilder() { - if ((metastoreConfigCase_ == 5) && (hiveMetastoreConfigBuilder_ != null)) { - return hiveMetastoreConfigBuilder_.getMessageOrBuilder(); - } else { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig, - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder> - getHiveMetastoreConfigFieldBuilder() { - if (hiveMetastoreConfigBuilder_ == null) { - if (!(metastoreConfigCase_ == 5)) { - metastoreConfig_ = - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); - } - hiveMetastoreConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig, - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder>( - (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_, - getParentForChildren(), - isClean()); - metastoreConfig_ = null; - } - metastoreConfigCase_ = 5; - onChanged(); - return hiveMetastoreConfigBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000010; - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; - return this; - } - - private java.lang.Object network_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - public java.lang.String getNetwork() { - java.lang.Object ref = network_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - network_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - public com.google.protobuf.ByteString getNetworkBytes() { - java.lang.Object ref = network_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - network_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The network to set. - * @return This builder for chaining. - */ - public Builder setNetwork(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - network_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearNetwork() { - network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for network to set. - * @return This builder for chaining. - */ - public Builder setNetworkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - network_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private int port_; - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @param value The port to set. - * @return This builder for chaining. - */ - public Builder setPort(int value) { - - port_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @return This builder for chaining. - */ - public Builder clearPort() { - bitField0_ = (bitField0_ & ~0x00000080); - port_ = 0; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service.State getState() { - com.google.cloud.metastore.v1alpha.Service.State result = - com.google.cloud.metastore.v1alpha.Service.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1alpha.Service.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1alpha.Service.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000100); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object stateMessage_ = ""; - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - stateMessage_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - stateMessage_ = getDefaultInstance().getStateMessage(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - stateMessage_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - private java.lang.Object artifactGcsUri_ = ""; - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - public java.lang.String getArtifactGcsUri() { - java.lang.Object ref = artifactGcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactGcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - public com.google.protobuf.ByteString getArtifactGcsUriBytes() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - artifactGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The artifactGcsUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - artifactGcsUri_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearArtifactGcsUri() { - artifactGcsUri_ = getDefaultInstance().getArtifactGcsUri(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for artifactGcsUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - artifactGcsUri_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - private int tier_ = 0; - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override - public int getTierValue() { - return tier_; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @param value The enum numeric value on the wire for tier to set. - * @return This builder for chaining. - */ - public Builder setTierValue(int value) { - tier_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @return The tier. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service.Tier getTier() { - com.google.cloud.metastore.v1alpha.Service.Tier result = - com.google.cloud.metastore.v1alpha.Service.Tier.forNumber(tier_); - return result == null ? com.google.cloud.metastore.v1alpha.Service.Tier.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @param value The tier to set. - * @return This builder for chaining. - */ - public Builder setTier(com.google.cloud.metastore.v1alpha.Service.Tier value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - tier_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @return This builder for chaining. - */ - public Builder clearTier() { - bitField0_ = (bitField0_ & ~0x00000800); - tier_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.MetadataIntegration metadataIntegration_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataIntegration, - com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder, - com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder> - metadataIntegrationBuilder_; - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - * - * @return Whether the metadataIntegration field is set. - */ - public boolean hasMetadataIntegration() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - * - * @return The metadataIntegration. - */ - public com.google.cloud.metastore.v1alpha.MetadataIntegration getMetadataIntegration() { - if (metadataIntegrationBuilder_ == null) { - return metadataIntegration_ == null - ? com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance() - : metadataIntegration_; - } else { - return metadataIntegrationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - public Builder setMetadataIntegration( - com.google.cloud.metastore.v1alpha.MetadataIntegration value) { - if (metadataIntegrationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataIntegration_ = value; - } else { - metadataIntegrationBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - public Builder setMetadataIntegration( - com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder builderForValue) { - if (metadataIntegrationBuilder_ == null) { - metadataIntegration_ = builderForValue.build(); - } else { - metadataIntegrationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - public Builder mergeMetadataIntegration( - com.google.cloud.metastore.v1alpha.MetadataIntegration value) { - if (metadataIntegrationBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) - && metadataIntegration_ != null - && metadataIntegration_ - != com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance()) { - getMetadataIntegrationBuilder().mergeFrom(value); - } else { - metadataIntegration_ = value; - } - } else { - metadataIntegrationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - public Builder clearMetadataIntegration() { - bitField0_ = (bitField0_ & ~0x00001000); - metadataIntegration_ = null; - if (metadataIntegrationBuilder_ != null) { - metadataIntegrationBuilder_.dispose(); - metadataIntegrationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - public com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder - getMetadataIntegrationBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getMetadataIntegrationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - public com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder - getMetadataIntegrationOrBuilder() { - if (metadataIntegrationBuilder_ != null) { - return metadataIntegrationBuilder_.getMessageOrBuilder(); - } else { - return metadataIntegration_ == null - ? com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance() - : metadataIntegration_; - } - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataIntegration, - com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder, - com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder> - getMetadataIntegrationFieldBuilder() { - if (metadataIntegrationBuilder_ == null) { - metadataIntegrationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataIntegration, - com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder, - com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder>( - getMetadataIntegration(), getParentForChildren(), isClean()); - metadataIntegration_ = null; - } - return metadataIntegrationBuilder_; - } - - private com.google.cloud.metastore.v1alpha.MaintenanceWindow maintenanceWindow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MaintenanceWindow, - com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder> - maintenanceWindowBuilder_; - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - public boolean hasMaintenanceWindow() { - return ((bitField0_ & 0x00002000) != 0); - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - public com.google.cloud.metastore.v1alpha.MaintenanceWindow getMaintenanceWindow() { - if (maintenanceWindowBuilder_ == null) { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } else { - return maintenanceWindowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - public Builder setMaintenanceWindow( - com.google.cloud.metastore.v1alpha.MaintenanceWindow value) { - if (maintenanceWindowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maintenanceWindow_ = value; - } else { - maintenanceWindowBuilder_.setMessage(value); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - public Builder setMaintenanceWindow( - com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder builderForValue) { - if (maintenanceWindowBuilder_ == null) { - maintenanceWindow_ = builderForValue.build(); - } else { - maintenanceWindowBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - public Builder mergeMaintenanceWindow( - com.google.cloud.metastore.v1alpha.MaintenanceWindow value) { - if (maintenanceWindowBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) - && maintenanceWindow_ != null - && maintenanceWindow_ - != com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance()) { - getMaintenanceWindowBuilder().mergeFrom(value); - } else { - maintenanceWindow_ = value; - } - } else { - maintenanceWindowBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - public Builder clearMaintenanceWindow() { - bitField0_ = (bitField0_ & ~0x00002000); - maintenanceWindow_ = null; - if (maintenanceWindowBuilder_ != null) { - maintenanceWindowBuilder_.dispose(); - maintenanceWindowBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - public com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder - getMaintenanceWindowBuilder() { - bitField0_ |= 0x00002000; - onChanged(); - return getMaintenanceWindowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - public com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder - getMaintenanceWindowOrBuilder() { - if (maintenanceWindowBuilder_ != null) { - return maintenanceWindowBuilder_.getMessageOrBuilder(); - } else { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MaintenanceWindow, - com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder> - getMaintenanceWindowFieldBuilder() { - if (maintenanceWindowBuilder_ == null) { - maintenanceWindowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MaintenanceWindow, - com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder>( - getMaintenanceWindow(), getParentForChildren(), isClean()); - maintenanceWindow_ = null; - } - return maintenanceWindowBuilder_; - } - - private java.lang.Object uid_ = ""; - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uid_ = value; - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00004000); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uid_ = value; - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.MetadataManagementActivity - metadataManagementActivity_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataManagementActivity, - com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder> - metadataManagementActivityBuilder_; - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - public boolean hasMetadataManagementActivity() { - return ((bitField0_ & 0x00008000) != 0); - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - public com.google.cloud.metastore.v1alpha.MetadataManagementActivity - getMetadataManagementActivity() { - if (metadataManagementActivityBuilder_ == null) { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } else { - return metadataManagementActivityBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataManagementActivity( - com.google.cloud.metastore.v1alpha.MetadataManagementActivity value) { - if (metadataManagementActivityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataManagementActivity_ = value; - } else { - metadataManagementActivityBuilder_.setMessage(value); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataManagementActivity( - com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder builderForValue) { - if (metadataManagementActivityBuilder_ == null) { - metadataManagementActivity_ = builderForValue.build(); - } else { - metadataManagementActivityBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeMetadataManagementActivity( - com.google.cloud.metastore.v1alpha.MetadataManagementActivity value) { - if (metadataManagementActivityBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) - && metadataManagementActivity_ != null - && metadataManagementActivity_ - != com.google.cloud.metastore.v1alpha.MetadataManagementActivity - .getDefaultInstance()) { - getMetadataManagementActivityBuilder().mergeFrom(value); - } else { - metadataManagementActivity_ = value; - } - } else { - metadataManagementActivityBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMetadataManagementActivity() { - bitField0_ = (bitField0_ & ~0x00008000); - metadataManagementActivity_ = null; - if (metadataManagementActivityBuilder_ != null) { - metadataManagementActivityBuilder_.dispose(); - metadataManagementActivityBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder - getMetadataManagementActivityBuilder() { - bitField0_ |= 0x00008000; - onChanged(); - return getMetadataManagementActivityFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder() { - if (metadataManagementActivityBuilder_ != null) { - return metadataManagementActivityBuilder_.getMessageOrBuilder(); - } else { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataManagementActivity, - com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder> - getMetadataManagementActivityFieldBuilder() { - if (metadataManagementActivityBuilder_ == null) { - metadataManagementActivityBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataManagementActivity, - com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder>( - getMetadataManagementActivity(), getParentForChildren(), isClean()); - metadataManagementActivity_ = null; - } - return metadataManagementActivityBuilder_; - } - - private int releaseChannel_ = 0; - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - @java.lang.Override - public int getReleaseChannelValue() { - return releaseChannel_; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The enum numeric value on the wire for releaseChannel to set. - * @return This builder for chaining. - */ - public Builder setReleaseChannelValue(int value) { - releaseChannel_ = value; - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service.ReleaseChannel getReleaseChannel() { - com.google.cloud.metastore.v1alpha.Service.ReleaseChannel result = - com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.forNumber(releaseChannel_); - return result == null - ? com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The releaseChannel to set. - * @return This builder for chaining. - */ - public Builder setReleaseChannel( - com.google.cloud.metastore.v1alpha.Service.ReleaseChannel value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00010000; - releaseChannel_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearReleaseChannel() { - bitField0_ = (bitField0_ & ~0x00010000); - releaseChannel_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.EncryptionConfig, - com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder, - com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder> - encryptionConfigBuilder_; - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - public boolean hasEncryptionConfig() { - return ((bitField0_ & 0x00020000) != 0); - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - public com.google.cloud.metastore.v1alpha.EncryptionConfig getEncryptionConfig() { - if (encryptionConfigBuilder_ == null) { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } else { - return encryptionConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setEncryptionConfig(com.google.cloud.metastore.v1alpha.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encryptionConfig_ = value; - } else { - encryptionConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setEncryptionConfig( - com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder builderForValue) { - if (encryptionConfigBuilder_ == null) { - encryptionConfig_ = builderForValue.build(); - } else { - encryptionConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeEncryptionConfig( - com.google.cloud.metastore.v1alpha.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) - && encryptionConfig_ != null - && encryptionConfig_ - != com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance()) { - getEncryptionConfigBuilder().mergeFrom(value); - } else { - encryptionConfig_ = value; - } - } else { - encryptionConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearEncryptionConfig() { - bitField0_ = (bitField0_ & ~0x00020000); - encryptionConfig_ = null; - if (encryptionConfigBuilder_ != null) { - encryptionConfigBuilder_.dispose(); - encryptionConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder - getEncryptionConfigBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder - getEncryptionConfigOrBuilder() { - if (encryptionConfigBuilder_ != null) { - return encryptionConfigBuilder_.getMessageOrBuilder(); - } else { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.EncryptionConfig, - com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder, - com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { - if (encryptionConfigBuilder_ == null) { - encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.EncryptionConfig, - com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder, - com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder>( - getEncryptionConfig(), getParentForChildren(), isClean()); - encryptionConfig_ = null; - } - return encryptionConfigBuilder_; - } - - private com.google.cloud.metastore.v1alpha.NetworkConfig networkConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig, - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder> - networkConfigBuilder_; - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - public boolean hasNetworkConfig() { - return ((bitField0_ & 0x00040000) != 0); - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig() { - if (networkConfigBuilder_ == null) { - return networkConfig_ == null - ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() - : networkConfig_; - } else { - return networkConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - public Builder setNetworkConfig(com.google.cloud.metastore.v1alpha.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - networkConfig_ = value; - } else { - networkConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - public Builder setNetworkConfig( - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder builderForValue) { - if (networkConfigBuilder_ == null) { - networkConfig_ = builderForValue.build(); - } else { - networkConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - public Builder mergeNetworkConfig(com.google.cloud.metastore.v1alpha.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (((bitField0_ & 0x00040000) != 0) - && networkConfig_ != null - && networkConfig_ - != com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance()) { - getNetworkConfigBuilder().mergeFrom(value); - } else { - networkConfig_ = value; - } - } else { - networkConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - public Builder clearNetworkConfig() { - bitField0_ = (bitField0_ & ~0x00040000); - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - public com.google.cloud.metastore.v1alpha.NetworkConfig.Builder getNetworkConfigBuilder() { - bitField0_ |= 0x00040000; - onChanged(); - return getNetworkConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - public com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - if (networkConfigBuilder_ != null) { - return networkConfigBuilder_.getMessageOrBuilder(); - } else { - return networkConfig_ == null - ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig, - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder> - getNetworkConfigFieldBuilder() { - if (networkConfigBuilder_ == null) { - networkConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.NetworkConfig, - com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder>( - getNetworkConfig(), getParentForChildren(), isClean()); - networkConfig_ = null; - } - return networkConfigBuilder_; - } - - private int databaseType_ = 0; - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The enum numeric value on the wire for databaseType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseTypeValue(int value) { - databaseType_ = value; - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service.DatabaseType getDatabaseType() { - com.google.cloud.metastore.v1alpha.Service.DatabaseType result = - com.google.cloud.metastore.v1alpha.Service.DatabaseType.forNumber(databaseType_); - return result == null - ? com.google.cloud.metastore.v1alpha.Service.DatabaseType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The databaseType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseType(com.google.cloud.metastore.v1alpha.Service.DatabaseType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00080000; - databaseType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseType() { - bitField0_ = (bitField0_ & ~0x00080000); - databaseType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1alpha.TelemetryConfig telemetryConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.TelemetryConfig, - com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder, - com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder> - telemetryConfigBuilder_; - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - public boolean hasTelemetryConfig() { - return ((bitField0_ & 0x00100000) != 0); - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - public com.google.cloud.metastore.v1alpha.TelemetryConfig getTelemetryConfig() { - if (telemetryConfigBuilder_ == null) { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } else { - return telemetryConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - public Builder setTelemetryConfig(com.google.cloud.metastore.v1alpha.TelemetryConfig value) { - if (telemetryConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - telemetryConfig_ = value; - } else { - telemetryConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - public Builder setTelemetryConfig( - com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder builderForValue) { - if (telemetryConfigBuilder_ == null) { - telemetryConfig_ = builderForValue.build(); - } else { - telemetryConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - public Builder mergeTelemetryConfig(com.google.cloud.metastore.v1alpha.TelemetryConfig value) { - if (telemetryConfigBuilder_ == null) { - if (((bitField0_ & 0x00100000) != 0) - && telemetryConfig_ != null - && telemetryConfig_ - != com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance()) { - getTelemetryConfigBuilder().mergeFrom(value); - } else { - telemetryConfig_ = value; - } - } else { - telemetryConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - public Builder clearTelemetryConfig() { - bitField0_ = (bitField0_ & ~0x00100000); - telemetryConfig_ = null; - if (telemetryConfigBuilder_ != null) { - telemetryConfigBuilder_.dispose(); - telemetryConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - public com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder getTelemetryConfigBuilder() { - bitField0_ |= 0x00100000; - onChanged(); - return getTelemetryConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - public com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder - getTelemetryConfigOrBuilder() { - if (telemetryConfigBuilder_ != null) { - return telemetryConfigBuilder_.getMessageOrBuilder(); - } else { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.TelemetryConfig, - com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder, - com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder> - getTelemetryConfigFieldBuilder() { - if (telemetryConfigBuilder_ == null) { - telemetryConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.TelemetryConfig, - com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder, - com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder>( - getTelemetryConfig(), getParentForChildren(), isClean()); - telemetryConfig_ = null; - } - return telemetryConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Service) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Service) - private static final com.google.cloud.metastore.v1alpha.Service DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Service(); - } - - public static com.google.cloud.metastore.v1alpha.Service getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Service parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceOrBuilder.java deleted file mode 100644 index da616a2ba680..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceOrBuilder.java +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface ServiceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Service) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - boolean hasHiveMetastoreConfig(); - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getHiveMetastoreConfig(); - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; - */ - com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder(); - - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the
-   * following format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the
-   * following format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - int getLabelsCount(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the
-   * instance can be accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - java.lang.String getNetwork(); - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the
-   * instance can be accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - com.google.protobuf.ByteString getNetworkBytes(); - - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - /** - * - * - *
-   * The TCP port at which the metastore service is reached. Default: 9083.
-   * 
- * - * int32 port = 9; - * - * @return The port. - */ - int getPort(); - - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1alpha.Service.State getState(); - - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore service, if available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore service, if available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString getStateMessageBytes(); - - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-   * where artifacts related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - java.lang.String getArtifactGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-   * where artifacts related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - com.google.protobuf.ByteString getArtifactGcsUriBytes(); - - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - int getTierValue(); - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; - * - * @return The tier. - */ - com.google.cloud.metastore.v1alpha.Service.Tier getTier(); - - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - * - * @return Whether the metadataIntegration field is set. - */ - boolean hasMetadataIntegration(); - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - * - * @return The metadataIntegration. - */ - com.google.cloud.metastore.v1alpha.MetadataIntegration getMetadataIntegration(); - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; - */ - com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder getMetadataIntegrationOrBuilder(); - - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - boolean hasMaintenanceWindow(); - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - com.google.cloud.metastore.v1alpha.MaintenanceWindow getMaintenanceWindow(); - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; - */ - com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder(); - - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - java.lang.String getUid(); - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - com.google.protobuf.ByteString getUidBytes(); - - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - boolean hasMetadataManagementActivity(); - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - com.google.cloud.metastore.v1alpha.MetadataManagementActivity getMetadataManagementActivity(); - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder(); - - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - int getReleaseChannelValue(); - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - com.google.cloud.metastore.v1alpha.Service.ReleaseChannel getReleaseChannel(); - - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - boolean hasEncryptionConfig(); - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - com.google.cloud.metastore.v1alpha.EncryptionConfig getEncryptionConfig(); - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); - - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - boolean hasNetworkConfig(); - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig(); - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; - */ - com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); - - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - int getDatabaseTypeValue(); - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - com.google.cloud.metastore.v1alpha.Service.DatabaseType getDatabaseType(); - - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - boolean hasTelemetryConfig(); - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - com.google.cloud.metastore.v1alpha.TelemetryConfig getTelemetryConfig(); - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; - */ - com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder(); - - public com.google.cloud.metastore.v1alpha.Service.MetastoreConfigCase getMetastoreConfigCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfig.java deleted file mode 100644 index 6b14fd9786e7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfig.java +++ /dev/null @@ -1,755 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Telemetry Configuration for the Dataproc Metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.TelemetryConfig} - */ -public final class TelemetryConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.TelemetryConfig) - TelemetryConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use TelemetryConfig.newBuilder() to construct. - private TelemetryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TelemetryConfig() { - logFormat_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TelemetryConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.TelemetryConfig.class, - com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder.class); - } - - /** Protobuf enum {@code google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat} */ - public enum LogFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The LOG_FORMAT is not set.
-     * 
- * - * LOG_FORMAT_UNSPECIFIED = 0; - */ - LOG_FORMAT_UNSPECIFIED(0), - /** - * - * - *
-     * Logging output uses the legacy `textPayload` format.
-     * 
- * - * LEGACY = 1; - */ - LEGACY(1), - /** - * - * - *
-     * Logging output uses the `jsonPayload` format.
-     * 
- * - * JSON = 2; - */ - JSON(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The LOG_FORMAT is not set.
-     * 
- * - * LOG_FORMAT_UNSPECIFIED = 0; - */ - public static final int LOG_FORMAT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Logging output uses the legacy `textPayload` format.
-     * 
- * - * LEGACY = 1; - */ - public static final int LEGACY_VALUE = 1; - /** - * - * - *
-     * Logging output uses the `jsonPayload` format.
-     * 
- * - * JSON = 2; - */ - public static final int JSON_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LogFormat valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static LogFormat forNumber(int value) { - switch (value) { - case 0: - return LOG_FORMAT_UNSPECIFIED; - case 1: - return LEGACY; - case 2: - return JSON; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LogFormat findValueByNumber(int number) { - return LogFormat.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.TelemetryConfig.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final LogFormat[] VALUES = values(); - - public static LogFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private LogFormat(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat) - } - - public static final int LOG_FORMAT_FIELD_NUMBER = 1; - private int logFormat_ = 0; - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - @java.lang.Override - public int getLogFormatValue() { - return logFormat_; - } - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat getLogFormat() { - com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat result = - com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.forNumber(logFormat_); - return result == null - ? com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (logFormat_ - != com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, logFormat_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (logFormat_ - != com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, logFormat_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.TelemetryConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.TelemetryConfig other = - (com.google.cloud.metastore.v1alpha.TelemetryConfig) obj; - - if (logFormat_ != other.logFormat_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOG_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + logFormat_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1alpha.TelemetryConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Telemetry Configuration for the Dataproc Metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.TelemetryConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.TelemetryConfig) - com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.TelemetryConfig.class, - com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.TelemetryConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - logFormat_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.TelemetryConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.TelemetryConfig build() { - com.google.cloud.metastore.v1alpha.TelemetryConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.TelemetryConfig buildPartial() { - com.google.cloud.metastore.v1alpha.TelemetryConfig result = - new com.google.cloud.metastore.v1alpha.TelemetryConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.TelemetryConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.logFormat_ = logFormat_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.TelemetryConfig) { - return mergeFrom((com.google.cloud.metastore.v1alpha.TelemetryConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.TelemetryConfig other) { - if (other == com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance()) - return this; - if (other.logFormat_ != 0) { - setLogFormatValue(other.getLogFormatValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - logFormat_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int logFormat_ = 0; - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - @java.lang.Override - public int getLogFormatValue() { - return logFormat_; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @param value The enum numeric value on the wire for logFormat to set. - * @return This builder for chaining. - */ - public Builder setLogFormatValue(int value) { - logFormat_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat getLogFormat() { - com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat result = - com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.forNumber(logFormat_); - return result == null - ? com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @param value The logFormat to set. - * @return This builder for chaining. - */ - public Builder setLogFormat( - com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - logFormat_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @return This builder for chaining. - */ - public Builder clearLogFormat() { - bitField0_ = (bitField0_ & ~0x00000001); - logFormat_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.TelemetryConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.TelemetryConfig) - private static final com.google.cloud.metastore.v1alpha.TelemetryConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.TelemetryConfig(); - } - - public static com.google.cloud.metastore.v1alpha.TelemetryConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TelemetryConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.TelemetryConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfigOrBuilder.java deleted file mode 100644 index 62ec0cd1d934..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfigOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface TelemetryConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.TelemetryConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - int getLogFormatValue(); - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat getLogFormat(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequest.java deleted file mode 100644 index 5c00f07cc077..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequest.java +++ /dev/null @@ -1,1326 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for UpdateFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateFederationRequest} - */ -public final class UpdateFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.UpdateFederationRequest) - UpdateFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateFederationRequest.newBuilder() to construct. - private UpdateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateFederationRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.UpdateFederationRequest.class, - com.google.cloud.metastore.v1alpha.UpdateFederationRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int FEDERATION_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1alpha.Federation federation_; - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - @java.lang.Override - public boolean hasFederation() { - return federation_ != null; - } - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Federation getFederation() { - return federation_ == null - ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() - : federation_; - } - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder() { - return federation_ == null - ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() - : federation_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (federation_ != null) { - output.writeMessage(2, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (federation_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.UpdateFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.UpdateFederationRequest other = - (com.google.cloud.metastore.v1alpha.UpdateFederationRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasFederation() != other.hasFederation()) return false; - if (hasFederation()) { - if (!getFederation().equals(other.getFederation())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasFederation()) { - hash = (37 * hash) + FEDERATION_FIELD_NUMBER; - hash = (53 * hash) + getFederation().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.UpdateFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for UpdateFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.UpdateFederationRequest) - com.google.cloud.metastore.v1alpha.UpdateFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.UpdateFederationRequest.class, - com.google.cloud.metastore.v1alpha.UpdateFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.UpdateFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.UpdateFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateFederationRequest build() { - com.google.cloud.metastore.v1alpha.UpdateFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateFederationRequest buildPartial() { - com.google.cloud.metastore.v1alpha.UpdateFederationRequest result = - new com.google.cloud.metastore.v1alpha.UpdateFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.UpdateFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.federation_ = federationBuilder_ == null ? federation_ : federationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.UpdateFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.UpdateFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.UpdateFederationRequest other) { - if (other == com.google.cloud.metastore.v1alpha.UpdateFederationRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasFederation()) { - mergeFederation(other.getFederation()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getFederationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1alpha.Federation federation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder> - federationBuilder_; - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - public boolean hasFederation() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - public com.google.cloud.metastore.v1alpha.Federation getFederation() { - if (federationBuilder_ == null) { - return federation_ == null - ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() - : federation_; - } else { - return federationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation(com.google.cloud.metastore.v1alpha.Federation value) { - if (federationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - federation_ = value; - } else { - federationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation( - com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { - if (federationBuilder_ == null) { - federation_ = builderForValue.build(); - } else { - federationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeFederation(com.google.cloud.metastore.v1alpha.Federation value) { - if (federationBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && federation_ != null - && federation_ != com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()) { - getFederationBuilder().mergeFrom(value); - } else { - federation_ = value; - } - } else { - federationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearFederation() { - bitField0_ = (bitField0_ & ~0x00000002); - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.Federation.Builder getFederationBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getFederationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder() { - if (federationBuilder_ != null) { - return federationBuilder_.getMessageOrBuilder(); - } else { - return federation_ == null - ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() - : federation_; - } - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder> - getFederationFieldBuilder() { - if (federationBuilder_ == null) { - federationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Federation, - com.google.cloud.metastore.v1alpha.Federation.Builder, - com.google.cloud.metastore.v1alpha.FederationOrBuilder>( - getFederation(), getParentForChildren(), isClean()); - federation_ = null; - } - return federationBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.UpdateFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.UpdateFederationRequest) - private static final com.google.cloud.metastore.v1alpha.UpdateFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.UpdateFederationRequest(); - } - - public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequestOrBuilder.java deleted file mode 100644 index c41f508a4b45..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore_federation.proto - -package com.google.cloud.metastore.v1alpha; - -public interface UpdateFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.UpdateFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - boolean hasFederation(); - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - com.google.cloud.metastore.v1alpha.Federation getFederation(); - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequest.java deleted file mode 100644 index 375b02114227..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequest.java +++ /dev/null @@ -1,1336 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} - */ -public final class UpdateMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) - UpdateMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateMetadataImportRequest.newBuilder() to construct. - private UpdateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateMetadataImportRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.class, - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int METADATA_IMPORT_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1alpha.MetadataImport metadataImport_; - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - @java.lang.Override - public boolean hasMetadataImport() { - return metadataImport_ != null; - } - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() - : metadataImport_; - } - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() - : metadataImport_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (metadataImport_ != null) { - output.writeMessage(2, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (metadataImport_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest other = - (com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasMetadataImport() != other.hasMetadataImport()) return false; - if (hasMetadataImport()) { - if (!getMetadataImport().equals(other.getMetadataImport())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasMetadataImport()) { - hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImport().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.class, - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest build() { - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest result = - new com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadataImport_ = - metadataImportBuilder_ == null ? metadataImport_ : metadataImportBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest other) { - if (other - == com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasMetadataImport()) { - mergeMetadataImport(other.getMetadataImport()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getMetadataImportFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1alpha.MetadataImport metadataImport_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> - metadataImportBuilder_; - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - public boolean hasMetadataImport() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport() { - if (metadataImportBuilder_ == null) { - return metadataImport_ == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() - : metadataImport_; - } else { - return metadataImportBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport(com.google.cloud.metastore.v1alpha.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataImport_ = value; - } else { - metadataImportBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport( - com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { - if (metadataImportBuilder_ == null) { - metadataImport_ = builderForValue.build(); - } else { - metadataImportBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeMetadataImport(com.google.cloud.metastore.v1alpha.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && metadataImport_ != null - && metadataImport_ - != com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()) { - getMetadataImportBuilder().mergeFrom(value); - } else { - metadataImport_ = value; - } - } else { - metadataImportBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearMetadataImport() { - bitField0_ = (bitField0_ & ~0x00000002); - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataImport.Builder getMetadataImportBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataImportFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder() { - if (metadataImportBuilder_ != null) { - return metadataImportBuilder_.getMessageOrBuilder(); - } else { - return metadataImport_ == null - ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() - : metadataImport_; - } - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> - getMetadataImportFieldBuilder() { - if (metadataImportBuilder_ == null) { - metadataImportBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.MetadataImport, - com.google.cloud.metastore.v1alpha.MetadataImport.Builder, - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder>( - getMetadataImport(), getParentForChildren(), isClean()); - metadataImport_ = null; - } - return metadataImportBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) - private static final com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequestOrBuilder.java deleted file mode 100644 index 635cc562c82d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface UpdateMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - boolean hasMetadataImport(); - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport(); - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequest.java deleted file mode 100644 index d58001f1da3f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequest.java +++ /dev/null @@ -1,1327 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.UpdateService][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateServiceRequest} - */ -public final class UpdateServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.UpdateServiceRequest) - UpdateServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateServiceRequest.newBuilder() to construct. - private UpdateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateServiceRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.UpdateServiceRequest.class, - com.google.cloud.metastore.v1alpha.UpdateServiceRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int SERVICE_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1alpha.Service service_; - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - @java.lang.Override - public boolean hasService() { - return service_ != null; - } - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.Service getService() { - return service_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : service_; - } - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder() { - return service_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : service_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (service_ != null) { - output.writeMessage(2, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (service_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1alpha.UpdateServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1alpha.UpdateServiceRequest other = - (com.google.cloud.metastore.v1alpha.UpdateServiceRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasService() != other.hasService()) return false; - if (hasService()) { - if (!getService().equals(other.getService())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasService()) { - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1alpha.UpdateServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.UpdateService][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.UpdateServiceRequest) - com.google.cloud.metastore.v1alpha.UpdateServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1alpha.UpdateServiceRequest.class, - com.google.cloud.metastore.v1alpha.UpdateServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1alpha.UpdateServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1alpha.MetastoreProto - .internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1alpha.UpdateServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateServiceRequest build() { - com.google.cloud.metastore.v1alpha.UpdateServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateServiceRequest buildPartial() { - com.google.cloud.metastore.v1alpha.UpdateServiceRequest result = - new com.google.cloud.metastore.v1alpha.UpdateServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1alpha.UpdateServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.service_ = serviceBuilder_ == null ? service_ : serviceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1alpha.UpdateServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1alpha.UpdateServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1alpha.UpdateServiceRequest other) { - if (other == com.google.cloud.metastore.v1alpha.UpdateServiceRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasService()) { - mergeService(other.getService()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getServiceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1alpha.Service service_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder> - serviceBuilder_; - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - public boolean hasService() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - public com.google.cloud.metastore.v1alpha.Service getService() { - if (serviceBuilder_ == null) { - return service_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : service_; - } else { - return serviceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1alpha.Service value) { - if (serviceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - } else { - serviceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { - if (serviceBuilder_ == null) { - service_ = builderForValue.build(); - } else { - serviceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeService(com.google.cloud.metastore.v1alpha.Service value) { - if (serviceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && service_ != null - && service_ != com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()) { - getServiceBuilder().mergeFrom(value); - } else { - service_ = value; - } - } else { - serviceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearService() { - bitField0_ = (bitField0_ & ~0x00000002); - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.Service.Builder getServiceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getServiceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder() { - if (serviceBuilder_ != null) { - return serviceBuilder_.getMessageOrBuilder(); - } else { - return service_ == null - ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() - : service_; - } - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder> - getServiceFieldBuilder() { - if (serviceBuilder_ == null) { - serviceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1alpha.Service, - com.google.cloud.metastore.v1alpha.Service.Builder, - com.google.cloud.metastore.v1alpha.ServiceOrBuilder>( - getService(), getParentForChildren(), isClean()); - service_ = null; - } - return serviceBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.UpdateServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.UpdateServiceRequest) - private static final com.google.cloud.metastore.v1alpha.UpdateServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.UpdateServiceRequest(); - } - - public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1alpha.UpdateServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequestOrBuilder.java deleted file mode 100644 index 07cf1e6abe67..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1alpha/metastore.proto - -package com.google.cloud.metastore.v1alpha; - -public interface UpdateServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.UpdateServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - boolean hasService(); - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - com.google.cloud.metastore.v1alpha.Service getService(); - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore.proto b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore.proto deleted file mode 100644 index 05621431edce..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore.proto +++ /dev/null @@ -1,1627 +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 -// -// http://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. - -syntax = "proto3"; - -package google.cloud.metastore.v1alpha; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/type/dayofweek.proto"; - -option go_package = "cloud.google.com/go/metastore/apiv1alpha/metastorepb;metastorepb"; -option java_multiple_files = true; -option java_outer_classname = "MetastoreProto"; -option java_package = "com.google.cloud.metastore.v1alpha"; -option php_namespace = "Google\\Cloud\\Metastore\\V1alpha"; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Network" - pattern: "projects/{project}/global/networks/{network}" -}; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Subnetwork" - pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" -}; -option (google.api.resource_definition) = { - type: "dataplex.googleapis.com/Lake" - pattern: "projects/{project}/locations/{location}/lakes/{lake}" -}; - -// 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: -// -// * The service works with a collection of Google Cloud projects, named: -// `/projects/*` -// * Each project has a collection of available locations, named: `/locations/*` -// (a location must refer to a Google Cloud `region`) -// * Each location has a collection of services, named: `/services/*` -// * Dataproc Metastore services are resources with names of the form: -// -// `/projects/{project_number}/locations/{location_id}/services/{service_id}`. -service DataprocMetastore { - option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists services in a project and location. - rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=projects/*/locations/*}/services" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a single service. - rpc GetService(GetServiceRequest) returns (Service) { - option (google.api.http) = { - get: "/v1alpha/{name=projects/*/locations/*/services/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a metastore service in a project and location. - rpc CreateService(CreateServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{parent=projects/*/locations/*}/services" - body: "service" - }; - option (google.api.method_signature) = "parent,service,service_id"; - option (google.longrunning.operation_info) = { - response_type: "Service" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Updates the parameters of a single service. - rpc UpdateService(UpdateServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1alpha/{service.name=projects/*/locations/*/services/*}" - body: "service" - }; - option (google.api.method_signature) = "service,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Service" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Deletes a single service. - rpc DeleteService(DeleteServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1alpha/{name=projects/*/locations/*/services/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Lists imports in a service. - rpc ListMetadataImports(ListMetadataImportsRequest) - returns (ListMetadataImportsResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single import. - rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) { - option (google.api.http) = { - get: "/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new MetadataImport in a given project and location. - rpc CreateMetadataImport(CreateMetadataImportRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports" - body: "metadata_import" - }; - option (google.api.method_signature) = - "parent,metadata_import,metadata_import_id"; - option (google.longrunning.operation_info) = { - response_type: "MetadataImport" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Updates a single import. - // Only the description field of MetadataImport is supported to be updated. - rpc UpdateMetadataImport(UpdateMetadataImportRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1alpha/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}" - body: "metadata_import" - }; - option (google.api.method_signature) = "metadata_import,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "MetadataImport" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Exports metadata from a service. - rpc ExportMetadata(ExportMetadataRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "MetadataExport" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Restores a service from a backup. - rpc RestoreService(RestoreServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{service=projects/*/locations/*/services/*}:restore" - body: "*" - }; - option (google.api.method_signature) = "service,backup"; - option (google.longrunning.operation_info) = { - response_type: "Restore" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Lists backups in a service. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=projects/*/locations/*/services/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single backup. - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new backup in a given project and location. - rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{parent=projects/*/locations/*/services/*}/backups" - body: "backup" - }; - option (google.api.method_signature) = "parent,backup,backup_id"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Deletes a single backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Removes the attached IAM policies for a resource - rpc RemoveIamPolicy(RemoveIamPolicyRequest) - returns (RemoveIamPolicyResponse) { - option (google.api.http) = { - post: "/v1alpha/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy" - body: "*" - }; - } - - // Query DPMS metadata. - rpc QueryMetadata(QueryMetadataRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{service=projects/*/locations/*/services/*}:queryMetadata" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "QueryMetadataResponse" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Move a table to another database. - rpc MoveTableToDatabase(MoveTableToDatabaseRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{service=projects/*/locations/*/services/*}:moveTableToDatabase" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "MoveTableToDatabaseResponse" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Alter metadata resource location. The metadata resource can be a database, - // table, or partition. This functionality only updates the parent directory - // for the respective metadata resource and does not transfer any existing - // data to the new location. - rpc AlterMetadataResourceLocation(AlterMetadataResourceLocationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{service=projects/*/locations/*/services/*}:alterLocation" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "AlterMetadataResourceLocationResponse" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } -} - -// A managed metastore service that serves metadata queries. -message Service { - option (google.api.resource) = { - type: "metastore.googleapis.com/Service" - pattern: "projects/{project}/locations/{location}/services/{service}" - }; - - // The current state of the metastore service. - enum State { - // The state of the metastore service is unknown. - STATE_UNSPECIFIED = 0; - - // The metastore service is in the process of being created. - CREATING = 1; - - // The metastore service is running and ready to serve queries. - ACTIVE = 2; - - // The metastore service is entering suspension. Its query-serving - // availability may cease unexpectedly. - SUSPENDING = 3; - - // The metastore service is suspended and unable to serve queries. - SUSPENDED = 4; - - // The metastore service is being updated. It remains usable but cannot - // accept additional update requests or be deleted at this time. - UPDATING = 5; - - // The metastore service is undergoing deletion. It cannot be used. - DELETING = 6; - - // The metastore service has encountered an error and cannot be used. The - // metastore service should be deleted. - ERROR = 7; - } - - // Available service tiers. - enum Tier { - // The tier is not set. - TIER_UNSPECIFIED = 0; - - // The developer tier provides limited scalability and no fault tolerance. - // Good for low-cost proof-of-concept. - DEVELOPER = 1; - - // The enterprise tier provides multi-zone high availability, and sufficient - // scalability for enterprise-level Dataproc Metastore workloads. - ENTERPRISE = 3; - } - - // Release channels bundle features of varying levels of stability. Newer - // features may be introduced initially into less stable release channels and - // can be automatically promoted into more stable release channels. - enum ReleaseChannel { - // Release channel is not specified. - RELEASE_CHANNEL_UNSPECIFIED = 0; - - // The `CANARY` release channel contains the newest features, which may be - // unstable and subject to unresolved issues with no known workarounds. - // Services using the `CANARY` release channel are not subject to any SLAs. - CANARY = 1; - - // The `STABLE` release channel contains features that are considered stable - // and have been validated for production use. - STABLE = 2; - } - - // The backend database type for the metastore service. - enum DatabaseType { - // The DATABASE_TYPE is not set. - DATABASE_TYPE_UNSPECIFIED = 0; - - // MySQL is used to persist the metastore data. - MYSQL = 1; - - // Spanner is used to persist the metastore data. - SPANNER = 2; - } - - // Configuration properties specific to the underlying metastore service - // technology (the software that serves metastore queries). - oneof metastore_config { - // Configuration information specific to running Hive metastore - // software as the metastore service. - HiveMetastoreConfig hive_metastore_config = 5; - } - - // Immutable. The relative resource name of the metastore service, in the - // following format: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the metastore service was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metastore service was last updated. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // User-defined labels for the metastore service. - map labels = 4; - - // Immutable. The relative resource name of the VPC network on which the - // instance can be accessed. It is specified in the following form: - // - // `projects/{project_number}/global/networks/{network_id}`. - string network = 7 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } - ]; - - // Output only. The URI of the endpoint used to access the metastore service. - string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The TCP port at which the metastore service is reached. Default: 9083. - int32 port = 9; - - // Output only. The current state of the metastore service. - State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the current state of the - // metastore service, if available. - string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A Cloud Storage URI (starting with `gs://`) that specifies - // where artifacts related to the metastore service are stored. - string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The tier of the service. - Tier tier = 13; - - // The setting that defines how metastore metadata should be integrated with - // external services and systems. - MetadataIntegration metadata_integration = 14; - - // The one hour maintenance window of the metastore service. This specifies - // when the service can be restarted for maintenance purposes in UTC time. - // Maintenance window is not needed for services with the SPANNER - // database type. - MaintenanceWindow maintenance_window = 15; - - // Output only. The globally unique resource identifier of the metastore - // service. - string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The metadata management activities of the metastore service. - MetadataManagementActivity metadata_management_activity = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Immutable. The release channel of the service. - // If unspecified, defaults to `STABLE`. - ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. Information used to configure the Dataproc Metastore service to - // encrypt customer data at rest. Cannot be updated. - EncryptionConfig encryption_config = 20 - [(google.api.field_behavior) = IMMUTABLE]; - - // The configuration specifying the network settings for the - // Dataproc Metastore service. - NetworkConfig network_config = 21; - - // Immutable. The database type that the Metastore service stores its data. - DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; - - // The configuration specifying telemetry settings for the Dataproc Metastore - // service. If unspecified defaults to `JSON`. - TelemetryConfig telemetry_config = 23; -} - -// Specifies how metastore metadata should be integrated with external services. -message MetadataIntegration { - // The integration config for the Data Catalog service. - DataCatalogConfig data_catalog_config = 1; - - // The integration config for the Dataplex service. - DataplexConfig dataplex_config = 2; -} - -// Specifies how metastore metadata should be integrated with the Data Catalog -// service. -message DataCatalogConfig { - // Defines whether the metastore metadata should be synced to Data Catalog. - // The default value is to disable syncing metastore metadata to Data Catalog. - bool enabled = 2; -} - -// Specifies how metastore metadata should be integrated with the Dataplex -// service. -message DataplexConfig { - // A reference to the Lake resources that this metastore service is attached - // to. The key is the lake resource name. Example: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - map lake_resources = 1; -} - -// Represents a Lake resource -message Lake { - // The Lake resource name. - // Example: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` - string name = 1 [ - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; -} - -// Maintenance window. This specifies when Dataproc Metastore -// may perform system maintenance operation to the service. -message MaintenanceWindow { - // The hour of day (0-23) when the window starts. - google.protobuf.Int32Value hour_of_day = 1; - - // The day of week, when the window starts. - google.type.DayOfWeek day_of_week = 2; -} - -// Specifies configuration information specific to running Hive metastore -// software as the metastore service. -message HiveMetastoreConfig { - // Protocols available for serving the metastore service endpoint. - enum EndpointProtocol { - // The protocol is not set. - ENDPOINT_PROTOCOL_UNSPECIFIED = 0; - - // Use the legacy Apache Thrift protocol for the metastore service endpoint. - THRIFT = 1; - - // Use the modernized gRPC protocol for the metastore service endpoint. - GRPC = 2; - } - - // Immutable. The Hive metastore schema version. - string version = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // A mapping of Hive metastore configuration key-value pairs to apply to the - // Hive metastore (configured in `hive-site.xml`). The mappings - // override system defaults (some keys cannot be overridden). These - // overrides are also applied to auxiliary versions and can be further - // customized in the auxiliary version's `AuxiliaryVersionConfig`. - map config_overrides = 2; - - // Information used to configure the Hive metastore service as a service - // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService` - // method and specify this field's path - // (`hive_metastore_config.kerberos_config`) in the request's `update_mask` - // while omitting this field from the request's `service`. - KerberosConfig kerberos_config = 3; - - // The protocol to use for the metastore service endpoint. If unspecified, - // defaults to `THRIFT`. - EndpointProtocol endpoint_protocol = 4; - - // A mapping of Hive metastore version to the auxiliary version - // configuration. When specified, a secondary Hive metastore service is - // created along with the primary service. All auxiliary versions must be less - // than the service's primary version. The key is the auxiliary service name - // and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This - // means that the first character must be a lowercase letter, and all the - // following characters must be hyphens, lowercase letters, or digits, except - // the last character, which cannot be a hyphen. - map auxiliary_versions = 5; -} - -// Configuration information for a Kerberos principal. -message KerberosConfig { - // A Kerberos keytab file that can be used to authenticate a service principal - // with a Kerberos Key Distribution Center (KDC). - Secret keytab = 1; - - // A Kerberos principal that exists in the both the keytab the KDC - // to authenticate as. A typical principal is of the form - // `primary/instance@REALM`, but there is no exact format. - string principal = 2; - - // A Cloud Storage URI that specifies the path to a - // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`, - // although the file does not need to be named krb5.conf explicitly. - string krb5_config_gcs_uri = 3; -} - -// A securely stored value. -message Secret { - oneof value { - // The relative resource name of a Secret Manager secret version, in the - // following form: - // - // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`. - string cloud_secret = 2; - } -} - -// Encryption settings for the service. -message EncryptionConfig { - // The fully qualified customer provided Cloud KMS key name to use for - // customer data encryption, in the following form: - // - // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`. - string kms_key = 1; -} - -// Configuration information for the auxiliary service versions. -message AuxiliaryVersionConfig { - // The Hive metastore version of the auxiliary service. It must be less - // than the primary Hive metastore service's version. - string version = 1; - - // A mapping of Hive metastore configuration key-value pairs to apply to the - // auxiliary Hive metastore (configured in `hive-site.xml`) in addition to - // the primary version's overrides. If keys are present in both the auxiliary - // version's overrides and the primary version's overrides, the value from - // the auxiliary version's overrides takes precedence. - map config_overrides = 2; - - // Output only. The network configuration contains the endpoint URI(s) of the - // auxiliary Hive metastore service. - NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Network configuration for the Dataproc Metastore service. -message NetworkConfig { - // Contains information of the customer's network configurations. - message Consumer { - oneof vpc_resource { - // Immutable. The subnetwork of the customer project from which an IP - // address is reserved and used as the Dataproc Metastore service's - // endpoint. It is accessible to hosts in the subnet and to all - // hosts in a subnet in the same region and same network. There must - // be at least one IP address available in the subnet's primary range. The - // subnet is specified in the following form: - // - // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}` - string subnetwork = 1 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "compute.googleapis.com/Subnetwork" - } - ]; - } - - // Output only. The URI of the endpoint used to access the metastore - // service. - string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Immutable. The consumer-side network configuration for the Dataproc - // Metastore instance. - repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; -} - -// Telemetry Configuration for the Dataproc Metastore service. -message TelemetryConfig { - enum LogFormat { - // The LOG_FORMAT is not set. - LOG_FORMAT_UNSPECIFIED = 0; - - // Logging output uses the legacy `textPayload` format. - LEGACY = 1; - - // Logging output uses the `jsonPayload` format. - JSON = 2; - } - - // The output format of the Dataproc Metastore service's logs. - LogFormat log_format = 1; -} - -// The metadata management activities of the metastore service. -message MetadataManagementActivity { - // Output only. The latest metadata exports of the metastore service. - repeated MetadataExport metadata_exports = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The latest restores of the metastore service. - repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A metastore resource that imports metadata. -message MetadataImport { - option (google.api.resource) = { - type: "metastore.googleapis.com/MetadataImport" - pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}" - }; - - // A specification of the location of and metadata about a database dump from - // a relational database management system. - message DatabaseDump { - // The type of the database. - enum DatabaseType { - // The type of the source database is unknown. - DATABASE_TYPE_UNSPECIFIED = 0; - - // The type of the source database is MySQL. - MYSQL = 1; - } - - // The type of the database. - DatabaseType database_type = 1 [deprecated = true]; - - // A Cloud Storage object or folder URI that specifies the source from which - // to import metadata. It must begin with `gs://`. - string gcs_uri = 2; - - // The name of the source database. - string source_database = 3 [deprecated = true]; - - // Optional. The type of the database dump. If unspecified, defaults to - // `MYSQL`. - DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // The current state of the metadata import. - enum State { - // The state of the metadata import is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata import is running. - RUNNING = 1; - - // The metadata import completed successfully. - SUCCEEDED = 2; - - // The metadata import is being updated. - UPDATING = 3; - - // The metadata import failed, and attempted metadata changes were rolled - // back. - FAILED = 4; - } - - // The metadata to be imported. - oneof metadata { - // Immutable. A database dump from a pre-existing metastore's database. - DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE]; - } - - // Immutable. The relative resource name of the metadata import, of the form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // The description of the metadata import. - string description = 2; - - // Output only. The time when the metadata import was started. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metadata import was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metadata import finished. - google.protobuf.Timestamp end_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the metadata import. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a metadata export operation. -message MetadataExport { - // The current state of the metadata export. - enum State { - // The state of the metadata export is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata export is running. - RUNNING = 1; - - // The metadata export completed successfully. - SUCCEEDED = 2; - - // The metadata export failed. - FAILED = 3; - - // The metadata export is cancelled. - CANCELLED = 4; - } - - oneof destination { - // Output only. A Cloud Storage URI of a folder that metadata are exported - // to, in the form of - // `gs:////`, where - // `` is automatically generated. - string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. The time when the export started. - google.protobuf.Timestamp start_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the export ended. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the export. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The type of the database dump. - DatabaseDumpSpec.Type database_dump_type = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a backup resource. -message Backup { - option (google.api.resource) = { - type: "metastore.googleapis.com/Backup" - pattern: "projects/{project}/locations/{location}/services/{service}/backups/{backup}" - }; - - // The current state of the backup. - enum State { - // The state of the backup is unknown. - STATE_UNSPECIFIED = 0; - - // The backup is being created. - CREATING = 1; - - // The backup is being deleted. - DELETING = 2; - - // The backup is active and ready to use. - ACTIVE = 3; - - // The backup failed. - FAILED = 4; - - // The backup is being restored. - RESTORING = 5; - } - - // Immutable. The relative resource name of the backup, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}` - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the backup was started. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the backup finished creating. - google.protobuf.Timestamp end_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the backup. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The revision of the service at the time of backup. - Service service_revision = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The description of the backup. - string description = 6; - - // Output only. Services that are restoring from the backup. - repeated string restoring_services = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a metadata restore operation. -message Restore { - // The current state of the restore. - enum State { - // The state of the metadata restore is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata restore is running. - RUNNING = 1; - - // The metadata restore completed successfully. - SUCCEEDED = 2; - - // The metadata restore failed. - FAILED = 3; - - // The metadata restore is cancelled. - CANCELLED = 4; - } - - // The type of restore. If unspecified, defaults to `METADATA_ONLY`. - enum RestoreType { - // The restore type is unknown. - RESTORE_TYPE_UNSPECIFIED = 0; - - // The service's metadata and configuration are restored. - FULL = 1; - - // Only the service's metadata is restored. - METADATA_ONLY = 2; - } - - // Output only. The time when the restore started. - google.protobuf.Timestamp start_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the restore ended. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the restore. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. 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}`. - string backup = 4 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Output only. The type of restore. - RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The restore details containing the revision of the service to - // be restored to, in format of JSON. - string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. -message ListServicesRequest { - // Required. The relative resource name of the location of metastore services - // to list, in the following form: - // - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. The maximum number of services to return. The response may - // contain less than the maximum number. If unspecified, no more than 500 - // services are returned. The maximum value is 1000; values above 1000 are - // changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous - // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. -message ListServicesResponse { - // The services in the specified location. - repeated Service services = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for -// [DataprocMetastore.GetService][google.cloud.metastore.v1alpha.DataprocMetastore.GetService]. -message GetServiceRequest { - // Required. The relative resource name of the metastore service to retrieve, - // in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; -} - -// Request message for -// [DataprocMetastore.CreateService][google.cloud.metastore.v1alpha.DataprocMetastore.CreateService]. -message CreateServiceRequest { - // 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}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Service" - } - ]; - - // 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. - string service_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Service service = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.UpdateService][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateService]. -message UpdateServiceRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The metastore service to update. The server only merges fields - // in the service if they are specified in `update_mask`. - // - // The metastore service's `name` field is used to identify the metastore - // service to be updated. - Service service = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.DeleteService][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteService]. -message DeleteServiceRequest { - // Required. The relative resource name of the metastore service to delete, in - // the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports]. -message ListMetadataImportsRequest { - // Required. The relative resource name of the service whose metadata imports - // to list, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/MetadataImport" - } - ]; - - // Optional. The maximum number of imports to return. The response may contain - // less than the maximum number. If unspecified, no more than 500 imports are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous - // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports]. -message ListMetadataImportsResponse { - // The imports in the specified service. - repeated MetadataImport metadata_imports = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for -// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImport]. -message GetMetadataImportRequest { - // Required. The relative resource name of the metadata import to retrieve, in - // the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/MetadataImport" - } - ]; -} - -// Request message for -// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImport]. -message CreateMetadataImportRequest { - // Required. The relative resource name of the service in which to create a - // metastore import, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/MetadataImport" - } - ]; - - // 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. - string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImport]. -message UpdateMetadataImportRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The metadata import to update. The server only merges fields - // in the import if they are specified in `update_mask`. - // - // The metadata import's `name` field is used to identify the metastore - // import to be updated. - MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]. -message ListBackupsRequest { - // Required. The relative resource name of the service whose backups to - // list, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. The maximum number of backups to return. The response may contain - // less than the maximum number. If unspecified, no more than 500 backups are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous - // [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]. -message ListBackupsResponse { - // The backups of the specified service. - repeated Backup backups = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for -// [DataprocMetastore.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup]. -message GetBackupRequest { - // Required. The relative resource name of the backup to retrieve, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; -} - -// Request message for -// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup]. -message CreateBackupRequest { - // Required. The relative resource name of the service in which to create a - // backup of the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Backup" - } - ]; - - // 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. - string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup]. -message DeleteBackupRequest { - // Required. The relative resource name of the backup to delete, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata]. -message ExportMetadataRequest { - // Required. Destination that metadata is exported to. - oneof destination { - // A Cloud Storage URI of a folder, in the format - // `gs:///`. A sub-folder - // `` containing exported files will be created below it. - string destination_gcs_folder = 2; - } - - // Required. The relative resource name of the metastore service to run - // export, in the following form: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The type of the database dump. If unspecified, defaults to - // `MYSQL`. - DatabaseDumpSpec.Type database_dump_type = 4 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.Restore][]. -message RestoreServiceRequest { - // Required. The relative resource name of the metastore service to run - // restore, in the following form: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // 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}`. - string backup = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. - Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents the metadata of a long-running operation. -message OperationMetadata { - // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined resource path for the target of the operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the verb executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether the caller has requested cancellation - // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. API version used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Metadata about the service in a location. -message LocationMetadata { - // A specification of a supported version of the Hive Metastore software. - message HiveMetastoreVersion { - // The semantic version of the Hive Metastore software. - string version = 1; - - // Whether `version` will be chosen by the server if a metastore service is - // created with a `HiveMetastoreConfig` that omits the `version`. - bool is_default = 2; - } - - // The versions of Hive Metastore that can be used when creating a new - // metastore service in this location. The server guarantees that exactly one - // `HiveMetastoreVersion` in the list will set `is_default`. - repeated HiveMetastoreVersion supported_hive_metastore_versions = 1; -} - -// The specification of database dump to import from or export to. -message DatabaseDumpSpec { - // The type of the database dump. - enum Type { - // The type of the database dump is unknown. - TYPE_UNSPECIFIED = 0; - - // Database dump is a MySQL dump file. - MYSQL = 1; - - // Database dump contains Avro files. - AVRO = 2; - } -} - -// Request message for -// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy]. -message RemoveIamPolicyRequest { - // Required. The relative resource name of the dataplane resource to remove - // IAM policy, in the following form: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}` - // or - // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`. - string resource = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "*" } - ]; - - // Optional. Removes IAM policy attached to database or table asynchronously - // when it is set. The default is false. - bool asynchronous = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy]. -message RemoveIamPolicyResponse { - // True if the policy is successfully removed. - bool success = 1; -} - -// Request message for -// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata]. -message QueryMetadataRequest { - // Required. The relative resource name of the metastore service to query - // metadata, in the following format: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Required. A read-only SQL query to execute against the metadata database. - // The query cannot change or mutate the data. - string query = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata]. -message QueryMetadataResponse { - // The manifest URI is link to a JSON instance in Cloud Storage. - // This instance manifests immediately along with QueryMetadataResponse. The - // content of the URI is not retriable until the long-running operation query - // against the metadata finishes. - string result_manifest_uri = 1; -} - -// Request message for -// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase]. -message MoveTableToDatabaseRequest { - // Required. The relative resource name of the metastore service to mutate - // metadata, in the following format: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Required. The name of the table to be moved. - string table_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the database where the table resides. - string db_name = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the database where the table should be moved. - string destination_db_name = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase]. -message MoveTableToDatabaseResponse {} - -// Request message for -// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation]. -message AlterMetadataResourceLocationRequest { - // Required. The relative resource name of the metastore service to mutate - // metadata, in the following format: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Required. The relative metadata resource name in the following format. - // - // `databases/{database_id}` - // or - // `databases/{database_id}/tables/{table_id}` - // or - // `databases/{database_id}/tables/{table_id}/partitions/{partition_id}` - string resource_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The new location URI for the metadata resource. - string location_uri = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation]. -message AlterMetadataResourceLocationResponse {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore_federation.proto b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore_federation.proto deleted file mode 100644 index 7ad2f9c18722..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore_federation.proto +++ /dev/null @@ -1,374 +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 -// -// http://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. - -syntax = "proto3"; - -package google.cloud.metastore.v1alpha; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/metastore/apiv1alpha/metastorepb;metastorepb"; -option java_multiple_files = true; -option java_outer_classname = "MetastoreFederationProto"; -option java_package = "com.google.cloud.metastore.v1alpha"; - -// Configures and manages metastore federation services. -// Dataproc Metastore Federation Service allows federating a collection of -// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc -// Metastores. The Federation Service exposes a gRPC URL through which metadata -// from the backend metastores are served at query time. -// -// The Dataproc Metastore Federation API defines the following resource model: -// * The service works with a collection of Google Cloud projects. -// * Each project has a collection of available locations. -// * Each location has a collection of federations. -// * Dataproc Metastore Federations are resources with names of the -// form: -// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. -service DataprocMetastoreFederation { - option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists federations in a project and location. - rpc ListFederations(ListFederationsRequest) - returns (ListFederationsResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=projects/*/locations/*}/federations" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a single federation. - rpc GetFederation(GetFederationRequest) returns (Federation) { - option (google.api.http) = { - get: "/v1alpha/{name=projects/*/locations/*/federations/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a metastore federation in a project and location. - rpc CreateFederation(CreateFederationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1alpha/{parent=projects/*/locations/*}/federations" - body: "federation" - }; - option (google.api.method_signature) = "parent,federation,federation_id"; - option (google.longrunning.operation_info) = { - response_type: "Federation" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Updates the fields of a federation. - rpc UpdateFederation(UpdateFederationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1alpha/{federation.name=projects/*/locations/*/federations/*}" - body: "federation" - }; - option (google.api.method_signature) = "federation,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Federation" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } - - // Deletes a single federation. - rpc DeleteFederation(DeleteFederationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1alpha/{name=projects/*/locations/*/federations/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" - }; - } -} - -// Represents a federation of multiple backend metastores. -message Federation { - option (google.api.resource) = { - type: "metastore.googleapis.com/Federation" - pattern: "projects/{project}/locations/{location}/federations/{federation}" - }; - - // The current state of the federation. - enum State { - // The state of the metastore federation is unknown. - STATE_UNSPECIFIED = 0; - - // The metastore federation is in the process of being created. - CREATING = 1; - - // The metastore federation is running and ready to serve queries. - ACTIVE = 2; - - // The metastore federation is being updated. It remains usable but cannot - // accept additional update requests or be deleted at this time. - UPDATING = 3; - - // The metastore federation is undergoing deletion. It cannot be used. - DELETING = 4; - - // The metastore federation has encountered an error and cannot be used. The - // metastore federation should be deleted. - ERROR = 5; - } - - // Immutable. The relative resource name of the federation, of the - // form: - // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the metastore federation was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metastore federation was last updated. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // User-defined labels for the metastore federation. - map labels = 4; - - // Immutable. The Apache Hive metastore version of the federation. All backend - // metastore versions must be compatible with the federation version. - string version = 5 [(google.api.field_behavior) = IMMUTABLE]; - - // A map from `BackendMetastore` rank to `BackendMetastore`s from which the - // federation service serves metadata at query time. The map key represents - // the order in which `BackendMetastore`s should be evaluated to resolve - // database names at query time and should be greater than or equal to zero. A - // `BackendMetastore` with a lower number will be evaluated before a - // `BackendMetastore` with a higher number. - map backend_metastores = 6; - - // Output only. The federation endpoint. - string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the federation. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the current state of the - // metastore federation, if available. - string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The globally unique resource identifier of the metastore - // federation. - string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Represents a backend metastore for the federation. -message BackendMetastore { - // The type of the backend metastore. - enum MetastoreType { - // The metastore type is not set. - METASTORE_TYPE_UNSPECIFIED = 0; - - // The backend metastore is BigQuery. - BIGQUERY = 2; - - // The backend metastore is Dataproc Metastore. - DATAPROC_METASTORE = 3; - } - - // The relative resource name of the metastore that is being federated. - // The formats of the relative resource names for the currently supported - // metastores are listed below: - // - // * Dataplex - // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` - // * BigQuery - // * `projects/{project_id}` - // * Dataproc Metastore - // * `projects/{project_id}/locations/{location}/services/{service_id}` - string name = 1; - - // The type of the backend metastore. - MetastoreType metastore_type = 2; -} - -// Request message for ListFederations. -message ListFederationsRequest { - // Required. The relative resource name of the location of metastore - // federations to list, in the following form: - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Federation" - } - ]; - - // Optional. The maximum number of federations to return. The response may - // contain less than the maximum number. If unspecified, no more than 500 - // services are returned. The maximum value is 1000; values above 1000 are - // changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous ListFederationServices - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // ListFederationServices must match the call that provided the - // page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for ListFederations -message ListFederationsResponse { - // The services in the specified location. - repeated Federation federations = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for GetFederation. -message GetFederationRequest { - // Required. The relative resource name of the metastore federation to - // retrieve, in the following form: - // - // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Federation" - } - ]; -} - -// Request message for CreateFederation. -message CreateFederationRequest { - // Required. The relative resource name of the location in which to create a - // federation service, in the following form: - // - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Federation" - } - ]; - - // 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. - string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for UpdateFederation. -message UpdateFederationRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The metastore federation to update. The server only merges fields - // in the service if they are specified in `update_mask`. - // - // The metastore federation's `name` field is used to identify the - // metastore service to be updated. - Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for DeleteFederation. -message DeleteFederationRequest { - // Required. The relative resource name of the metastore federation to delete, - // in the following form: - // - // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Federation" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequest.java deleted file mode 100644 index 404f40e6e6c8..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequest.java +++ /dev/null @@ -1,1073 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest} - */ -public final class AlterMetadataResourceLocationRequest - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) - AlterMetadataResourceLocationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlterMetadataResourceLocationRequest.newBuilder() to construct. - private AlterMetadataResourceLocationRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AlterMetadataResourceLocationRequest() { - service_ = ""; - resourceName_ = ""; - locationUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AlterMetadataResourceLocationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.class, - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object resourceName_ = ""; - /** - * - * - *
-   * Required. The relative metadata resource name in the following format.
-   * `databases/{database_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-   * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceName. - */ - @java.lang.Override - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative metadata resource name in the following format.
-   * `databases/{database_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-   * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object locationUri_ = ""; - /** - * - * - *
-   * Required. The new location URI for the metadata resource.
-   * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The locationUri. - */ - @java.lang.Override - public java.lang.String getLocationUri() { - java.lang.Object ref = locationUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationUri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The new location URI for the metadata resource.
-   * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for locationUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLocationUriBytes() { - java.lang.Object ref = locationUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, locationUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, locationUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest other = - (com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getResourceName().equals(other.getResourceName())) return false; - if (!getLocationUri().equals(other.getLocationUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceName().hashCode(); - hash = (37 * hash) + LOCATION_URI_FIELD_NUMBER; - hash = (53 * hash) + getLocationUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.class, - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.Builder.class); - } - - // Construct using - // com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - resourceName_ = ""; - locationUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest build() { - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest buildPartial() { - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest result = - new com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.resourceName_ = resourceName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.locationUri_ = locationUri_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) { - return mergeFrom( - (com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest other) { - if (other - == com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - .getDefaultInstance()) return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getResourceName().isEmpty()) { - resourceName_ = other.resourceName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getLocationUri().isEmpty()) { - locationUri_ = other.locationUri_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - resourceName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - locationUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object resourceName_ = ""; - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceName. - */ - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceName. - */ - public com.google.protobuf.ByteString getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - resourceName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearResourceName() { - resourceName_ = getDefaultInstance().getResourceName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative metadata resource name in the following format.
-     * `databases/{database_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}`
-     * or
-     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-     * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - resourceName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object locationUri_ = ""; - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The locationUri. - */ - public java.lang.String getLocationUri() { - java.lang.Object ref = locationUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for locationUri. - */ - public com.google.protobuf.ByteString getLocationUriBytes() { - java.lang.Object ref = locationUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - locationUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The locationUri to set. - * @return This builder for chaining. - */ - public Builder setLocationUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - locationUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearLocationUri() { - locationUri_ = getDefaultInstance().getLocationUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The new location URI for the metadata resource.
-     * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for locationUri to set. - * @return This builder for chaining. - */ - public Builder setLocationUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - locationUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) - private static final com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest(); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AlterMetadataResourceLocationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequestOrBuilder.java deleted file mode 100644 index f9058fdfcde1..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequestOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface AlterMetadataResourceLocationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Required. The relative metadata resource name in the following format.
-   * `databases/{database_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-   * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceName. - */ - java.lang.String getResourceName(); - /** - * - * - *
-   * Required. The relative metadata resource name in the following format.
-   * `databases/{database_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}`
-   * or
-   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
-   * 
- * - * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceName. - */ - com.google.protobuf.ByteString getResourceNameBytes(); - - /** - * - * - *
-   * Required. The new location URI for the metadata resource.
-   * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The locationUri. - */ - java.lang.String getLocationUri(); - /** - * - * - *
-   * Required. The new location URI for the metadata resource.
-   * 
- * - * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for locationUri. - */ - com.google.protobuf.ByteString getLocationUriBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponse.java deleted file mode 100644 index 2e426125cc0c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponse.java +++ /dev/null @@ -1,455 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse} - */ -public final class AlterMetadataResourceLocationResponse - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) - AlterMetadataResourceLocationResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlterMetadataResourceLocationResponse.newBuilder() to construct. - private AlterMetadataResourceLocationResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AlterMetadataResourceLocationResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AlterMetadataResourceLocationResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.class, - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse other = - (com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.class, - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.Builder - .class); - } - - // Construct using - // com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse build() { - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse buildPartial() { - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse result = - new com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) { - return mergeFrom( - (com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse other) { - if (other - == com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) - private static final com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse(); - } - - public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AlterMetadataResourceLocationResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponseOrBuilder.java deleted file mode 100644 index 0a9257fcb13f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponseOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface AlterMetadataResourceLocationResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfig.java deleted file mode 100644 index 10eabbd903a4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfig.java +++ /dev/null @@ -1,1322 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Configuration information for the auxiliary service versions.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.AuxiliaryVersionConfig} - */ -public final class AuxiliaryVersionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) - AuxiliaryVersionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuxiliaryVersionConfig.newBuilder() to construct. - private AuxiliaryVersionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AuxiliaryVersionConfig() { - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuxiliaryVersionConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.class, - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-   * The Hive metastore version of the auxiliary service. It must be less
-   * than the primary Hive metastore service's version.
-   * 
- * - * string version = 1; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * The Hive metastore version of the auxiliary service. It must be less
-   * than the primary Hive metastore service's version.
-   * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; - - private static final class ConfigOverridesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int NETWORK_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1beta.NetworkConfig networkConfig_; - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the networkConfig field is set. - */ - @java.lang.Override - public boolean hasNetworkConfig() { - return networkConfig_ != null; - } - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The networkConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetConfigOverrides(), ConfigOverridesDefaultEntryHolder.defaultEntry, 2); - if (networkConfig_ != null) { - output.writeMessage(3, getNetworkConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - for (java.util.Map.Entry entry : - internalGetConfigOverrides().getMap().entrySet()) { - com.google.protobuf.MapEntry configOverrides__ = - ConfigOverridesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, configOverrides__); - } - if (networkConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNetworkConfig()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig other = - (com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!internalGetConfigOverrides().equals(other.internalGetConfigOverrides())) return false; - if (hasNetworkConfig() != other.hasNetworkConfig()) return false; - if (hasNetworkConfig()) { - if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetConfigOverrides().getMap().isEmpty()) { - hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; - hash = (53 * hash) + internalGetConfigOverrides().hashCode(); - } - if (hasNetworkConfig()) { - hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNetworkConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Configuration information for the auxiliary service versions.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.AuxiliaryVersionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableConfigOverrides(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.class, - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - internalGetMutableConfigOverrides().clear(); - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig build() { - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig buildPartial() { - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig result = - new com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.configOverrides_ = internalGetConfigOverrides(); - result.configOverrides_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.networkConfig_ = - networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig) { - return mergeFrom((com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig other) { - if (other == com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.getDefaultInstance()) - return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableConfigOverrides().mergeFrom(other.internalGetConfigOverrides()); - bitField0_ |= 0x00000002; - if (other.hasNetworkConfig()) { - mergeNetworkConfig(other.getNetworkConfig()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.MapEntry configOverrides__ = - input.readMessage( - ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableConfigOverrides() - .getMutableMap() - .put(configOverrides__.getKey(), configOverrides__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The Hive metastore version of the auxiliary service. It must be less
-     * than the primary Hive metastore service's version.
-     * 
- * - * string version = 1; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - private com.google.protobuf.MapField - internalGetMutableConfigOverrides() { - if (configOverrides_ == null) { - configOverrides_ = - com.google.protobuf.MapField.newMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - if (!configOverrides_.isMutable()) { - configOverrides_ = configOverrides_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearConfigOverrides() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableConfigOverrides().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder removeConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableConfigOverrides().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableConfigOverrides() { - bitField0_ |= 0x00000002; - return internalGetMutableConfigOverrides().getMutableMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putConfigOverrides(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableConfigOverrides().getMutableMap().put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-     * the primary version's overrides. If keys are present in both the auxiliary
-     * version's overrides and the primary version's overrides, the value from
-     * the auxiliary version's overrides takes precedence.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putAllConfigOverrides(java.util.Map values) { - internalGetMutableConfigOverrides().getMutableMap().putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private com.google.cloud.metastore.v1beta.NetworkConfig networkConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig, - com.google.cloud.metastore.v1beta.NetworkConfig.Builder, - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder> - networkConfigBuilder_; - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the networkConfig field is set. - */ - public boolean hasNetworkConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The networkConfig. - */ - public com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig() { - if (networkConfigBuilder_ == null) { - return networkConfig_ == null - ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() - : networkConfig_; - } else { - return networkConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNetworkConfig(com.google.cloud.metastore.v1beta.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - networkConfig_ = value; - } else { - networkConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNetworkConfig( - com.google.cloud.metastore.v1beta.NetworkConfig.Builder builderForValue) { - if (networkConfigBuilder_ == null) { - networkConfig_ = builderForValue.build(); - } else { - networkConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeNetworkConfig(com.google.cloud.metastore.v1beta.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && networkConfig_ != null - && networkConfig_ - != com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance()) { - getNetworkConfigBuilder().mergeFrom(value); - } else { - networkConfig_ = value; - } - } else { - networkConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearNetworkConfig() { - bitField0_ = (bitField0_ & ~0x00000004); - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.NetworkConfig.Builder getNetworkConfigBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getNetworkConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - if (networkConfigBuilder_ != null) { - return networkConfigBuilder_.getMessageOrBuilder(); - } else { - return networkConfig_ == null - ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - } - /** - * - * - *
-     * Output only. The network configuration contains the endpoint URI(s) of the
-     * auxiliary Hive metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig, - com.google.cloud.metastore.v1beta.NetworkConfig.Builder, - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder> - getNetworkConfigFieldBuilder() { - if (networkConfigBuilder_ == null) { - networkConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig, - com.google.cloud.metastore.v1beta.NetworkConfig.Builder, - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder>( - getNetworkConfig(), getParentForChildren(), isClean()); - networkConfig_ = null; - } - return networkConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) - private static final com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig(); - } - - public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuxiliaryVersionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfigOrBuilder.java deleted file mode 100644 index 87e1bbb5daff..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfigOrBuilder.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface AuxiliaryVersionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Hive metastore version of the auxiliary service. It must be less
-   * than the primary Hive metastore service's version.
-   * 
- * - * string version = 1; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * The Hive metastore version of the auxiliary service. It must be less
-   * than the primary Hive metastore service's version.
-   * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - int getConfigOverridesCount(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - boolean containsConfigOverrides(java.lang.String key); - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getConfigOverrides(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.util.Map getConfigOverridesMap(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - /* nullable */ - java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
-   * the primary version's overrides. If keys are present in both the auxiliary
-   * version's overrides and the primary version's overrides, the value from
-   * the auxiliary version's overrides takes precedence.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.lang.String getConfigOverridesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the networkConfig field is set. - */ - boolean hasNetworkConfig(); - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The networkConfig. - */ - com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig(); - /** - * - * - *
-   * Output only. The network configuration contains the endpoint URI(s) of the
-   * auxiliary Hive metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastore.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastore.java deleted file mode 100644 index ae76ca27c827..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastore.java +++ /dev/null @@ -1,1009 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Represents a backend metastore for the federation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.BackendMetastore} - */ -public final class BackendMetastore extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.BackendMetastore) - BackendMetastoreOrBuilder { - private static final long serialVersionUID = 0L; - // Use BackendMetastore.newBuilder() to construct. - private BackendMetastore(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BackendMetastore() { - name_ = ""; - metastoreType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BackendMetastore(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_BackendMetastore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.BackendMetastore.class, - com.google.cloud.metastore.v1beta.BackendMetastore.Builder.class); - } - - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.BackendMetastore.MetastoreType} - */ - public enum MetastoreType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The metastore type is not set.
-     * 
- * - * METASTORE_TYPE_UNSPECIFIED = 0; - */ - METASTORE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * The backend metastore is BigQuery.
-     * 
- * - * BIGQUERY = 2; - */ - BIGQUERY(2), - /** - * - * - *
-     * The backend metastore is Dataproc Metastore.
-     * 
- * - * DATAPROC_METASTORE = 3; - */ - DATAPROC_METASTORE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The metastore type is not set.
-     * 
- * - * METASTORE_TYPE_UNSPECIFIED = 0; - */ - public static final int METASTORE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The backend metastore is BigQuery.
-     * 
- * - * BIGQUERY = 2; - */ - public static final int BIGQUERY_VALUE = 2; - /** - * - * - *
-     * The backend metastore is Dataproc Metastore.
-     * 
- * - * DATAPROC_METASTORE = 3; - */ - public static final int DATAPROC_METASTORE_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetastoreType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MetastoreType forNumber(int value) { - switch (value) { - case 0: - return METASTORE_TYPE_UNSPECIFIED; - case 2: - return BIGQUERY; - case 3: - return DATAPROC_METASTORE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MetastoreType findValueByNumber(int number) { - return MetastoreType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.BackendMetastore.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final MetastoreType[] VALUES = values(); - - public static MetastoreType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MetastoreType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.BackendMetastore.MetastoreType) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METASTORE_TYPE_FIELD_NUMBER = 2; - private int metastoreType_ = 0; - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The enum numeric value on the wire for metastoreType. - */ - @java.lang.Override - public int getMetastoreTypeValue() { - return metastoreType_; - } - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The metastoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType getMetastoreType() { - com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType result = - com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.forNumber(metastoreType_); - return result == null - ? com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (metastoreType_ - != com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType - .METASTORE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, metastoreType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (metastoreType_ - != com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType - .METASTORE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, metastoreType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.BackendMetastore)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.BackendMetastore other = - (com.google.cloud.metastore.v1beta.BackendMetastore) obj; - - if (!getName().equals(other.getName())) return false; - if (metastoreType_ != other.metastoreType_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + METASTORE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + metastoreType_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.BackendMetastore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents a backend metastore for the federation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.BackendMetastore} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.BackendMetastore) - com.google.cloud.metastore.v1beta.BackendMetastoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_BackendMetastore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.BackendMetastore.class, - com.google.cloud.metastore.v1beta.BackendMetastore.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.BackendMetastore.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - metastoreType_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackendMetastore getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.BackendMetastore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackendMetastore build() { - com.google.cloud.metastore.v1beta.BackendMetastore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackendMetastore buildPartial() { - com.google.cloud.metastore.v1beta.BackendMetastore result = - new com.google.cloud.metastore.v1beta.BackendMetastore(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.BackendMetastore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metastoreType_ = metastoreType_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.BackendMetastore) { - return mergeFrom((com.google.cloud.metastore.v1beta.BackendMetastore) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.BackendMetastore other) { - if (other == com.google.cloud.metastore.v1beta.BackendMetastore.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.metastoreType_ != 0) { - setMetastoreTypeValue(other.getMetastoreTypeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - metastoreType_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of the metastore that is being federated.
-     * The formats of the relative resource names for the currently supported
-     * metastores are listed below:
-     * * Dataplex
-     *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-     * * BigQuery
-     *   * `projects/{project_id}`
-     * * Dataproc Metastore
-     *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-     * 
- * - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int metastoreType_ = 0; - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @return The enum numeric value on the wire for metastoreType. - */ - @java.lang.Override - public int getMetastoreTypeValue() { - return metastoreType_; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @param value The enum numeric value on the wire for metastoreType to set. - * @return This builder for chaining. - */ - public Builder setMetastoreTypeValue(int value) { - metastoreType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @return The metastoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType getMetastoreType() { - com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType result = - com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.forNumber( - metastoreType_); - return result == null - ? com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @param value The metastoreType to set. - * @return This builder for chaining. - */ - public Builder setMetastoreType( - com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - metastoreType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The type of the backend metastore.
-     * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * - * @return This builder for chaining. - */ - public Builder clearMetastoreType() { - bitField0_ = (bitField0_ & ~0x00000002); - metastoreType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.BackendMetastore) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.BackendMetastore) - private static final com.google.cloud.metastore.v1beta.BackendMetastore DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.BackendMetastore(); - } - - public static com.google.cloud.metastore.v1beta.BackendMetastore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BackendMetastore parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackendMetastore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastoreOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastoreOrBuilder.java deleted file mode 100644 index 4f36aa42ddf0..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastoreOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public interface BackendMetastoreOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.BackendMetastore) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The relative resource name of the metastore that is being federated.
-   * The formats of the relative resource names for the currently supported
-   * metastores are listed below:
-   * * Dataplex
-   *   * `projects/{project_id}/locations/{location}/lakes/{lake_id}`
-   * * BigQuery
-   *   * `projects/{project_id}`
-   * * Dataproc Metastore
-   *   * `projects/{project_id}/locations/{location}/services/{service_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The enum numeric value on the wire for metastoreType. - */ - int getMetastoreTypeValue(); - /** - * - * - *
-   * The type of the backend metastore.
-   * 
- * - * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; - * - * @return The metastoreType. - */ - com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType getMetastoreType(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Backup.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Backup.java deleted file mode 100644 index 3c14c2dca7f6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Backup.java +++ /dev/null @@ -1,2329 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * The details of a backup resource.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Backup} - */ -public final class Backup extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Backup) - BackupOrBuilder { - private static final long serialVersionUID = 0L; - // Use Backup.newBuilder() to construct. - private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Backup() { - name_ = ""; - state_ = 0; - description_ = ""; - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Backup(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Backup_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Backup.class, - com.google.cloud.metastore.v1beta.Backup.Builder.class); - } - - /** - * - * - *
-   * The current state of the backup.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.Backup.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the backup is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The backup is being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The backup is being deleted.
-     * 
- * - * DELETING = 2; - */ - DELETING(2), - /** - * - * - *
-     * The backup is active and ready to use.
-     * 
- * - * ACTIVE = 3; - */ - ACTIVE(3), - /** - * - * - *
-     * The backup failed.
-     * 
- * - * FAILED = 4; - */ - FAILED(4), - /** - * - * - *
-     * The backup is being restored.
-     * 
- * - * RESTORING = 5; - */ - RESTORING(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the backup is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The backup is being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The backup is being deleted.
-     * 
- * - * DELETING = 2; - */ - public static final int DELETING_VALUE = 2; - /** - * - * - *
-     * The backup is active and ready to use.
-     * 
- * - * ACTIVE = 3; - */ - public static final int ACTIVE_VALUE = 3; - /** - * - * - *
-     * The backup failed.
-     * 
- * - * FAILED = 4; - */ - public static final int FAILED_VALUE = 4; - /** - * - * - *
-     * The backup is being restored.
-     * 
- * - * RESTORING = 5; - */ - public static final int RESTORING_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return DELETING; - case 3: - return ACTIVE; - case 4: - return FAILED; - case 5: - return RESTORING; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.Backup.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Backup.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 4; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Backup.State getState() { - com.google.cloud.metastore.v1beta.Backup.State result = - com.google.cloud.metastore.v1beta.Backup.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1beta.Backup.State.UNRECOGNIZED : result; - } - - public static final int SERVICE_REVISION_FIELD_NUMBER = 5; - private com.google.cloud.metastore.v1beta.Service serviceRevision_; - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - @java.lang.Override - public boolean hasServiceRevision() { - return serviceRevision_ != null; - } - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service getServiceRevision() { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : serviceRevision_; - } - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceRevisionOrBuilder() { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : serviceRevision_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESTORING_SERVICES_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList restoringServices_; - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - public com.google.protobuf.ProtocolStringList getRestoringServicesList() { - return restoringServices_; - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - public int getRestoringServicesCount() { - return restoringServices_.size(); - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - public java.lang.String getRestoringServices(int index) { - return restoringServices_.get(index); - } - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - public com.google.protobuf.ByteString getRestoringServicesBytes(int index) { - return restoringServices_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(3, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1beta.Backup.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, state_); - } - if (serviceRevision_ != null) { - output.writeMessage(5, getServiceRevision()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - for (int i = 0; i < restoringServices_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, restoringServices_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1beta.Backup.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); - } - if (serviceRevision_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getServiceRevision()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - { - int dataSize = 0; - for (int i = 0; i < restoringServices_.size(); i++) { - dataSize += computeStringSizeNoTag(restoringServices_.getRaw(i)); - } - size += dataSize; - size += 1 * getRestoringServicesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.Backup)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.Backup other = (com.google.cloud.metastore.v1beta.Backup) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (hasServiceRevision() != other.hasServiceRevision()) return false; - if (hasServiceRevision()) { - if (!getServiceRevision().equals(other.getServiceRevision())) return false; - } - if (!getDescription().equals(other.getDescription())) return false; - if (!getRestoringServicesList().equals(other.getRestoringServicesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasServiceRevision()) { - hash = (37 * hash) + SERVICE_REVISION_FIELD_NUMBER; - hash = (53 * hash) + getServiceRevision().hashCode(); - } - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getRestoringServicesCount() > 0) { - hash = (37 * hash) + RESTORING_SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getRestoringServicesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Backup parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Backup parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Backup parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.Backup prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a backup resource.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Backup} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Backup) - com.google.cloud.metastore.v1beta.BackupOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Backup_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Backup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Backup.class, - com.google.cloud.metastore.v1beta.Backup.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.Backup.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - serviceRevision_ = null; - if (serviceRevisionBuilder_ != null) { - serviceRevisionBuilder_.dispose(); - serviceRevisionBuilder_ = null; - } - description_ = ""; - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Backup_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Backup getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.Backup.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Backup build() { - com.google.cloud.metastore.v1beta.Backup result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Backup buildPartial() { - com.google.cloud.metastore.v1beta.Backup result = - new com.google.cloud.metastore.v1beta.Backup(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.Backup result) { - if (((bitField0_ & 0x00000040) != 0)) { - restoringServices_ = restoringServices_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.restoringServices_ = restoringServices_; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.Backup result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.serviceRevision_ = - serviceRevisionBuilder_ == null ? serviceRevision_ : serviceRevisionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.description_ = description_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.Backup) { - return mergeFrom((com.google.cloud.metastore.v1beta.Backup) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.Backup other) { - if (other == com.google.cloud.metastore.v1beta.Backup.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasServiceRevision()) { - mergeServiceRevision(other.getServiceRevision()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.restoringServices_.isEmpty()) { - if (restoringServices_.isEmpty()) { - restoringServices_ = other.restoringServices_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureRestoringServicesIsMutable(); - restoringServices_.addAll(other.restoringServices_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: - { - input.readMessage(getServiceRevisionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureRestoringServicesIsMutable(); - restoringServices_.add(s); - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the backup, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the backup was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000004); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the backup finished creating.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Backup.State getState() { - com.google.cloud.metastore.v1beta.Backup.State result = - com.google.cloud.metastore.v1beta.Backup.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1beta.Backup.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1beta.Backup.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000008); - state_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.Service serviceRevision_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder> - serviceRevisionBuilder_; - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - public boolean hasServiceRevision() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - public com.google.cloud.metastore.v1beta.Service getServiceRevision() { - if (serviceRevisionBuilder_ == null) { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : serviceRevision_; - } else { - return serviceRevisionBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setServiceRevision(com.google.cloud.metastore.v1beta.Service value) { - if (serviceRevisionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceRevision_ = value; - } else { - serviceRevisionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setServiceRevision( - com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { - if (serviceRevisionBuilder_ == null) { - serviceRevision_ = builderForValue.build(); - } else { - serviceRevisionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeServiceRevision(com.google.cloud.metastore.v1beta.Service value) { - if (serviceRevisionBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && serviceRevision_ != null - && serviceRevision_ != com.google.cloud.metastore.v1beta.Service.getDefaultInstance()) { - getServiceRevisionBuilder().mergeFrom(value); - } else { - serviceRevision_ = value; - } - } else { - serviceRevisionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearServiceRevision() { - bitField0_ = (bitField0_ & ~0x00000010); - serviceRevision_ = null; - if (serviceRevisionBuilder_ != null) { - serviceRevisionBuilder_.dispose(); - serviceRevisionBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.Service.Builder getServiceRevisionBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getServiceRevisionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceRevisionOrBuilder() { - if (serviceRevisionBuilder_ != null) { - return serviceRevisionBuilder_.getMessageOrBuilder(); - } else { - return serviceRevision_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : serviceRevision_; - } - } - /** - * - * - *
-     * Output only. The revision of the service at the time of backup.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder> - getServiceRevisionFieldBuilder() { - if (serviceRevisionBuilder_ == null) { - serviceRevisionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder>( - getServiceRevision(), getParentForChildren(), isClean()); - serviceRevision_ = null; - } - return serviceRevisionBuilder_; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the backup.
-     * 
- * - * string description = 6; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList restoringServices_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureRestoringServicesIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - restoringServices_ = new com.google.protobuf.LazyStringArrayList(restoringServices_); - bitField0_ |= 0x00000040; - } - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - public com.google.protobuf.ProtocolStringList getRestoringServicesList() { - return restoringServices_.getUnmodifiableView(); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - public int getRestoringServicesCount() { - return restoringServices_.size(); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - public java.lang.String getRestoringServices(int index) { - return restoringServices_.get(index); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - public com.google.protobuf.ByteString getRestoringServicesBytes(int index) { - return restoringServices_.getByteString(index); - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index to set the value at. - * @param value The restoringServices to set. - * @return This builder for chaining. - */ - public Builder setRestoringServices(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoringServicesIsMutable(); - restoringServices_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The restoringServices to add. - * @return This builder for chaining. - */ - public Builder addRestoringServices(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoringServicesIsMutable(); - restoringServices_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param values The restoringServices to add. - * @return This builder for chaining. - */ - public Builder addAllRestoringServices(java.lang.Iterable values) { - ensureRestoringServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restoringServices_); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearRestoringServices() { - restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Services that are restoring from the backup.
-     * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes of the restoringServices to add. - * @return This builder for chaining. - */ - public Builder addRestoringServicesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRestoringServicesIsMutable(); - restoringServices_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Backup) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Backup) - private static final com.google.cloud.metastore.v1beta.Backup DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Backup(); - } - - public static com.google.cloud.metastore.v1beta.Backup getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Backup parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Backup getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupOrBuilder.java deleted file mode 100644 index 2f5ddf8b4377..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupOrBuilder.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface BackupOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Backup) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the backup, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the backup was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the backup finished creating.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1beta.Backup.State getState(); - - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the serviceRevision field is set. - */ - boolean hasServiceRevision(); - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The serviceRevision. - */ - com.google.cloud.metastore.v1beta.Service getServiceRevision(); - /** - * - * - *
-   * Output only. The revision of the service at the time of backup.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceRevisionOrBuilder(); - - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The description of the backup.
-   * 
- * - * string description = 6; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the restoringServices. - */ - java.util.List getRestoringServicesList(); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of restoringServices. - */ - int getRestoringServicesCount(); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The restoringServices at the given index. - */ - java.lang.String getRestoringServices(int index); - /** - * - * - *
-   * Output only. Services that are restoring from the backup.
-   * 
- * - * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the restoringServices at the given index. - */ - com.google.protobuf.ByteString getRestoringServicesBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequest.java deleted file mode 100644 index 9d1c39072433..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequest.java +++ /dev/null @@ -1,1415 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1beta.DataprocMetastore.CreateBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.CreateBackupRequest} - */ -public final class CreateBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.CreateBackupRequest) - CreateBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateBackupRequest.newBuilder() to construct. - private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateBackupRequest() { - parent_ = ""; - backupId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.CreateBackupRequest.class, - com.google.cloud.metastore.v1beta.CreateBackupRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * backup of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * backup of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - @java.lang.Override - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backupId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backupId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1beta.Backup 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - @java.lang.Override - public boolean hasBackup() { - return backup_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Backup getBackup() { - return backup_ == null - ? com.google.cloud.metastore.v1beta.Backup.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupOrBuilder() { - return backup_ == null - ? com.google.cloud.metastore.v1beta.Backup.getDefaultInstance() - : backup_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); - } - if (backup_ != null) { - output.writeMessage(3, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); - } - if (backup_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackup()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.CreateBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.CreateBackupRequest other = - (com.google.cloud.metastore.v1beta.CreateBackupRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getBackupId().equals(other.getBackupId())) return false; - if (hasBackup() != other.hasBackup()) return false; - if (hasBackup()) { - if (!getBackup().equals(other.getBackup())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; - hash = (53 * hash) + getBackupId().hashCode(); - if (hasBackup()) { - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.CreateBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1beta.DataprocMetastore.CreateBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.CreateBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.CreateBackupRequest) - com.google.cloud.metastore.v1beta.CreateBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.CreateBackupRequest.class, - com.google.cloud.metastore.v1beta.CreateBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.CreateBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - backupId_ = ""; - backup_ = null; - if (backupBuilder_ != null) { - backupBuilder_.dispose(); - backupBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.CreateBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateBackupRequest build() { - com.google.cloud.metastore.v1beta.CreateBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateBackupRequest buildPartial() { - com.google.cloud.metastore.v1beta.CreateBackupRequest result = - new com.google.cloud.metastore.v1beta.CreateBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.CreateBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.backupId_ = backupId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.backup_ = backupBuilder_ == null ? backup_ : backupBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.CreateBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.CreateBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.CreateBackupRequest other) { - if (other == com.google.cloud.metastore.v1beta.CreateBackupRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBackupId().isEmpty()) { - backupId_ = other.backupId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasBackup()) { - mergeBackup(other.getBackup()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - backupId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * backup of the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - public java.lang.String getBackupId() { - java.lang.Object ref = backupId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backupId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - public com.google.protobuf.ByteString getBackupIdBytes() { - java.lang.Object ref = backupId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backupId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backupId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearBackupId() { - backupId_ = getDefaultInstance().getBackupId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for backupId to set. - * @return This builder for chaining. - */ - public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backupId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Backup, - com.google.cloud.metastore.v1beta.Backup.Builder, - com.google.cloud.metastore.v1beta.BackupOrBuilder> - backupBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - public boolean hasBackup() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - public com.google.cloud.metastore.v1beta.Backup getBackup() { - if (backupBuilder_ == null) { - return backup_ == null - ? com.google.cloud.metastore.v1beta.Backup.getDefaultInstance() - : backup_; - } else { - return backupBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBackup(com.google.cloud.metastore.v1beta.Backup value) { - if (backupBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - } else { - backupBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBackup(com.google.cloud.metastore.v1beta.Backup.Builder builderForValue) { - if (backupBuilder_ == null) { - backup_ = builderForValue.build(); - } else { - backupBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeBackup(com.google.cloud.metastore.v1beta.Backup value) { - if (backupBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && backup_ != null - && backup_ != com.google.cloud.metastore.v1beta.Backup.getDefaultInstance()) { - getBackupBuilder().mergeFrom(value); - } else { - backup_ = value; - } - } else { - backupBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearBackup() { - bitField0_ = (bitField0_ & ~0x00000004); - backup_ = null; - if (backupBuilder_ != null) { - backupBuilder_.dispose(); - backupBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.Backup.Builder getBackupBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBackupFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupOrBuilder() { - if (backupBuilder_ != null) { - return backupBuilder_.getMessageOrBuilder(); - } else { - return backup_ == null - ? com.google.cloud.metastore.v1beta.Backup.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Backup, - com.google.cloud.metastore.v1beta.Backup.Builder, - com.google.cloud.metastore.v1beta.BackupOrBuilder> - getBackupFieldBuilder() { - if (backupBuilder_ == null) { - backupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Backup, - com.google.cloud.metastore.v1beta.Backup.Builder, - com.google.cloud.metastore.v1beta.BackupOrBuilder>( - getBackup(), getParentForChildren(), isClean()); - backup_ = null; - } - return backupBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.CreateBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.CreateBackupRequest) - private static final com.google.cloud.metastore.v1beta.CreateBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.CreateBackupRequest(); - } - - public static com.google.cloud.metastore.v1beta.CreateBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequestOrBuilder.java deleted file mode 100644 index a90eab96ccbe..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequestOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface CreateBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.CreateBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * backup of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * backup of the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The backupId. - */ - java.lang.String getBackupId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for backupId. - */ - com.google.protobuf.ByteString getBackupIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the backup field is set. - */ - boolean hasBackup(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The backup. - */ - com.google.cloud.metastore.v1beta.Backup getBackup(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequest.java deleted file mode 100644 index a235ef086657..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequest.java +++ /dev/null @@ -1,1426 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for CreateFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.CreateFederationRequest} - */ -public final class CreateFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.CreateFederationRequest) - CreateFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateFederationRequest.newBuilder() to construct. - private CreateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateFederationRequest() { - parent_ = ""; - federationId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.CreateFederationRequest.class, - com.google.cloud.metastore.v1beta.CreateFederationRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a
-   * federation service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a
-   * federation service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEDERATION_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - @java.lang.Override - public java.lang.String getFederationId() { - java.lang.Object ref = federationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - federationId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFederationIdBytes() { - java.lang.Object ref = federationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - federationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEDERATION_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1beta.Federation 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - @java.lang.Override - public boolean hasFederation() { - return federation_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation getFederation() { - return federation_ == null - ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder() { - return federation_ == null - ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() - : federation_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, federationId_); - } - if (federation_ != null) { - output.writeMessage(3, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, federationId_); - } - if (federation_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.CreateFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.CreateFederationRequest other = - (com.google.cloud.metastore.v1beta.CreateFederationRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getFederationId().equals(other.getFederationId())) return false; - if (hasFederation() != other.hasFederation()) return false; - if (hasFederation()) { - if (!getFederation().equals(other.getFederation())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FEDERATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getFederationId().hashCode(); - if (hasFederation()) { - hash = (37 * hash) + FEDERATION_FIELD_NUMBER; - hash = (53 * hash) + getFederation().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.CreateFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for CreateFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.CreateFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.CreateFederationRequest) - com.google.cloud.metastore.v1beta.CreateFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.CreateFederationRequest.class, - com.google.cloud.metastore.v1beta.CreateFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.CreateFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - federationId_ = ""; - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.CreateFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateFederationRequest build() { - com.google.cloud.metastore.v1beta.CreateFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateFederationRequest buildPartial() { - com.google.cloud.metastore.v1beta.CreateFederationRequest result = - new com.google.cloud.metastore.v1beta.CreateFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.CreateFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.federationId_ = federationId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.federation_ = federationBuilder_ == null ? federation_ : federationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.CreateFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.CreateFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.CreateFederationRequest other) { - if (other == com.google.cloud.metastore.v1beta.CreateFederationRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFederationId().isEmpty()) { - federationId_ = other.federationId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasFederation()) { - mergeFederation(other.getFederation()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - federationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getFederationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location in which to create a
-     * federation service, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - public java.lang.String getFederationId() { - java.lang.Object ref = federationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - federationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - public com.google.protobuf.ByteString getFederationIdBytes() { - java.lang.Object ref = federationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - federationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The federationId to set. - * @return This builder for chaining. - */ - public Builder setFederationId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - federationId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearFederationId() { - federationId_ = getDefaultInstance().getFederationId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for federationId to set. - * @return This builder for chaining. - */ - public Builder setFederationIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - federationId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.Federation federation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder> - federationBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - public boolean hasFederation() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - public com.google.cloud.metastore.v1beta.Federation getFederation() { - if (federationBuilder_ == null) { - return federation_ == null - ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() - : federation_; - } else { - return federationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation(com.google.cloud.metastore.v1beta.Federation value) { - if (federationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - federation_ = value; - } else { - federationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation( - com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { - if (federationBuilder_ == null) { - federation_ = builderForValue.build(); - } else { - federationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeFederation(com.google.cloud.metastore.v1beta.Federation value) { - if (federationBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && federation_ != null - && federation_ != com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()) { - getFederationBuilder().mergeFrom(value); - } else { - federation_ = value; - } - } else { - federationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearFederation() { - bitField0_ = (bitField0_ & ~0x00000004); - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.Federation.Builder getFederationBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getFederationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder() { - if (federationBuilder_ != null) { - return federationBuilder_.getMessageOrBuilder(); - } else { - return federation_ == null - ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder> - getFederationFieldBuilder() { - if (federationBuilder_ == null) { - federationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder>( - getFederation(), getParentForChildren(), isClean()); - federation_ = null; - } - return federationBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.CreateFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.CreateFederationRequest) - private static final com.google.cloud.metastore.v1beta.CreateFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.CreateFederationRequest(); - } - - public static com.google.cloud.metastore.v1beta.CreateFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequestOrBuilder.java deleted file mode 100644 index 47e8b863ca4c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequestOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public interface CreateFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.CreateFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a
-   * federation service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location in which to create a
-   * federation service, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The federationId. - */ - java.lang.String getFederationId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for federationId. - */ - com.google.protobuf.ByteString getFederationIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - boolean hasFederation(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - com.google.cloud.metastore.v1beta.Federation getFederation(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequest.java deleted file mode 100644 index 248d3b6d3c22..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequest.java +++ /dev/null @@ -1,1434 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.CreateMetadataImportRequest} - */ -public final class CreateMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.CreateMetadataImportRequest) - CreateMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateMetadataImportRequest.newBuilder() to construct. - private CreateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateMetadataImportRequest() { - parent_ = ""; - metadataImportId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.class, - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * metastore import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * metastore import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_IMPORT_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - @java.lang.Override - public java.lang.String getMetadataImportId() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metadataImportId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMetadataImportIdBytes() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metadataImportId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_IMPORT_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1beta.MetadataImport 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - @java.lang.Override - public boolean hasMetadataImport() { - return metadataImport_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() - : metadataImport_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metadataImportId_); - } - if (metadataImport_ != null) { - output.writeMessage(3, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metadataImportId_); - } - if (metadataImport_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.CreateMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest other = - (com.google.cloud.metastore.v1beta.CreateMetadataImportRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getMetadataImportId().equals(other.getMetadataImportId())) return false; - if (hasMetadataImport() != other.hasMetadataImport()) return false; - if (hasMetadataImport()) { - if (!getMetadataImport().equals(other.getMetadataImport())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + METADATA_IMPORT_ID_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImportId().hashCode(); - if (hasMetadataImport()) { - hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImport().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.CreateMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.CreateMetadataImportRequest) - com.google.cloud.metastore.v1beta.CreateMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.class, - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - metadataImportId_ = ""; - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateMetadataImportRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateMetadataImportRequest build() { - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest result = - new com.google.cloud.metastore.v1beta.CreateMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.CreateMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadataImportId_ = metadataImportId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadataImport_ = - metadataImportBuilder_ == null ? metadataImport_ : metadataImportBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.CreateMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.CreateMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.CreateMetadataImportRequest other) { - if (other - == com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getMetadataImportId().isEmpty()) { - metadataImportId_ = other.metadataImportId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasMetadataImport()) { - mergeMetadataImport(other.getMetadataImport()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - metadataImportId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getMetadataImportFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service in which to create a
-     * metastore import, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - public java.lang.String getMetadataImportId() { - java.lang.Object ref = metadataImportId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metadataImportId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - public com.google.protobuf.ByteString getMetadataImportIdBytes() { - java.lang.Object ref = metadataImportId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metadataImportId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The metadataImportId to set. - * @return This builder for chaining. - */ - public Builder setMetadataImportId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - metadataImportId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMetadataImportId() { - metadataImportId_ = getDefaultInstance().getMetadataImportId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for metadataImportId to set. - * @return This builder for chaining. - */ - public Builder setMetadataImportIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - metadataImportId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.MetadataImport metadataImport_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> - metadataImportBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - public boolean hasMetadataImport() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport() { - if (metadataImportBuilder_ == null) { - return metadataImport_ == null - ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() - : metadataImport_; - } else { - return metadataImportBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport(com.google.cloud.metastore.v1beta.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataImport_ = value; - } else { - metadataImportBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport( - com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { - if (metadataImportBuilder_ == null) { - metadataImport_ = builderForValue.build(); - } else { - metadataImportBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeMetadataImport(com.google.cloud.metastore.v1beta.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && metadataImport_ != null - && metadataImport_ - != com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()) { - getMetadataImportBuilder().mergeFrom(value); - } else { - metadataImport_ = value; - } - } else { - metadataImportBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearMetadataImport() { - bitField0_ = (bitField0_ & ~0x00000004); - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataImport.Builder getMetadataImportBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataImportFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder() { - if (metadataImportBuilder_ != null) { - return metadataImportBuilder_.getMessageOrBuilder(); - } else { - return metadataImport_ == null - ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> - getMetadataImportFieldBuilder() { - if (metadataImportBuilder_ == null) { - metadataImportBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder>( - getMetadataImport(), getParentForChildren(), isClean()); - metadataImport_ = null; - } - return metadataImportBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.CreateMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.CreateMetadataImportRequest) - private static final com.google.cloud.metastore.v1beta.CreateMetadataImportRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.CreateMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateMetadataImportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequestOrBuilder.java deleted file mode 100644 index 573bd0f2794b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface CreateMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.CreateMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * metastore import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service in which to create a
-   * metastore import, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metadataImportId. - */ - java.lang.String getMetadataImportId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metadataImportId. - */ - com.google.protobuf.ByteString getMetadataImportIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - boolean hasMetadataImport(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequest.java deleted file mode 100644 index 22797c34f51a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequest.java +++ /dev/null @@ -1,1427 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.CreateService][google.cloud.metastore.v1beta.DataprocMetastore.CreateService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.CreateServiceRequest} - */ -public final class CreateServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.CreateServiceRequest) - CreateServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateServiceRequest.newBuilder() to construct. - private CreateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateServiceRequest() { - parent_ = ""; - serviceId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.CreateServiceRequest.class, - com.google.cloud.metastore.v1beta.CreateServiceRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - @java.lang.Override - public java.lang.String getServiceId() { - java.lang.Object ref = serviceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceId_ = s; - return s; - } - } - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceIdBytes() { - java.lang.Object ref = serviceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1beta.Service 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - @java.lang.Override - public boolean hasService() { - return service_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service getService() { - return service_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder() { - return service_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : service_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceId_); - } - if (service_ != null) { - output.writeMessage(3, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceId_); - } - if (service_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.CreateServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.CreateServiceRequest other = - (com.google.cloud.metastore.v1beta.CreateServiceRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getServiceId().equals(other.getServiceId())) return false; - if (hasService() != other.hasService()) return false; - if (hasService()) { - if (!getService().equals(other.getService())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - if (hasService()) { - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.CreateServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.CreateService][google.cloud.metastore.v1beta.DataprocMetastore.CreateService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.CreateServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.CreateServiceRequest) - com.google.cloud.metastore.v1beta.CreateServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.CreateServiceRequest.class, - com.google.cloud.metastore.v1beta.CreateServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.CreateServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - serviceId_ = ""; - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.CreateServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateServiceRequest build() { - com.google.cloud.metastore.v1beta.CreateServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateServiceRequest buildPartial() { - com.google.cloud.metastore.v1beta.CreateServiceRequest result = - new com.google.cloud.metastore.v1beta.CreateServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.CreateServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.serviceId_ = serviceId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.service_ = serviceBuilder_ == null ? service_ : serviceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.CreateServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.CreateServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.CreateServiceRequest other) { - if (other == com.google.cloud.metastore.v1beta.CreateServiceRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getServiceId().isEmpty()) { - serviceId_ = other.serviceId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasService()) { - mergeService(other.getService()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - serviceId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getServiceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - public java.lang.String getServiceId() { - java.lang.Object ref = serviceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - public com.google.protobuf.ByteString getServiceIdBytes() { - java.lang.Object ref = serviceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The serviceId to set. - * @return This builder for chaining. - */ - public Builder setServiceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearServiceId() { - serviceId_ = getDefaultInstance().getServiceId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for serviceId to set. - * @return This builder for chaining. - */ - public Builder setServiceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.Service service_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder> - serviceBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - public boolean hasService() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - public com.google.cloud.metastore.v1beta.Service getService() { - if (serviceBuilder_ == null) { - return service_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : service_; - } else { - return serviceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1beta.Service value) { - if (serviceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - } else { - serviceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { - if (serviceBuilder_ == null) { - service_ = builderForValue.build(); - } else { - serviceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeService(com.google.cloud.metastore.v1beta.Service value) { - if (serviceBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && service_ != null - && service_ != com.google.cloud.metastore.v1beta.Service.getDefaultInstance()) { - getServiceBuilder().mergeFrom(value); - } else { - service_ = value; - } - } else { - serviceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearService() { - bitField0_ = (bitField0_ & ~0x00000004); - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.Service.Builder getServiceBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getServiceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder() { - if (serviceBuilder_ != null) { - return serviceBuilder_.getMessageOrBuilder(); - } else { - return service_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : 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.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder> - getServiceFieldBuilder() { - if (serviceBuilder_ == null) { - serviceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder>( - getService(), getParentForChildren(), isClean()); - service_ = null; - } - return serviceBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.CreateServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.CreateServiceRequest) - private static final com.google.cloud.metastore.v1beta.CreateServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.CreateServiceRequest(); - } - - public static com.google.cloud.metastore.v1beta.CreateServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.CreateServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequestOrBuilder.java deleted file mode 100644 index 56ada557e36d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequestOrBuilder.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface CreateServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.CreateServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceId. - */ - java.lang.String getServiceId(); - /** - * - * - *
-   * 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.
-   * 
- * - * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceId. - */ - com.google.protobuf.ByteString getServiceIdBytes(); - - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - boolean hasService(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - com.google.cloud.metastore.v1beta.Service getService(); - /** - * - * - *
-   * 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.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfig.java deleted file mode 100644 index c637b31093aa..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfig.java +++ /dev/null @@ -1,545 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Specifies how metastore metadata should be integrated with the Data Catalog
- * service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DataCatalogConfig} - */ -public final class DataCatalogConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DataCatalogConfig) - DataCatalogConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataCatalogConfig.newBuilder() to construct. - private DataCatalogConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataCatalogConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataCatalogConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DataCatalogConfig.class, - com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder.class); - } - - public static final int ENABLED_FIELD_NUMBER = 2; - private boolean enabled_ = false; - /** - * - * - *
-   * Defines whether the metastore metadata should be synced to Data Catalog.
-   * The default value is to disable syncing metastore metadata to Data Catalog.
-   * 
- * - * bool enabled = 2; - * - * @return The enabled. - */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (enabled_ != false) { - output.writeBool(2, enabled_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enabled_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.DataCatalogConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.DataCatalogConfig other = - (com.google.cloud.metastore.v1beta.DataCatalogConfig) obj; - - if (getEnabled() != other.getEnabled()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.DataCatalogConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies how metastore metadata should be integrated with the Data Catalog
-   * service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DataCatalogConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DataCatalogConfig) - com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DataCatalogConfig.class, - com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.DataCatalogConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enabled_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataCatalogConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataCatalogConfig build() { - com.google.cloud.metastore.v1beta.DataCatalogConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataCatalogConfig buildPartial() { - com.google.cloud.metastore.v1beta.DataCatalogConfig result = - new com.google.cloud.metastore.v1beta.DataCatalogConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.DataCatalogConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enabled_ = enabled_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.DataCatalogConfig) { - return mergeFrom((com.google.cloud.metastore.v1beta.DataCatalogConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.DataCatalogConfig other) { - if (other == com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance()) - return this; - if (other.getEnabled() != false) { - setEnabled(other.getEnabled()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: - { - enabled_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private boolean enabled_; - /** - * - * - *
-     * Defines whether the metastore metadata should be synced to Data Catalog.
-     * The default value is to disable syncing metastore metadata to Data Catalog.
-     * 
- * - * bool enabled = 2; - * - * @return The enabled. - */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; - } - /** - * - * - *
-     * Defines whether the metastore metadata should be synced to Data Catalog.
-     * The default value is to disable syncing metastore metadata to Data Catalog.
-     * 
- * - * bool enabled = 2; - * - * @param value The enabled to set. - * @return This builder for chaining. - */ - public Builder setEnabled(boolean value) { - - enabled_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Defines whether the metastore metadata should be synced to Data Catalog.
-     * The default value is to disable syncing metastore metadata to Data Catalog.
-     * 
- * - * bool enabled = 2; - * - * @return This builder for chaining. - */ - public Builder clearEnabled() { - bitField0_ = (bitField0_ & ~0x00000001); - enabled_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DataCatalogConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DataCatalogConfig) - private static final com.google.cloud.metastore.v1beta.DataCatalogConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DataCatalogConfig(); - } - - public static com.google.cloud.metastore.v1beta.DataCatalogConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataCatalogConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataCatalogConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfigOrBuilder.java deleted file mode 100644 index 868d155dfece..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfigOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface DataCatalogConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DataCatalogConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Defines whether the metastore metadata should be synced to Data Catalog.
-   * The default value is to disable syncing metastore metadata to Data Catalog.
-   * 
- * - * bool enabled = 2; - * - * @return The enabled. - */ - boolean getEnabled(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpec.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpec.java deleted file mode 100644 index d998be82a85b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpec.java +++ /dev/null @@ -1,595 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * The specification of database dump to import from or export to.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DatabaseDumpSpec} - */ -public final class DatabaseDumpSpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DatabaseDumpSpec) - DatabaseDumpSpecOrBuilder { - private static final long serialVersionUID = 0L; - // Use DatabaseDumpSpec.newBuilder() to construct. - private DatabaseDumpSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DatabaseDumpSpec() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DatabaseDumpSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.class, - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Builder.class); - } - - /** - * - * - *
-   * The type of the database dump.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.DatabaseDumpSpec.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The type of the database dump is unknown.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Database dump is a MySQL dump file.
-     * 
- * - * MYSQL = 1; - */ - MYSQL(1), - /** - * - * - *
-     * Database dump contains Avro files.
-     * 
- * - * AVRO = 2; - */ - AVRO(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The type of the database dump is unknown.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Database dump is a MySQL dump file.
-     * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - /** - * - * - *
-     * Database dump contains Avro files.
-     * 
- * - * AVRO = 2; - */ - public static final int AVRO_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return MYSQL; - case 2: - return AVRO; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.DatabaseDumpSpec.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.DatabaseDumpSpec.Type) - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.DatabaseDumpSpec)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.DatabaseDumpSpec other = - (com.google.cloud.metastore.v1beta.DatabaseDumpSpec) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.DatabaseDumpSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The specification of database dump to import from or export to.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DatabaseDumpSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DatabaseDumpSpec) - com.google.cloud.metastore.v1beta.DatabaseDumpSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.class, - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.DatabaseDumpSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.DatabaseDumpSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec build() { - com.google.cloud.metastore.v1beta.DatabaseDumpSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec buildPartial() { - com.google.cloud.metastore.v1beta.DatabaseDumpSpec result = - new com.google.cloud.metastore.v1beta.DatabaseDumpSpec(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.DatabaseDumpSpec) { - return mergeFrom((com.google.cloud.metastore.v1beta.DatabaseDumpSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.DatabaseDumpSpec other) { - if (other == com.google.cloud.metastore.v1beta.DatabaseDumpSpec.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DatabaseDumpSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DatabaseDumpSpec) - private static final com.google.cloud.metastore.v1beta.DatabaseDumpSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DatabaseDumpSpec(); - } - - public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DatabaseDumpSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpecOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpecOrBuilder.java deleted file mode 100644 index 35a2861c8411..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpecOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface DatabaseDumpSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DatabaseDumpSpec) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfig.java deleted file mode 100644 index cdc82aed8d29..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfig.java +++ /dev/null @@ -1,826 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Specifies how metastore metadata should be integrated with the Dataplex
- * service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DataplexConfig} - */ -public final class DataplexConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DataplexConfig) - DataplexConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataplexConfig.newBuilder() to construct. - private DataplexConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataplexConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataplexConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataplexConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetLakeResources(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataplexConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DataplexConfig.class, - com.google.cloud.metastore.v1beta.DataplexConfig.Builder.class); - } - - public static final int LAKE_RESOURCES_FIELD_NUMBER = 1; - - private static final class LakeResourcesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1beta.Lake> - defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataplexConfig_LakeResourcesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.metastore.v1beta.Lake.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField - lakeResources_; - - private com.google.protobuf.MapField - internalGetLakeResources() { - if (lakeResources_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LakeResourcesDefaultEntryHolder.defaultEntry); - } - return lakeResources_; - } - - public int getLakeResourcesCount() { - return internalGetLakeResources().getMap().size(); - } - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - @java.lang.Override - public boolean containsLakeResources(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLakeResources().getMap().containsKey(key); - } - /** Use {@link #getLakeResourcesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getLakeResources() { - return getLakeResourcesMap(); - } - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - @java.lang.Override - public java.util.Map - getLakeResourcesMap() { - return internalGetLakeResources().getMap(); - } - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1beta.Lake defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetLakeResources().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetLakeResources().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLakeResources(), LakeResourcesDefaultEntryHolder.defaultEntry, 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetLakeResources().getMap().entrySet()) { - com.google.protobuf.MapEntry - lakeResources__ = - LakeResourcesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, lakeResources__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.DataplexConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.DataplexConfig other = - (com.google.cloud.metastore.v1beta.DataplexConfig) obj; - - if (!internalGetLakeResources().equals(other.internalGetLakeResources())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetLakeResources().getMap().isEmpty()) { - hash = (37 * hash) + LAKE_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + internalGetLakeResources().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.DataplexConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies how metastore metadata should be integrated with the Dataplex
-   * service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DataplexConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DataplexConfig) - com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataplexConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetLakeResources(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableLakeResources(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataplexConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DataplexConfig.class, - com.google.cloud.metastore.v1beta.DataplexConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.DataplexConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableLakeResources().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DataplexConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataplexConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataplexConfig build() { - com.google.cloud.metastore.v1beta.DataplexConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataplexConfig buildPartial() { - com.google.cloud.metastore.v1beta.DataplexConfig result = - new com.google.cloud.metastore.v1beta.DataplexConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.DataplexConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.lakeResources_ = internalGetLakeResources(); - result.lakeResources_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.DataplexConfig) { - return mergeFrom((com.google.cloud.metastore.v1beta.DataplexConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.DataplexConfig other) { - if (other == com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance()) - return this; - internalGetMutableLakeResources().mergeFrom(other.internalGetLakeResources()); - bitField0_ |= 0x00000001; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1beta.Lake> - lakeResources__ = - input.readMessage( - LakeResourcesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLakeResources() - .getMutableMap() - .put(lakeResources__.getKey(), lakeResources__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField - lakeResources_; - - private com.google.protobuf.MapField - internalGetLakeResources() { - if (lakeResources_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LakeResourcesDefaultEntryHolder.defaultEntry); - } - return lakeResources_; - } - - private com.google.protobuf.MapField - internalGetMutableLakeResources() { - if (lakeResources_ == null) { - lakeResources_ = - com.google.protobuf.MapField.newMapField(LakeResourcesDefaultEntryHolder.defaultEntry); - } - if (!lakeResources_.isMutable()) { - lakeResources_ = lakeResources_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return lakeResources_; - } - - public int getLakeResourcesCount() { - return internalGetLakeResources().getMap().size(); - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - @java.lang.Override - public boolean containsLakeResources(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLakeResources().getMap().containsKey(key); - } - /** Use {@link #getLakeResourcesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getLakeResources() { - return getLakeResourcesMap(); - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - @java.lang.Override - public java.util.Map - getLakeResourcesMap() { - return internalGetLakeResources().getMap(); - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1beta.Lake defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetLakeResources().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetLakeResources().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLakeResources() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableLakeResources().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - public Builder removeLakeResources(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLakeResources().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableLakeResources() { - bitField0_ |= 0x00000001; - return internalGetMutableLakeResources().getMutableMap(); - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - public Builder putLakeResources( - java.lang.String key, com.google.cloud.metastore.v1beta.Lake value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLakeResources().getMutableMap().put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * - * - *
-     * A reference to the Lake resources that this metastore service is attached
-     * to. The key is the lake resource name. Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-     * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - public Builder putAllLakeResources( - java.util.Map values) { - internalGetMutableLakeResources().getMutableMap().putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DataplexConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DataplexConfig) - private static final com.google.cloud.metastore.v1beta.DataplexConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DataplexConfig(); - } - - public static com.google.cloud.metastore.v1beta.DataplexConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataplexConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataplexConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfigOrBuilder.java deleted file mode 100644 index 08bb30104af7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfigOrBuilder.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface DataplexConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DataplexConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - int getLakeResourcesCount(); - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - boolean containsLakeResources(java.lang.String key); - /** Use {@link #getLakeResourcesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLakeResources(); - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - java.util.Map getLakeResourcesMap(); - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - /* nullable */ - com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1beta.Lake defaultValue); - /** - * - * - *
-   * A reference to the Lake resources that this metastore service is attached
-   * to. The key is the lake resource name. Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
-   * 
- * - * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; - */ - com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrThrow(java.lang.String key); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequest.java deleted file mode 100644 index e2442c8534b5..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequest.java +++ /dev/null @@ -1,905 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DeleteBackupRequest} - */ -public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DeleteBackupRequest) - DeleteBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteBackupRequest.newBuilder() to construct. - private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteBackupRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DeleteBackupRequest.class, - com.google.cloud.metastore.v1beta.DeleteBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.DeleteBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.DeleteBackupRequest other = - (com.google.cloud.metastore.v1beta.DeleteBackupRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.DeleteBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DeleteBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DeleteBackupRequest) - com.google.cloud.metastore.v1beta.DeleteBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DeleteBackupRequest.class, - com.google.cloud.metastore.v1beta.DeleteBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.DeleteBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.DeleteBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteBackupRequest build() { - com.google.cloud.metastore.v1beta.DeleteBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteBackupRequest buildPartial() { - com.google.cloud.metastore.v1beta.DeleteBackupRequest result = - new com.google.cloud.metastore.v1beta.DeleteBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.DeleteBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.DeleteBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.DeleteBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.DeleteBackupRequest other) { - if (other == com.google.cloud.metastore.v1beta.DeleteBackupRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to delete, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DeleteBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DeleteBackupRequest) - private static final com.google.cloud.metastore.v1beta.DeleteBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DeleteBackupRequest(); - } - - public static com.google.cloud.metastore.v1beta.DeleteBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequestOrBuilder.java deleted file mode 100644 index d6480a496297..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface DeleteBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DeleteBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the backup to delete, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequest.java deleted file mode 100644 index 29f91f793bd3..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequest.java +++ /dev/null @@ -1,903 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for DeleteFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DeleteFederationRequest} - */ -public final class DeleteFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DeleteFederationRequest) - DeleteFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteFederationRequest.newBuilder() to construct. - private DeleteFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteFederationRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DeleteFederationRequest.class, - com.google.cloud.metastore.v1beta.DeleteFederationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.DeleteFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.DeleteFederationRequest other = - (com.google.cloud.metastore.v1beta.DeleteFederationRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.DeleteFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for DeleteFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DeleteFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DeleteFederationRequest) - com.google.cloud.metastore.v1beta.DeleteFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DeleteFederationRequest.class, - com.google.cloud.metastore.v1beta.DeleteFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.DeleteFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.DeleteFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteFederationRequest build() { - com.google.cloud.metastore.v1beta.DeleteFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteFederationRequest buildPartial() { - com.google.cloud.metastore.v1beta.DeleteFederationRequest result = - new com.google.cloud.metastore.v1beta.DeleteFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.DeleteFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.DeleteFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.DeleteFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.DeleteFederationRequest other) { - if (other == com.google.cloud.metastore.v1beta.DeleteFederationRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to delete,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DeleteFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DeleteFederationRequest) - private static final com.google.cloud.metastore.v1beta.DeleteFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DeleteFederationRequest(); - } - - public static com.google.cloud.metastore.v1beta.DeleteFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequestOrBuilder.java deleted file mode 100644 index 035ee3e237f0..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public interface DeleteFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DeleteFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to delete,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequest.java deleted file mode 100644 index 9cf060c65fc6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequest.java +++ /dev/null @@ -1,905 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.DeleteService][google.cloud.metastore.v1beta.DataprocMetastore.DeleteService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DeleteServiceRequest} - */ -public final class DeleteServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DeleteServiceRequest) - DeleteServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteServiceRequest.newBuilder() to construct. - private DeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteServiceRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DeleteServiceRequest.class, - com.google.cloud.metastore.v1beta.DeleteServiceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.DeleteServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.DeleteServiceRequest other = - (com.google.cloud.metastore.v1beta.DeleteServiceRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.DeleteServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.DeleteService][google.cloud.metastore.v1beta.DataprocMetastore.DeleteService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.DeleteServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DeleteServiceRequest) - com.google.cloud.metastore.v1beta.DeleteServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.DeleteServiceRequest.class, - com.google.cloud.metastore.v1beta.DeleteServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.DeleteServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.DeleteServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteServiceRequest build() { - com.google.cloud.metastore.v1beta.DeleteServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteServiceRequest buildPartial() { - com.google.cloud.metastore.v1beta.DeleteServiceRequest result = - new com.google.cloud.metastore.v1beta.DeleteServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.DeleteServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.DeleteServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.DeleteServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.DeleteServiceRequest other) { - if (other == com.google.cloud.metastore.v1beta.DeleteServiceRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to delete, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DeleteServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DeleteServiceRequest) - private static final com.google.cloud.metastore.v1beta.DeleteServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DeleteServiceRequest(); - } - - public static com.google.cloud.metastore.v1beta.DeleteServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.DeleteServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequestOrBuilder.java deleted file mode 100644 index 00ec61a1cda4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface DeleteServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DeleteServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to delete, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfig.java deleted file mode 100644 index cd6b1daa9d4d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfig.java +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Encryption settings for the service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.EncryptionConfig} - */ -public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.EncryptionConfig) - EncryptionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use EncryptionConfig.newBuilder() to construct. - private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private EncryptionConfig() { - kmsKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EncryptionConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.EncryptionConfig.class, - com.google.cloud.metastore.v1beta.EncryptionConfig.Builder.class); - } - - public static final int KMS_KEY_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object kmsKey_ = ""; - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - @java.lang.Override - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } - } - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.EncryptionConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.EncryptionConfig other = - (com.google.cloud.metastore.v1beta.EncryptionConfig) obj; - - if (!getKmsKey().equals(other.getKmsKey())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; - hash = (53 * hash) + getKmsKey().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.EncryptionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Encryption settings for the service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.EncryptionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.EncryptionConfig) - com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.EncryptionConfig.class, - com.google.cloud.metastore.v1beta.EncryptionConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.EncryptionConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - kmsKey_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_EncryptionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.EncryptionConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.EncryptionConfig build() { - com.google.cloud.metastore.v1beta.EncryptionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.EncryptionConfig buildPartial() { - com.google.cloud.metastore.v1beta.EncryptionConfig result = - new com.google.cloud.metastore.v1beta.EncryptionConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.EncryptionConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.kmsKey_ = kmsKey_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.EncryptionConfig) { - return mergeFrom((com.google.cloud.metastore.v1beta.EncryptionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.EncryptionConfig other) { - if (other == com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance()) - return this; - if (!other.getKmsKey().isEmpty()) { - kmsKey_ = other.kmsKey_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - kmsKey_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object kmsKey_ = ""; - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - public com.google.protobuf.ByteString getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @param value The kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - kmsKey_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @return This builder for chaining. - */ - public Builder clearKmsKey() { - kmsKey_ = getDefaultInstance().getKmsKey(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The fully qualified customer provided Cloud KMS key name to use for
-     * customer data encryption, in the following form:
-     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-     * 
- * - * string kms_key = 1; - * - * @param value The bytes for kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - kmsKey_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.EncryptionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.EncryptionConfig) - private static final com.google.cloud.metastore.v1beta.EncryptionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.EncryptionConfig(); - } - - public static com.google.cloud.metastore.v1beta.EncryptionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EncryptionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.EncryptionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfigOrBuilder.java deleted file mode 100644 index 6e7b6130c282..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfigOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface EncryptionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.EncryptionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The kmsKey. - */ - java.lang.String getKmsKey(); - /** - * - * - *
-   * The fully qualified customer provided Cloud KMS key name to use for
-   * customer data encryption, in the following form:
-   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
-   * 
- * - * string kms_key = 1; - * - * @return The bytes for kmsKey. - */ - com.google.protobuf.ByteString getKmsKeyBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequest.java deleted file mode 100644 index eac43eb48cb6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequest.java +++ /dev/null @@ -1,1412 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadata].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ExportMetadataRequest} - */ -public final class ExportMetadataRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ExportMetadataRequest) - ExportMetadataRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportMetadataRequest.newBuilder() to construct. - private ExportMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportMetadataRequest() { - service_ = ""; - requestId_ = ""; - databaseDumpType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportMetadataRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ExportMetadataRequest.class, - com.google.cloud.metastore.v1beta.ExportMetadataRequest.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DESTINATION_GCS_FOLDER(2), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 2: - return DESTINATION_GCS_FOLDER; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int DESTINATION_GCS_FOLDER_FIELD_NUMBER = 2; - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - public boolean hasDestinationGcsFolder() { - return destinationCase_ == 2; - } - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - public java.lang.String getDestinationGcsFolder() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 2) { - destination_ = s; - } - return s; - } - } - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - public com.google.protobuf.ByteString getDestinationGcsFolderBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 2) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * export, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * export, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 4; - private int databaseDumpType_ = 0; - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to
-   * `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to
-   * `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (destinationCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, databaseDumpType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (destinationCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, databaseDumpType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ExportMetadataRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ExportMetadataRequest other = - (com.google.cloud.metastore.v1beta.ExportMetadataRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (databaseDumpType_ != other.databaseDumpType_) return false; - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 2: - if (!getDestinationGcsFolder().equals(other.getDestinationGcsFolder())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseDumpType_; - switch (destinationCase_) { - case 2: - hash = (37 * hash) + DESTINATION_GCS_FOLDER_FIELD_NUMBER; - hash = (53 * hash) + getDestinationGcsFolder().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.ExportMetadataRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadata].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ExportMetadataRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ExportMetadataRequest) - com.google.cloud.metastore.v1beta.ExportMetadataRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ExportMetadataRequest.class, - com.google.cloud.metastore.v1beta.ExportMetadataRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ExportMetadataRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - requestId_ = ""; - databaseDumpType_ = 0; - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ExportMetadataRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ExportMetadataRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ExportMetadataRequest build() { - com.google.cloud.metastore.v1beta.ExportMetadataRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ExportMetadataRequest buildPartial() { - com.google.cloud.metastore.v1beta.ExportMetadataRequest result = - new com.google.cloud.metastore.v1beta.ExportMetadataRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.ExportMetadataRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.databaseDumpType_ = databaseDumpType_; - } - } - - private void buildPartialOneofs( - com.google.cloud.metastore.v1beta.ExportMetadataRequest result) { - result.destinationCase_ = destinationCase_; - result.destination_ = this.destination_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ExportMetadataRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.ExportMetadataRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ExportMetadataRequest other) { - if (other == com.google.cloud.metastore.v1beta.ExportMetadataRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.databaseDumpType_ != 0) { - setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); - } - switch (other.getDestinationCase()) { - case DESTINATION_GCS_FOLDER: - { - destinationCase_ = 2; - destination_ = other.destination_; - onChanged(); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 2; - destination_ = s; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - databaseDumpType_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - @java.lang.Override - public boolean hasDestinationGcsFolder() { - return destinationCase_ == 2; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - @java.lang.Override - public java.lang.String getDestinationGcsFolder() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 2) { - destination_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDestinationGcsFolderBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 2) { - ref = destination_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 2) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @param value The destinationGcsFolder to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsFolder(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationCase_ = 2; - destination_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @return This builder for chaining. - */ - public Builder clearDestinationGcsFolder() { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * A Cloud Storage URI of a folder, in the format
-     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-     * `<export_folder>` containing exported files will be created below it.
-     * 
- * - * string destination_gcs_folder = 2; - * - * @param value The bytes for destinationGcsFolder to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsFolderBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - destinationCase_ = 2; - destination_ = value; - onChanged(); - return this; - } - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * export, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int databaseDumpType_ = 0; - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpTypeValue(int value) { - databaseDumpType_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpType( - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - databaseDumpType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseDumpType() { - bitField0_ = (bitField0_ & ~0x00000008); - databaseDumpType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ExportMetadataRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ExportMetadataRequest) - private static final com.google.cloud.metastore.v1beta.ExportMetadataRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ExportMetadataRequest(); - } - - public static com.google.cloud.metastore.v1beta.ExportMetadataRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportMetadataRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ExportMetadataRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequestOrBuilder.java deleted file mode 100644 index 041681064ec4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequestOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface ExportMetadataRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ExportMetadataRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return Whether the destinationGcsFolder field is set. - */ - boolean hasDestinationGcsFolder(); - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The destinationGcsFolder. - */ - java.lang.String getDestinationGcsFolder(); - /** - * - * - *
-   * A Cloud Storage URI of a folder, in the format
-   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
-   * `<export_folder>` containing exported files will be created below it.
-   * 
- * - * string destination_gcs_folder = 2; - * - * @return The bytes for destinationGcsFolder. - */ - com.google.protobuf.ByteString getDestinationGcsFolderBytes(); - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * export, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * export, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); - - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to
-   * `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - int getDatabaseDumpTypeValue(); - /** - * - * - *
-   * Optional. The type of the database dump. If unspecified, defaults to
-   * `MYSQL`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The databaseDumpType. - */ - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType(); - - public com.google.cloud.metastore.v1beta.ExportMetadataRequest.DestinationCase - getDestinationCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Federation.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Federation.java deleted file mode 100644 index c2bda2bfc1b4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Federation.java +++ /dev/null @@ -1,3082 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Represents a federation of multiple backend metastores.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Federation} - */ -public final class Federation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Federation) - FederationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Federation.newBuilder() to construct. - private Federation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Federation() { - name_ = ""; - version_ = ""; - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - uid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Federation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_Federation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - case 6: - return internalGetBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_Federation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Federation.class, - com.google.cloud.metastore.v1beta.Federation.Builder.class); - } - - /** - * - * - *
-   * The current state of the federation.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.Federation.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metastore federation is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metastore federation is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The metastore federation is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - ACTIVE(2), - /** - * - * - *
-     * The metastore federation is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 3; - */ - UPDATING(3), - /** - * - * - *
-     * The metastore federation is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - /** - * - * - *
-     * The metastore federation has encountered an error and cannot be used. The
-     * metastore federation should be deleted.
-     * 
- * - * ERROR = 5; - */ - ERROR(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metastore federation is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metastore federation is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The metastore federation is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - public static final int ACTIVE_VALUE = 2; - /** - * - * - *
-     * The metastore federation is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 3; - */ - public static final int UPDATING_VALUE = 3; - /** - * - * - *
-     * The metastore federation is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - /** - * - * - *
-     * The metastore federation has encountered an error and cannot be used. The
-     * metastore federation should be deleted.
-     * 
- * - * ERROR = 5; - */ - public static final int ERROR_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return ACTIVE; - case 3: - return UPDATING; - case 4: - return DELETING; - case 5: - return ERROR; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.Federation.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Federation.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int VERSION_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend
-   * metastore versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend
-   * metastore versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKEND_METASTORES_FIELD_NUMBER = 6; - - private static final class BackendMetastoresDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.metastore.v1beta.BackendMetastore.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> - backendMetastores_; - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> - internalGetBackendMetastores() { - if (backendMetastores_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - return backendMetastores_; - } - - public int getBackendMetastoresCount() { - return internalGetBackendMetastores().getMap().size(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public boolean containsBackendMetastores(int key) { - - return internalGetBackendMetastores().getMap().containsKey(key); - } - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getBackendMetastores() { - return getBackendMetastoresMap(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public java.util.Map - getBackendMetastoresMap() { - return internalGetBackendMetastores().getMap(); - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1beta.BackendMetastore - getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1beta.BackendMetastore defaultValue) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrThrow(int key) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 8; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation.State getState() { - com.google.cloud.metastore.v1beta.Federation.State result = - com.google.cloud.metastore.v1beta.Federation.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1beta.Federation.State.UNRECOGNIZED - : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private volatile java.lang.Object stateMessage_ = ""; - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore federation, if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - @java.lang.Override - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore federation, if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UID_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private volatile java.lang.Object uid_ = ""; - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); - } - com.google.protobuf.GeneratedMessageV3.serializeIntegerMapTo( - output, - internalGetBackendMetastores(), - BackendMetastoresDefaultEntryHolder.defaultEntry, - 6); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, endpointUri_); - } - if (state_ - != com.google.cloud.metastore.v1beta.Federation.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(8, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, uid_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); - } - for (java.util.Map.Entry - entry : internalGetBackendMetastores().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> - backendMetastores__ = - BackendMetastoresDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, backendMetastores__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, endpointUri_); - } - if (state_ - != com.google.cloud.metastore.v1beta.Federation.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, uid_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.Federation)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.Federation other = - (com.google.cloud.metastore.v1beta.Federation) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getVersion().equals(other.getVersion())) return false; - if (!internalGetBackendMetastores().equals(other.internalGetBackendMetastores())) return false; - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (state_ != other.state_) return false; - if (!getStateMessage().equals(other.getStateMessage())) return false; - if (!getUid().equals(other.getUid())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetBackendMetastores().getMap().isEmpty()) { - hash = (37 * hash) + BACKEND_METASTORES_FIELD_NUMBER; - hash = (53 * hash) + internalGetBackendMetastores().hashCode(); - } - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Federation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Federation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Federation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.Federation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents a federation of multiple backend metastores.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Federation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Federation) - com.google.cloud.metastore.v1beta.FederationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_Federation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - case 6: - return internalGetBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - case 6: - return internalGetMutableBackendMetastores(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_Federation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Federation.class, - com.google.cloud.metastore.v1beta.Federation.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.Federation.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - version_ = ""; - internalGetMutableBackendMetastores().clear(); - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - uid_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_Federation_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.Federation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation build() { - com.google.cloud.metastore.v1beta.Federation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation buildPartial() { - com.google.cloud.metastore.v1beta.Federation result = - new com.google.cloud.metastore.v1beta.Federation(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.Federation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.backendMetastores_ = internalGetBackendMetastores(); - result.backendMetastores_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.endpointUri_ = endpointUri_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.stateMessage_ = stateMessage_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.uid_ = uid_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.Federation) { - return mergeFrom((com.google.cloud.metastore.v1beta.Federation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.Federation other) { - if (other == com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000008; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000010; - onChanged(); - } - internalGetMutableBackendMetastores().mergeFrom(other.internalGetBackendMetastores()); - bitField0_ |= 0x00000020; - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - bitField0_ |= 0x00000200; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - com.google.protobuf.MapEntry< - java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> - backendMetastores__ = - input.readMessage( - BackendMetastoresDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableBackendMetastores() - .getMutableMap() - .put(backendMetastores__.getKey(), backendMetastores__.getValue()); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 64: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 74: - { - stateMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: - { - uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - break; - } // case 82 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the federation, of the
-     * form:
-     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore federation was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000008; - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore federation.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; - return this; - } - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Apache Hive metastore version of the federation. All backend
-     * metastore versions must be compatible with the federation version.
-     * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> - backendMetastores_; - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> - internalGetBackendMetastores() { - if (backendMetastores_ == null) { - return com.google.protobuf.MapField.emptyMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - return backendMetastores_; - } - - private com.google.protobuf.MapField< - java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> - internalGetMutableBackendMetastores() { - if (backendMetastores_ == null) { - backendMetastores_ = - com.google.protobuf.MapField.newMapField( - BackendMetastoresDefaultEntryHolder.defaultEntry); - } - if (!backendMetastores_.isMutable()) { - backendMetastores_ = backendMetastores_.copy(); - } - bitField0_ |= 0x00000020; - onChanged(); - return backendMetastores_; - } - - public int getBackendMetastoresCount() { - return internalGetBackendMetastores().getMap().size(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public boolean containsBackendMetastores(int key) { - - return internalGetBackendMetastores().getMap().containsKey(key); - } - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getBackendMetastores() { - return getBackendMetastoresMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public java.util.Map - getBackendMetastoresMap() { - return internalGetBackendMetastores().getMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1beta.BackendMetastore - getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1beta.BackendMetastore defaultValue) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrThrow(int key) { - - java.util.Map map = - internalGetBackendMetastores().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearBackendMetastores() { - bitField0_ = (bitField0_ & ~0x00000020); - internalGetMutableBackendMetastores().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - public Builder removeBackendMetastores(int key) { - - internalGetMutableBackendMetastores().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableBackendMetastores() { - bitField0_ |= 0x00000020; - return internalGetMutableBackendMetastores().getMutableMap(); - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - public Builder putBackendMetastores( - int key, com.google.cloud.metastore.v1beta.BackendMetastore value) { - - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableBackendMetastores().getMutableMap().put(key, value); - bitField0_ |= 0x00000020; - return this; - } - /** - * - * - *
-     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-     * federation service serves metadata at query time. The map key represents
-     * the order in which `BackendMetastore`s should be evaluated to resolve
-     * database names at query time and should be greater than or equal to zero. A
-     * `BackendMetastore` with a lower number will be evaluated before a
-     * `BackendMetastore` with a higher number.
-     * 
- * - * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - public Builder putAllBackendMetastores( - java.util.Map - values) { - internalGetMutableBackendMetastores().getMutableMap().putAll(values); - bitField0_ |= 0x00000020; - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The federation endpoint.
-     * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation.State getState() { - com.google.cloud.metastore.v1beta.Federation.State result = - com.google.cloud.metastore.v1beta.Federation.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1beta.Federation.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1beta.Federation.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the federation.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000080); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object stateMessage_ = ""; - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - stateMessage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - stateMessage_ = getDefaultInstance().getStateMessage(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore federation, if available.
-     * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - stateMessage_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private java.lang.Object uid_ = ""; - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uid_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * federation.
-     * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uid_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Federation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Federation) - private static final com.google.cloud.metastore.v1beta.Federation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Federation(); - } - - public static com.google.cloud.metastore.v1beta.Federation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Federation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationOrBuilder.java deleted file mode 100644 index d99f8a169200..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationOrBuilder.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public interface FederationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Federation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the federation, of the
-   * form:
-   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore federation was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - int getLabelsCount(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * User-defined labels for the metastore federation.
-   * 
- * - * map<string, string> labels = 4; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend
-   * metastore versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * Immutable. The Apache Hive metastore version of the federation. All backend
-   * metastore versions must be compatible with the federation version.
-   * 
- * - * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - int getBackendMetastoresCount(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - boolean containsBackendMetastores(int key); - /** Use {@link #getBackendMetastoresMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getBackendMetastores(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - java.util.Map - getBackendMetastoresMap(); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - /* nullable */ - com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrDefault( - int key, - /* nullable */ - com.google.cloud.metastore.v1beta.BackendMetastore defaultValue); - /** - * - * - *
-   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
-   * federation service serves metadata at query time. The map key represents
-   * the order in which `BackendMetastore`s should be evaluated to resolve
-   * database names at query time and should be greater than or equal to zero. A
-   * `BackendMetastore` with a lower number will be evaluated before a
-   * `BackendMetastore` with a higher number.
-   * 
- * - * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; - * - */ - com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrThrow(int key); - - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-   * Output only. The federation endpoint.
-   * 
- * - * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the federation.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1beta.Federation.State getState(); - - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore federation, if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore federation, if available.
-   * 
- * - * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString getStateMessageBytes(); - - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - java.lang.String getUid(); - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * federation.
-   * 
- * - * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - com.google.protobuf.ByteString getUidBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequest.java deleted file mode 100644 index 90283395a32a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequest.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.GetBackup][google.cloud.metastore.v1beta.DataprocMetastore.GetBackup].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.GetBackupRequest} - */ -public final class GetBackupRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.GetBackupRequest) - GetBackupRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBackupRequest.newBuilder() to construct. - private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetBackupRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetBackupRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.GetBackupRequest.class, - com.google.cloud.metastore.v1beta.GetBackupRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.GetBackupRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.GetBackupRequest other = - (com.google.cloud.metastore.v1beta.GetBackupRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.GetBackupRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.GetBackup][google.cloud.metastore.v1beta.DataprocMetastore.GetBackup].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.GetBackupRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.GetBackupRequest) - com.google.cloud.metastore.v1beta.GetBackupRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetBackupRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetBackupRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.GetBackupRequest.class, - com.google.cloud.metastore.v1beta.GetBackupRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.GetBackupRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetBackupRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetBackupRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.GetBackupRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetBackupRequest build() { - com.google.cloud.metastore.v1beta.GetBackupRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetBackupRequest buildPartial() { - com.google.cloud.metastore.v1beta.GetBackupRequest result = - new com.google.cloud.metastore.v1beta.GetBackupRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.GetBackupRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.GetBackupRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.GetBackupRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.GetBackupRequest other) { - if (other == com.google.cloud.metastore.v1beta.GetBackupRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the backup to retrieve, in the
-     * following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.GetBackupRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.GetBackupRequest) - private static final com.google.cloud.metastore.v1beta.GetBackupRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.GetBackupRequest(); - } - - public static com.google.cloud.metastore.v1beta.GetBackupRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBackupRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetBackupRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequestOrBuilder.java deleted file mode 100644 index 9a84d08b6b05..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface GetBackupRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.GetBackupRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the backup to retrieve, in the
-   * following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequest.java deleted file mode 100644 index 1cf31025e17e..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequest.java +++ /dev/null @@ -1,658 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for GetFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.GetFederationRequest} - */ -public final class GetFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.GetFederationRequest) - GetFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetFederationRequest.newBuilder() to construct. - private GetFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetFederationRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_GetFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.GetFederationRequest.class, - com.google.cloud.metastore.v1beta.GetFederationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to
-   * retrieve, in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to
-   * retrieve, in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.GetFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.GetFederationRequest other = - (com.google.cloud.metastore.v1beta.GetFederationRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.GetFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for GetFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.GetFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.GetFederationRequest) - com.google.cloud.metastore.v1beta.GetFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_GetFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.GetFederationRequest.class, - com.google.cloud.metastore.v1beta.GetFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.GetFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.GetFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetFederationRequest build() { - com.google.cloud.metastore.v1beta.GetFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetFederationRequest buildPartial() { - com.google.cloud.metastore.v1beta.GetFederationRequest result = - new com.google.cloud.metastore.v1beta.GetFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.GetFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.GetFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.GetFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.GetFederationRequest other) { - if (other == com.google.cloud.metastore.v1beta.GetFederationRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore federation to
-     * retrieve, in the following form:
-     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.GetFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.GetFederationRequest) - private static final com.google.cloud.metastore.v1beta.GetFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.GetFederationRequest(); - } - - public static com.google.cloud.metastore.v1beta.GetFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequestOrBuilder.java deleted file mode 100644 index e356c7168f0e..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public interface GetFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.GetFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to
-   * retrieve, in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore federation to
-   * retrieve, in the following form:
-   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequest.java deleted file mode 100644 index 99fb583c1b08..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequest.java +++ /dev/null @@ -1,660 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.GetMetadataImportRequest} - */ -public final class GetMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.GetMetadataImportRequest) - GetMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetMetadataImportRequest.newBuilder() to construct. - private GetMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetMetadataImportRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.GetMetadataImportRequest.class, - com.google.cloud.metastore.v1beta.GetMetadataImportRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.GetMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.GetMetadataImportRequest other = - (com.google.cloud.metastore.v1beta.GetMetadataImportRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.GetMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.GetMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.GetMetadataImportRequest) - com.google.cloud.metastore.v1beta.GetMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.GetMetadataImportRequest.class, - com.google.cloud.metastore.v1beta.GetMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.GetMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetMetadataImportRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.GetMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetMetadataImportRequest build() { - com.google.cloud.metastore.v1beta.GetMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1beta.GetMetadataImportRequest result = - new com.google.cloud.metastore.v1beta.GetMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.GetMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.GetMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.GetMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.GetMetadataImportRequest other) { - if (other == com.google.cloud.metastore.v1beta.GetMetadataImportRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metadata import to retrieve, in
-     * the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.GetMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.GetMetadataImportRequest) - private static final com.google.cloud.metastore.v1beta.GetMetadataImportRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.GetMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetMetadataImportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequestOrBuilder.java deleted file mode 100644 index 18b69d5c280b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface GetMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.GetMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metadata import to retrieve, in
-   * the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequest.java deleted file mode 100644 index 75063ca72909..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequest.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.GetService][google.cloud.metastore.v1beta.DataprocMetastore.GetService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.GetServiceRequest} - */ -public final class GetServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.GetServiceRequest) - GetServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetServiceRequest.newBuilder() to construct. - private GetServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetServiceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.GetServiceRequest.class, - com.google.cloud.metastore.v1beta.GetServiceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.GetServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.GetServiceRequest other = - (com.google.cloud.metastore.v1beta.GetServiceRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.GetServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.GetService][google.cloud.metastore.v1beta.DataprocMetastore.GetService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.GetServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.GetServiceRequest) - com.google.cloud.metastore.v1beta.GetServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.GetServiceRequest.class, - com.google.cloud.metastore.v1beta.GetServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.GetServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_GetServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.GetServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetServiceRequest build() { - com.google.cloud.metastore.v1beta.GetServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetServiceRequest buildPartial() { - com.google.cloud.metastore.v1beta.GetServiceRequest result = - new com.google.cloud.metastore.v1beta.GetServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.GetServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.GetServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.GetServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.GetServiceRequest other) { - if (other == com.google.cloud.metastore.v1beta.GetServiceRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object 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}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to retrieve,
-     * in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.GetServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.GetServiceRequest) - private static final com.google.cloud.metastore.v1beta.GetServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.GetServiceRequest(); - } - - public static com.google.cloud.metastore.v1beta.GetServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.GetServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequestOrBuilder.java deleted file mode 100644 index 95cfbf3986e5..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface GetServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.GetServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to retrieve,
-   * in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfig.java deleted file mode 100644 index dc22abaf44f8..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfig.java +++ /dev/null @@ -1,2122 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Specifies configuration information specific to running Hive metastore
- * software as the metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.HiveMetastoreConfig} - */ -public final class HiveMetastoreConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.HiveMetastoreConfig) - HiveMetastoreConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use HiveMetastoreConfig.newBuilder() to construct. - private HiveMetastoreConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HiveMetastoreConfig() { - version_ = ""; - endpointProtocol_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HiveMetastoreConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - case 5: - return internalGetAuxiliaryVersions(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.class, - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder.class); - } - - /** - * - * - *
-   * Protocols available for serving the metastore service endpoint.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol} - */ - public enum EndpointProtocol implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The protocol is not set.
-     * 
- * - * ENDPOINT_PROTOCOL_UNSPECIFIED = 0; - */ - ENDPOINT_PROTOCOL_UNSPECIFIED(0), - /** - * - * - *
-     * Use the legacy Apache Thrift protocol for the metastore service endpoint.
-     * 
- * - * THRIFT = 1; - */ - THRIFT(1), - /** - * - * - *
-     * Use the modernized gRPC protocol for the metastore service endpoint.
-     * 
- * - * GRPC = 2; - */ - GRPC(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The protocol is not set.
-     * 
- * - * ENDPOINT_PROTOCOL_UNSPECIFIED = 0; - */ - public static final int ENDPOINT_PROTOCOL_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Use the legacy Apache Thrift protocol for the metastore service endpoint.
-     * 
- * - * THRIFT = 1; - */ - public static final int THRIFT_VALUE = 1; - /** - * - * - *
-     * Use the modernized gRPC protocol for the metastore service endpoint.
-     * 
- * - * GRPC = 2; - */ - public static final int GRPC_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EndpointProtocol valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static EndpointProtocol forNumber(int value) { - switch (value) { - case 0: - return ENDPOINT_PROTOCOL_UNSPECIFIED; - case 1: - return THRIFT; - case 2: - return GRPC; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EndpointProtocol findValueByNumber(int number) { - return EndpointProtocol.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final EndpointProtocol[] VALUES = values(); - - public static EndpointProtocol valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private EndpointProtocol(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol) - } - - public static final int VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; - - private static final class ConfigOverridesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_ConfigOverridesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int KERBEROS_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.metastore.v1beta.KerberosConfig kerberosConfig_; - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - @java.lang.Override - public boolean hasKerberosConfig() { - return kerberosConfig_ != null; - } - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.KerberosConfig getKerberosConfig() { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - - public static final int ENDPOINT_PROTOCOL_FIELD_NUMBER = 4; - private int endpointProtocol_ = 0; - /** - * - * - *
-   * The protocol to use for the metastore service endpoint. If unspecified,
-   * defaults to `THRIFT`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The enum numeric value on the wire for endpointProtocol. - */ - @java.lang.Override - public int getEndpointProtocolValue() { - return endpointProtocol_; - } - /** - * - * - *
-   * The protocol to use for the metastore service endpoint. If unspecified,
-   * defaults to `THRIFT`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The endpointProtocol. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol - getEndpointProtocol() { - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol result = - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.forNumber( - endpointProtocol_); - return result == null - ? com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED - : result; - } - - public static final int AUXILIARY_VERSIONS_FIELD_NUMBER = 5; - - private static final class AuxiliaryVersionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig - .getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - auxiliaryVersions_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - internalGetAuxiliaryVersions() { - if (auxiliaryVersions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AuxiliaryVersionsDefaultEntryHolder.defaultEntry); - } - return auxiliaryVersions_; - } - - public int getAuxiliaryVersionsCount() { - return internalGetAuxiliaryVersions().getMap().size(); - } - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public boolean containsAuxiliaryVersions(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetAuxiliaryVersions().getMap().containsKey(key); - } - /** Use {@link #getAuxiliaryVersionsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getAuxiliaryVersions() { - return getAuxiliaryVersionsMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public java.util.Map - getAuxiliaryVersionsMap() { - return internalGetAuxiliaryVersions().getMap(); - } - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig - getAuxiliaryVersionsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetAuxiliaryVersions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetAuxiliaryVersions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetConfigOverrides(), ConfigOverridesDefaultEntryHolder.defaultEntry, 2); - if (kerberosConfig_ != null) { - output.writeMessage(3, getKerberosConfig()); - } - if (endpointProtocol_ - != com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol - .ENDPOINT_PROTOCOL_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, endpointProtocol_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetAuxiliaryVersions(), - AuxiliaryVersionsDefaultEntryHolder.defaultEntry, - 5); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - for (java.util.Map.Entry entry : - internalGetConfigOverrides().getMap().entrySet()) { - com.google.protobuf.MapEntry configOverrides__ = - ConfigOverridesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, configOverrides__); - } - if (kerberosConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKerberosConfig()); - } - if (endpointProtocol_ - != com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol - .ENDPOINT_PROTOCOL_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, endpointProtocol_); - } - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - entry : internalGetAuxiliaryVersions().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - auxiliaryVersions__ = - AuxiliaryVersionsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, auxiliaryVersions__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.HiveMetastoreConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.HiveMetastoreConfig other = - (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!internalGetConfigOverrides().equals(other.internalGetConfigOverrides())) return false; - if (hasKerberosConfig() != other.hasKerberosConfig()) return false; - if (hasKerberosConfig()) { - if (!getKerberosConfig().equals(other.getKerberosConfig())) return false; - } - if (endpointProtocol_ != other.endpointProtocol_) return false; - if (!internalGetAuxiliaryVersions().equals(other.internalGetAuxiliaryVersions())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetConfigOverrides().getMap().isEmpty()) { - hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; - hash = (53 * hash) + internalGetConfigOverrides().hashCode(); - } - if (hasKerberosConfig()) { - hash = (37 * hash) + KERBEROS_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getKerberosConfig().hashCode(); - } - hash = (37 * hash) + ENDPOINT_PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + endpointProtocol_; - if (!internalGetAuxiliaryVersions().getMap().isEmpty()) { - hash = (37 * hash) + AUXILIARY_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetAuxiliaryVersions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.HiveMetastoreConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.HiveMetastoreConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.HiveMetastoreConfig) - com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetConfigOverrides(); - case 5: - return internalGetAuxiliaryVersions(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableConfigOverrides(); - case 5: - return internalGetMutableAuxiliaryVersions(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.class, - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.HiveMetastoreConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - internalGetMutableConfigOverrides().clear(); - kerberosConfig_ = null; - if (kerberosConfigBuilder_ != null) { - kerberosConfigBuilder_.dispose(); - kerberosConfigBuilder_ = null; - } - endpointProtocol_ = 0; - internalGetMutableAuxiliaryVersions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig build() { - com.google.cloud.metastore.v1beta.HiveMetastoreConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig buildPartial() { - com.google.cloud.metastore.v1beta.HiveMetastoreConfig result = - new com.google.cloud.metastore.v1beta.HiveMetastoreConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.HiveMetastoreConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.configOverrides_ = internalGetConfigOverrides(); - result.configOverrides_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.kerberosConfig_ = - kerberosConfigBuilder_ == null ? kerberosConfig_ : kerberosConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.endpointProtocol_ = endpointProtocol_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.auxiliaryVersions_ = internalGetAuxiliaryVersions(); - result.auxiliaryVersions_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.HiveMetastoreConfig) { - return mergeFrom((com.google.cloud.metastore.v1beta.HiveMetastoreConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.HiveMetastoreConfig other) { - if (other == com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance()) - return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - internalGetMutableConfigOverrides().mergeFrom(other.internalGetConfigOverrides()); - bitField0_ |= 0x00000002; - if (other.hasKerberosConfig()) { - mergeKerberosConfig(other.getKerberosConfig()); - } - if (other.endpointProtocol_ != 0) { - setEndpointProtocolValue(other.getEndpointProtocolValue()); - } - internalGetMutableAuxiliaryVersions().mergeFrom(other.internalGetAuxiliaryVersions()); - bitField0_ |= 0x00000010; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.MapEntry configOverrides__ = - input.readMessage( - ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableConfigOverrides() - .getMutableMap() - .put(configOverrides__.getKey(), configOverrides__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getKerberosConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - endpointProtocol_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: - { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - auxiliaryVersions__ = - input.readMessage( - AuxiliaryVersionsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableAuxiliaryVersions() - .getMutableMap() - .put(auxiliaryVersions__.getKey(), auxiliaryVersions__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The Hive metastore schema version.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.MapField configOverrides_; - - private com.google.protobuf.MapField - internalGetConfigOverrides() { - if (configOverrides_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - return configOverrides_; - } - - private com.google.protobuf.MapField - internalGetMutableConfigOverrides() { - if (configOverrides_ == null) { - configOverrides_ = - com.google.protobuf.MapField.newMapField( - ConfigOverridesDefaultEntryHolder.defaultEntry); - } - if (!configOverrides_.isMutable()) { - configOverrides_ = configOverrides_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return configOverrides_; - } - - public int getConfigOverridesCount() { - return internalGetConfigOverrides().getMap().size(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public boolean containsConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetConfigOverrides().getMap().containsKey(key); - } - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfigOverrides() { - return getConfigOverridesMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.util.Map getConfigOverridesMap() { - return internalGetConfigOverrides().getMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public /* nullable */ java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - @java.lang.Override - public java.lang.String getConfigOverridesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetConfigOverrides().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearConfigOverrides() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableConfigOverrides().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder removeConfigOverrides(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableConfigOverrides().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableConfigOverrides() { - bitField0_ |= 0x00000002; - return internalGetMutableConfigOverrides().getMutableMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putConfigOverrides(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableConfigOverrides().getMutableMap().put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore configuration key-value pairs to apply to the
-     * Hive metastore (configured in `hive-site.xml`). The mappings
-     * override system defaults (some keys cannot be overridden). These
-     * overrides are also applied to auxiliary versions and can be further
-     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-     * 
- * - * map<string, string> config_overrides = 2; - */ - public Builder putAllConfigOverrides(java.util.Map values) { - internalGetMutableConfigOverrides().getMutableMap().putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private com.google.cloud.metastore.v1beta.KerberosConfig kerberosConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.KerberosConfig, - com.google.cloud.metastore.v1beta.KerberosConfig.Builder, - com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder> - kerberosConfigBuilder_; - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - public boolean hasKerberosConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - public com.google.cloud.metastore.v1beta.KerberosConfig getKerberosConfig() { - if (kerberosConfigBuilder_ == null) { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } else { - return kerberosConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - public Builder setKerberosConfig(com.google.cloud.metastore.v1beta.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kerberosConfig_ = value; - } else { - kerberosConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - public Builder setKerberosConfig( - com.google.cloud.metastore.v1beta.KerberosConfig.Builder builderForValue) { - if (kerberosConfigBuilder_ == null) { - kerberosConfig_ = builderForValue.build(); - } else { - kerberosConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - public Builder mergeKerberosConfig(com.google.cloud.metastore.v1beta.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && kerberosConfig_ != null - && kerberosConfig_ - != com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance()) { - getKerberosConfigBuilder().mergeFrom(value); - } else { - kerberosConfig_ = value; - } - } else { - kerberosConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - public Builder clearKerberosConfig() { - bitField0_ = (bitField0_ & ~0x00000004); - kerberosConfig_ = null; - if (kerberosConfigBuilder_ != null) { - kerberosConfigBuilder_.dispose(); - kerberosConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - public com.google.cloud.metastore.v1beta.KerberosConfig.Builder getKerberosConfigBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getKerberosConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - public com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - if (kerberosConfigBuilder_ != null) { - return kerberosConfigBuilder_.getMessageOrBuilder(); - } else { - return kerberosConfig_ == null - ? com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - } - /** - * - * - *
-     * Information used to configure the Hive metastore service as a service
-     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-     * method and specify this field's path
-     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-     * while omitting this field from the request's `service`.
-     * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.KerberosConfig, - com.google.cloud.metastore.v1beta.KerberosConfig.Builder, - com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder> - getKerberosConfigFieldBuilder() { - if (kerberosConfigBuilder_ == null) { - kerberosConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.KerberosConfig, - com.google.cloud.metastore.v1beta.KerberosConfig.Builder, - com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder>( - getKerberosConfig(), getParentForChildren(), isClean()); - kerberosConfig_ = null; - } - return kerberosConfigBuilder_; - } - - private int endpointProtocol_ = 0; - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The enum numeric value on the wire for endpointProtocol. - */ - @java.lang.Override - public int getEndpointProtocolValue() { - return endpointProtocol_; - } - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @param value The enum numeric value on the wire for endpointProtocol to set. - * @return This builder for chaining. - */ - public Builder setEndpointProtocolValue(int value) { - endpointProtocol_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The endpointProtocol. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol - getEndpointProtocol() { - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol result = - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.forNumber( - endpointProtocol_); - return result == null - ? com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @param value The endpointProtocol to set. - * @return This builder for chaining. - */ - public Builder setEndpointProtocol( - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - endpointProtocol_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The protocol to use for the metastore service endpoint. If unspecified,
-     * defaults to `THRIFT`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return This builder for chaining. - */ - public Builder clearEndpointProtocol() { - bitField0_ = (bitField0_ & ~0x00000008); - endpointProtocol_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - auxiliaryVersions_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - internalGetAuxiliaryVersions() { - if (auxiliaryVersions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AuxiliaryVersionsDefaultEntryHolder.defaultEntry); - } - return auxiliaryVersions_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> - internalGetMutableAuxiliaryVersions() { - if (auxiliaryVersions_ == null) { - auxiliaryVersions_ = - com.google.protobuf.MapField.newMapField( - AuxiliaryVersionsDefaultEntryHolder.defaultEntry); - } - if (!auxiliaryVersions_.isMutable()) { - auxiliaryVersions_ = auxiliaryVersions_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return auxiliaryVersions_; - } - - public int getAuxiliaryVersionsCount() { - return internalGetAuxiliaryVersions().getMap().size(); - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public boolean containsAuxiliaryVersions(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetAuxiliaryVersions().getMap().containsKey(key); - } - /** Use {@link #getAuxiliaryVersionsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getAuxiliaryVersions() { - return getAuxiliaryVersionsMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public java.util.Map - getAuxiliaryVersionsMap() { - return internalGetAuxiliaryVersions().getMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig - getAuxiliaryVersionsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetAuxiliaryVersions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetAuxiliaryVersions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAuxiliaryVersions() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableAuxiliaryVersions().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - public Builder removeAuxiliaryVersions(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableAuxiliaryVersions().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableAuxiliaryVersions() { - bitField0_ |= 0x00000010; - return internalGetMutableAuxiliaryVersions().getMutableMap(); - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - public Builder putAuxiliaryVersions( - java.lang.String key, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableAuxiliaryVersions().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; - } - /** - * - * - *
-     * A mapping of Hive metastore version to the auxiliary version
-     * configuration. When specified, a secondary Hive metastore service is
-     * created along with the primary service. All auxiliary versions must be less
-     * than the service's primary version. The key is the auxiliary service name
-     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-     * means that the first character must be a lowercase letter, and all the
-     * following characters must be hyphens, lowercase letters, or digits, except
-     * the last character, which cannot be a hyphen.
-     * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - public Builder putAllAuxiliaryVersions( - java.util.Map - values) { - internalGetMutableAuxiliaryVersions().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.HiveMetastoreConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.HiveMetastoreConfig) - private static final com.google.cloud.metastore.v1beta.HiveMetastoreConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.HiveMetastoreConfig(); - } - - public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HiveMetastoreConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfigOrBuilder.java deleted file mode 100644 index 3c27d98f4190..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfigOrBuilder.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface HiveMetastoreConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.HiveMetastoreConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * Immutable. The Hive metastore schema version.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - int getConfigOverridesCount(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - boolean containsConfigOverrides(java.lang.String key); - /** Use {@link #getConfigOverridesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getConfigOverrides(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.util.Map getConfigOverridesMap(); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - /* nullable */ - java.lang.String getConfigOverridesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * A mapping of Hive metastore configuration key-value pairs to apply to the
-   * Hive metastore (configured in `hive-site.xml`). The mappings
-   * override system defaults (some keys cannot be overridden). These
-   * overrides are also applied to auxiliary versions and can be further
-   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
-   * 
- * - * map<string, string> config_overrides = 2; - */ - java.lang.String getConfigOverridesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - * - * @return Whether the kerberosConfig field is set. - */ - boolean hasKerberosConfig(); - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - * - * @return The kerberosConfig. - */ - com.google.cloud.metastore.v1beta.KerberosConfig getKerberosConfig(); - /** - * - * - *
-   * Information used to configure the Hive metastore service as a service
-   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
-   * method and specify this field's path
-   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
-   * while omitting this field from the request's `service`.
-   * 
- * - * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; - */ - com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); - - /** - * - * - *
-   * The protocol to use for the metastore service endpoint. If unspecified,
-   * defaults to `THRIFT`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The enum numeric value on the wire for endpointProtocol. - */ - int getEndpointProtocolValue(); - /** - * - * - *
-   * The protocol to use for the metastore service endpoint. If unspecified,
-   * defaults to `THRIFT`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; - * - * - * @return The endpointProtocol. - */ - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol(); - - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - int getAuxiliaryVersionsCount(); - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - boolean containsAuxiliaryVersions(java.lang.String key); - /** Use {@link #getAuxiliaryVersionsMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getAuxiliaryVersions(); - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - java.util.Map - getAuxiliaryVersionsMap(); - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - /* nullable */ - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig defaultValue); - /** - * - * - *
-   * A mapping of Hive metastore version to the auxiliary version
-   * configuration. When specified, a secondary Hive metastore service is
-   * created along with the primary service. All auxiliary versions must be less
-   * than the service's primary version. The key is the auxiliary service name
-   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
-   * means that the first character must be a lowercase letter, and all the
-   * following characters must be hyphens, lowercase letters, or digits, except
-   * the last character, which cannot be a hyphen.
-   * 
- * - * - * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; - * - */ - com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( - java.lang.String key); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfig.java deleted file mode 100644 index 8cd4d7f381c4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfig.java +++ /dev/null @@ -1,1115 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Configuration information for a Kerberos principal.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.KerberosConfig} - */ -public final class KerberosConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.KerberosConfig) - KerberosConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use KerberosConfig.newBuilder() to construct. - private KerberosConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private KerberosConfig() { - principal_ = ""; - krb5ConfigGcsUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new KerberosConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.KerberosConfig.class, - com.google.cloud.metastore.v1beta.KerberosConfig.Builder.class); - } - - public static final int KEYTAB_FIELD_NUMBER = 1; - private com.google.cloud.metastore.v1beta.Secret keytab_; - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - @java.lang.Override - public boolean hasKeytab() { - return keytab_ != null; - } - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - * - * @return The keytab. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Secret getKeytab() { - return keytab_ == null - ? com.google.cloud.metastore.v1beta.Secret.getDefaultInstance() - : keytab_; - } - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.SecretOrBuilder getKeytabOrBuilder() { - return keytab_ == null - ? com.google.cloud.metastore.v1beta.Secret.getDefaultInstance() - : keytab_; - } - - public static final int PRINCIPAL_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object principal_ = ""; - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The principal. - */ - @java.lang.Override - public java.lang.String getPrincipal() { - java.lang.Object ref = principal_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principal_ = s; - return s; - } - } - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrincipalBytes() { - java.lang.Object ref = principal_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - principal_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KRB5_CONFIG_GCS_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object krb5ConfigGcsUri_ = ""; - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - @java.lang.Override - public java.lang.String getKrb5ConfigGcsUri() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - krb5ConfigGcsUri_ = s; - return s; - } - } - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - krb5ConfigGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (keytab_ != null) { - output.writeMessage(1, getKeytab()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, principal_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, krb5ConfigGcsUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (keytab_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKeytab()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, principal_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, krb5ConfigGcsUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.KerberosConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.KerberosConfig other = - (com.google.cloud.metastore.v1beta.KerberosConfig) obj; - - if (hasKeytab() != other.hasKeytab()) return false; - if (hasKeytab()) { - if (!getKeytab().equals(other.getKeytab())) return false; - } - if (!getPrincipal().equals(other.getPrincipal())) return false; - if (!getKrb5ConfigGcsUri().equals(other.getKrb5ConfigGcsUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKeytab()) { - hash = (37 * hash) + KEYTAB_FIELD_NUMBER; - hash = (53 * hash) + getKeytab().hashCode(); - } - hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; - hash = (53 * hash) + getPrincipal().hashCode(); - hash = (37 * hash) + KRB5_CONFIG_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getKrb5ConfigGcsUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.KerberosConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Configuration information for a Kerberos principal.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.KerberosConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.KerberosConfig) - com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.KerberosConfig.class, - com.google.cloud.metastore.v1beta.KerberosConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.KerberosConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - keytab_ = null; - if (keytabBuilder_ != null) { - keytabBuilder_.dispose(); - keytabBuilder_ = null; - } - principal_ = ""; - krb5ConfigGcsUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_KerberosConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.KerberosConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.KerberosConfig build() { - com.google.cloud.metastore.v1beta.KerberosConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.KerberosConfig buildPartial() { - com.google.cloud.metastore.v1beta.KerberosConfig result = - new com.google.cloud.metastore.v1beta.KerberosConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.KerberosConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.keytab_ = keytabBuilder_ == null ? keytab_ : keytabBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.principal_ = principal_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.krb5ConfigGcsUri_ = krb5ConfigGcsUri_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.KerberosConfig) { - return mergeFrom((com.google.cloud.metastore.v1beta.KerberosConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.KerberosConfig other) { - if (other == com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance()) - return this; - if (other.hasKeytab()) { - mergeKeytab(other.getKeytab()); - } - if (!other.getPrincipal().isEmpty()) { - principal_ = other.principal_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getKrb5ConfigGcsUri().isEmpty()) { - krb5ConfigGcsUri_ = other.krb5ConfigGcsUri_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getKeytabFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - principal_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - krb5ConfigGcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.metastore.v1beta.Secret keytab_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Secret, - com.google.cloud.metastore.v1beta.Secret.Builder, - com.google.cloud.metastore.v1beta.SecretOrBuilder> - keytabBuilder_; - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - public boolean hasKeytab() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - * - * @return The keytab. - */ - public com.google.cloud.metastore.v1beta.Secret getKeytab() { - if (keytabBuilder_ == null) { - return keytab_ == null - ? com.google.cloud.metastore.v1beta.Secret.getDefaultInstance() - : keytab_; - } else { - return keytabBuilder_.getMessage(); - } - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - public Builder setKeytab(com.google.cloud.metastore.v1beta.Secret value) { - if (keytabBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - keytab_ = value; - } else { - keytabBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - public Builder setKeytab(com.google.cloud.metastore.v1beta.Secret.Builder builderForValue) { - if (keytabBuilder_ == null) { - keytab_ = builderForValue.build(); - } else { - keytabBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - public Builder mergeKeytab(com.google.cloud.metastore.v1beta.Secret value) { - if (keytabBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && keytab_ != null - && keytab_ != com.google.cloud.metastore.v1beta.Secret.getDefaultInstance()) { - getKeytabBuilder().mergeFrom(value); - } else { - keytab_ = value; - } - } else { - keytabBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - public Builder clearKeytab() { - bitField0_ = (bitField0_ & ~0x00000001); - keytab_ = null; - if (keytabBuilder_ != null) { - keytabBuilder_.dispose(); - keytabBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - public com.google.cloud.metastore.v1beta.Secret.Builder getKeytabBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getKeytabFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - public com.google.cloud.metastore.v1beta.SecretOrBuilder getKeytabOrBuilder() { - if (keytabBuilder_ != null) { - return keytabBuilder_.getMessageOrBuilder(); - } else { - return keytab_ == null - ? com.google.cloud.metastore.v1beta.Secret.getDefaultInstance() - : keytab_; - } - } - /** - * - * - *
-     * A Kerberos keytab file that can be used to authenticate a service principal
-     * with a Kerberos Key Distribution Center (KDC).
-     * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Secret, - com.google.cloud.metastore.v1beta.Secret.Builder, - com.google.cloud.metastore.v1beta.SecretOrBuilder> - getKeytabFieldBuilder() { - if (keytabBuilder_ == null) { - keytabBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Secret, - com.google.cloud.metastore.v1beta.Secret.Builder, - com.google.cloud.metastore.v1beta.SecretOrBuilder>( - getKeytab(), getParentForChildren(), isClean()); - keytab_ = null; - } - return keytabBuilder_; - } - - private java.lang.Object principal_ = ""; - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return The principal. - */ - public java.lang.String getPrincipal() { - java.lang.Object ref = principal_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principal_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - public com.google.protobuf.ByteString getPrincipalBytes() { - java.lang.Object ref = principal_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - principal_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @param value The principal to set. - * @return This builder for chaining. - */ - public Builder setPrincipal(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - principal_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @return This builder for chaining. - */ - public Builder clearPrincipal() { - principal_ = getDefaultInstance().getPrincipal(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A Kerberos principal that exists in the both the keytab the KDC
-     * to authenticate as. A typical principal is of the form
-     * `primary/instance@REALM`, but there is no exact format.
-     * 
- * - * string principal = 2; - * - * @param value The bytes for principal to set. - * @return This builder for chaining. - */ - public Builder setPrincipalBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - principal_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object krb5ConfigGcsUri_ = ""; - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - public java.lang.String getKrb5ConfigGcsUri() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - krb5ConfigGcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - public com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes() { - java.lang.Object ref = krb5ConfigGcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - krb5ConfigGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @param value The krb5ConfigGcsUri to set. - * @return This builder for chaining. - */ - public Builder setKrb5ConfigGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - krb5ConfigGcsUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return This builder for chaining. - */ - public Builder clearKrb5ConfigGcsUri() { - krb5ConfigGcsUri_ = getDefaultInstance().getKrb5ConfigGcsUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * A Cloud Storage URI that specifies the path to a
-     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-     * although the file does not need to be named krb5.conf explicitly.
-     * 
- * - * string krb5_config_gcs_uri = 3; - * - * @param value The bytes for krb5ConfigGcsUri to set. - * @return This builder for chaining. - */ - public Builder setKrb5ConfigGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - krb5ConfigGcsUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.KerberosConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.KerberosConfig) - private static final com.google.cloud.metastore.v1beta.KerberosConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.KerberosConfig(); - } - - public static com.google.cloud.metastore.v1beta.KerberosConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KerberosConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.KerberosConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfigOrBuilder.java deleted file mode 100644 index 7c4bbf8cc0dc..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfigOrBuilder.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface KerberosConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.KerberosConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - * - * @return Whether the keytab field is set. - */ - boolean hasKeytab(); - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - * - * @return The keytab. - */ - com.google.cloud.metastore.v1beta.Secret getKeytab(); - /** - * - * - *
-   * A Kerberos keytab file that can be used to authenticate a service principal
-   * with a Kerberos Key Distribution Center (KDC).
-   * 
- * - * .google.cloud.metastore.v1beta.Secret keytab = 1; - */ - com.google.cloud.metastore.v1beta.SecretOrBuilder getKeytabOrBuilder(); - - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The principal. - */ - java.lang.String getPrincipal(); - /** - * - * - *
-   * A Kerberos principal that exists in the both the keytab the KDC
-   * to authenticate as. A typical principal is of the form
-   * `primary/instance@REALM`, but there is no exact format.
-   * 
- * - * string principal = 2; - * - * @return The bytes for principal. - */ - com.google.protobuf.ByteString getPrincipalBytes(); - - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The krb5ConfigGcsUri. - */ - java.lang.String getKrb5ConfigGcsUri(); - /** - * - * - *
-   * A Cloud Storage URI that specifies the path to a
-   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
-   * although the file does not need to be named krb5.conf explicitly.
-   * 
- * - * string krb5_config_gcs_uri = 3; - * - * @return The bytes for krb5ConfigGcsUri. - */ - com.google.protobuf.ByteString getKrb5ConfigGcsUriBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Lake.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Lake.java deleted file mode 100644 index 0d5ffa8eff14..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Lake.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Represents a Lake resource
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Lake} - */ -public final class Lake extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Lake) - LakeOrBuilder { - private static final long serialVersionUID = 0L; - // Use Lake.newBuilder() to construct. - private Lake(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Lake() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Lake(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Lake_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Lake_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Lake.class, - com.google.cloud.metastore.v1beta.Lake.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * The Lake resource name.
-   * Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-   * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * The Lake resource name.
-   * Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-   * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.Lake)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.Lake other = (com.google.cloud.metastore.v1beta.Lake) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Lake parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Lake parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Lake parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.Lake prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents a Lake resource
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Lake} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Lake) - com.google.cloud.metastore.v1beta.LakeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Lake_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Lake_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Lake.class, - com.google.cloud.metastore.v1beta.Lake.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.Lake.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Lake_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Lake getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.Lake.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Lake build() { - com.google.cloud.metastore.v1beta.Lake result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Lake buildPartial() { - com.google.cloud.metastore.v1beta.Lake result = - new com.google.cloud.metastore.v1beta.Lake(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.Lake result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.Lake) { - return mergeFrom((com.google.cloud.metastore.v1beta.Lake) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.Lake other) { - if (other == com.google.cloud.metastore.v1beta.Lake.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The Lake resource name.
-     * Example:
-     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-     * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Lake) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Lake) - private static final com.google.cloud.metastore.v1beta.Lake DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Lake(); - } - - public static com.google.cloud.metastore.v1beta.Lake getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Lake parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Lake getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LakeOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LakeOrBuilder.java deleted file mode 100644 index 9099537460b7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LakeOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface LakeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Lake) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Lake resource name.
-   * Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-   * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The Lake resource name.
-   * Example:
-   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
-   * 
- * - * string name = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequest.java deleted file mode 100644 index c43bdf9f454f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequest.java +++ /dev/null @@ -1,1362 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListBackupsRequest} - */ -public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListBackupsRequest) - ListBackupsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListBackupsRequest.newBuilder() to construct. - private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListBackupsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListBackupsRequest.class, - com.google.cloud.metastore.v1beta.ListBackupsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of backups to return. The response may contain
-   * less than the maximum number. If unspecified, no more than 500 backups are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ListBackupsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ListBackupsRequest other = - (com.google.cloud.metastore.v1beta.ListBackupsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListBackupsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListBackupsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListBackupsRequest) - com.google.cloud.metastore.v1beta.ListBackupsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListBackupsRequest.class, - com.google.cloud.metastore.v1beta.ListBackupsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ListBackupsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListBackupsRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ListBackupsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListBackupsRequest build() { - com.google.cloud.metastore.v1beta.ListBackupsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListBackupsRequest buildPartial() { - com.google.cloud.metastore.v1beta.ListBackupsRequest result = - new com.google.cloud.metastore.v1beta.ListBackupsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.ListBackupsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ListBackupsRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.ListBackupsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListBackupsRequest other) { - if (other == com.google.cloud.metastore.v1beta.ListBackupsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose backups to
-     * list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of backups to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 backups are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListBackupsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListBackupsRequest) - private static final com.google.cloud.metastore.v1beta.ListBackupsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListBackupsRequest(); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListBackupsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequestOrBuilder.java deleted file mode 100644 index dca63b400929..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequestOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface ListBackupsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListBackupsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service whose backups to
-   * list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of backups to return. The response may contain
-   * less than the maximum number. If unspecified, no more than 500 backups are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponse.java deleted file mode 100644 index e719378164bf..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponse.java +++ /dev/null @@ -1,1404 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListBackupsResponse} - */ -public final class ListBackupsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListBackupsResponse) - ListBackupsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListBackupsResponse.newBuilder() to construct. - private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListBackupsResponse() { - backups_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListBackupsResponse.class, - com.google.cloud.metastore.v1beta.ListBackupsResponse.Builder.class); - } - - public static final int BACKUPS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List backups_; - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - @java.lang.Override - public java.util.List getBackupsList() { - return backups_; - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - @java.lang.Override - public java.util.List - getBackupsOrBuilderList() { - return backups_; - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - @java.lang.Override - public int getBackupsCount() { - return backups_.size(); - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Backup getBackups(int index) { - return backups_.get(index); - } - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupsOrBuilder(int index) { - return backups_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < backups_.size(); i++) { - output.writeMessage(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < backups_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backups_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ListBackupsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ListBackupsResponse other = - (com.google.cloud.metastore.v1beta.ListBackupsResponse) obj; - - if (!getBackupsList().equals(other.getBackupsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getBackupsCount() > 0) { - hash = (37 * hash) + BACKUPS_FIELD_NUMBER; - hash = (53 * hash) + getBackupsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.ListBackupsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListBackupsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListBackupsResponse) - com.google.cloud.metastore.v1beta.ListBackupsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListBackupsResponse.class, - com.google.cloud.metastore.v1beta.ListBackupsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ListBackupsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - } else { - backups_ = null; - backupsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListBackupsResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ListBackupsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListBackupsResponse build() { - com.google.cloud.metastore.v1beta.ListBackupsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListBackupsResponse buildPartial() { - com.google.cloud.metastore.v1beta.ListBackupsResponse result = - new com.google.cloud.metastore.v1beta.ListBackupsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1beta.ListBackupsResponse result) { - if (backupsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - backups_ = java.util.Collections.unmodifiableList(backups_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.backups_ = backups_; - } else { - result.backups_ = backupsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.ListBackupsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ListBackupsResponse) { - return mergeFrom((com.google.cloud.metastore.v1beta.ListBackupsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListBackupsResponse other) { - if (other == com.google.cloud.metastore.v1beta.ListBackupsResponse.getDefaultInstance()) - return this; - if (backupsBuilder_ == null) { - if (!other.backups_.isEmpty()) { - if (backups_.isEmpty()) { - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBackupsIsMutable(); - backups_.addAll(other.backups_); - } - onChanged(); - } - } else { - if (!other.backups_.isEmpty()) { - if (backupsBuilder_.isEmpty()) { - backupsBuilder_.dispose(); - backupsBuilder_ = null; - backups_ = other.backups_; - bitField0_ = (bitField0_ & ~0x00000001); - backupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBackupsFieldBuilder() - : null; - } else { - backupsBuilder_.addAllMessages(other.backups_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1beta.Backup m = - input.readMessage( - com.google.cloud.metastore.v1beta.Backup.parser(), extensionRegistry); - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(m); - } else { - backupsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List backups_ = - java.util.Collections.emptyList(); - - private void ensureBackupsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - backups_ = new java.util.ArrayList(backups_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Backup, - com.google.cloud.metastore.v1beta.Backup.Builder, - com.google.cloud.metastore.v1beta.BackupOrBuilder> - backupsBuilder_; - - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public java.util.List getBackupsList() { - if (backupsBuilder_ == null) { - return java.util.Collections.unmodifiableList(backups_); - } else { - return backupsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public int getBackupsCount() { - if (backupsBuilder_ == null) { - return backups_.size(); - } else { - return backupsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public com.google.cloud.metastore.v1beta.Backup getBackups(int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); - } else { - return backupsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder setBackups(int index, com.google.cloud.metastore.v1beta.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.set(index, value); - onChanged(); - } else { - backupsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder setBackups( - int index, com.google.cloud.metastore.v1beta.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.set(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder addBackups(com.google.cloud.metastore.v1beta.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(value); - onChanged(); - } else { - backupsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder addBackups(int index, com.google.cloud.metastore.v1beta.Backup value) { - if (backupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBackupsIsMutable(); - backups_.add(index, value); - onChanged(); - } else { - backupsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder addBackups(com.google.cloud.metastore.v1beta.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder addBackups( - int index, com.google.cloud.metastore.v1beta.Backup.Builder builderForValue) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.add(index, builderForValue.build()); - onChanged(); - } else { - backupsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder addAllBackups( - java.lang.Iterable values) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backups_); - onChanged(); - } else { - backupsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder clearBackups() { - if (backupsBuilder_ == null) { - backups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - backupsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public Builder removeBackups(int index) { - if (backupsBuilder_ == null) { - ensureBackupsIsMutable(); - backups_.remove(index); - onChanged(); - } else { - backupsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public com.google.cloud.metastore.v1beta.Backup.Builder getBackupsBuilder(int index) { - return getBackupsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupsOrBuilder(int index) { - if (backupsBuilder_ == null) { - return backups_.get(index); - } else { - return backupsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public java.util.List - getBackupsOrBuilderList() { - if (backupsBuilder_ != null) { - return backupsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(backups_); - } - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public com.google.cloud.metastore.v1beta.Backup.Builder addBackupsBuilder() { - return getBackupsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1beta.Backup.getDefaultInstance()); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public com.google.cloud.metastore.v1beta.Backup.Builder addBackupsBuilder(int index) { - return getBackupsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1beta.Backup.getDefaultInstance()); - } - /** - * - * - *
-     * The backups of the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - public java.util.List - getBackupsBuilderList() { - return getBackupsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Backup, - com.google.cloud.metastore.v1beta.Backup.Builder, - com.google.cloud.metastore.v1beta.BackupOrBuilder> - getBackupsFieldBuilder() { - if (backupsBuilder_ == null) { - backupsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Backup, - com.google.cloud.metastore.v1beta.Backup.Builder, - com.google.cloud.metastore.v1beta.BackupOrBuilder>( - backups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - backups_ = null; - } - return backupsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListBackupsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListBackupsResponse) - private static final com.google.cloud.metastore.v1beta.ListBackupsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListBackupsResponse(); - } - - public static com.google.cloud.metastore.v1beta.ListBackupsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBackupsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListBackupsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponseOrBuilder.java deleted file mode 100644 index cb0495767d9b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface ListBackupsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListBackupsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - java.util.List getBackupsList(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - com.google.cloud.metastore.v1beta.Backup getBackups(int index); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - int getBackupsCount(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - java.util.List - getBackupsOrBuilderList(); - /** - * - * - *
-   * The backups of the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Backup backups = 1; - */ - com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequest.java deleted file mode 100644 index 8c495a84dfec..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequest.java +++ /dev/null @@ -1,1358 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for ListFederations.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListFederationsRequest} - */ -public final class ListFederationsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListFederationsRequest) - ListFederationsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListFederationsRequest.newBuilder() to construct. - private ListFederationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListFederationsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListFederationsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListFederationsRequest.class, - com.google.cloud.metastore.v1beta.ListFederationsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location of metastore
-   * federations to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location of metastore
-   * federations to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of federations to return. The response may
-   * contain less than the maximum number. If unspecified, no more than 500
-   * services are returned. The maximum value is 1000; values above 1000 are
-   * changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ListFederationsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ListFederationsRequest other = - (com.google.cloud.metastore.v1beta.ListFederationsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.ListFederationsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for ListFederations.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListFederationsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListFederationsRequest) - com.google.cloud.metastore.v1beta.ListFederationsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListFederationsRequest.class, - com.google.cloud.metastore.v1beta.ListFederationsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ListFederationsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListFederationsRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ListFederationsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListFederationsRequest build() { - com.google.cloud.metastore.v1beta.ListFederationsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListFederationsRequest buildPartial() { - com.google.cloud.metastore.v1beta.ListFederationsRequest result = - new com.google.cloud.metastore.v1beta.ListFederationsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.ListFederationsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ListFederationsRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.ListFederationsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListFederationsRequest other) { - if (other == com.google.cloud.metastore.v1beta.ListFederationsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore
-     * federations to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of federations to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous ListFederationServices
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * ListFederationServices must match the call that provided the
-     * page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListFederationsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListFederationsRequest) - private static final com.google.cloud.metastore.v1beta.ListFederationsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListFederationsRequest(); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFederationsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListFederationsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequestOrBuilder.java deleted file mode 100644 index 3047b0e9b382..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequestOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public interface ListFederationsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListFederationsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location of metastore
-   * federations to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location of metastore
-   * federations to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of federations to return. The response may
-   * contain less than the maximum number. If unspecified, no more than 500
-   * services are returned. The maximum value is 1000; values above 1000 are
-   * changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous ListFederationServices
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * ListFederationServices must match the call that provided the
-   * page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponse.java deleted file mode 100644 index f06c053d70f2..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponse.java +++ /dev/null @@ -1,1405 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Response message for ListFederations
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListFederationsResponse} - */ -public final class ListFederationsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListFederationsResponse) - ListFederationsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListFederationsResponse.newBuilder() to construct. - private ListFederationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListFederationsResponse() { - federations_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListFederationsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListFederationsResponse.class, - com.google.cloud.metastore.v1beta.ListFederationsResponse.Builder.class); - } - - public static final int FEDERATIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List federations_; - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - @java.lang.Override - public java.util.List getFederationsList() { - return federations_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - @java.lang.Override - public java.util.List - getFederationsOrBuilderList() { - return federations_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - @java.lang.Override - public int getFederationsCount() { - return federations_.size(); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation getFederations(int index) { - return federations_.get(index); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationsOrBuilder(int index) { - return federations_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < federations_.size(); i++) { - output.writeMessage(1, federations_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < federations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, federations_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ListFederationsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ListFederationsResponse other = - (com.google.cloud.metastore.v1beta.ListFederationsResponse) obj; - - if (!getFederationsList().equals(other.getFederationsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFederationsCount() > 0) { - hash = (37 * hash) + FEDERATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFederationsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.ListFederationsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for ListFederations
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListFederationsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListFederationsResponse) - com.google.cloud.metastore.v1beta.ListFederationsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListFederationsResponse.class, - com.google.cloud.metastore.v1beta.ListFederationsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ListFederationsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (federationsBuilder_ == null) { - federations_ = java.util.Collections.emptyList(); - } else { - federations_ = null; - federationsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListFederationsResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ListFederationsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListFederationsResponse build() { - com.google.cloud.metastore.v1beta.ListFederationsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListFederationsResponse buildPartial() { - com.google.cloud.metastore.v1beta.ListFederationsResponse result = - new com.google.cloud.metastore.v1beta.ListFederationsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1beta.ListFederationsResponse result) { - if (federationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - federations_ = java.util.Collections.unmodifiableList(federations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.federations_ = federations_; - } else { - result.federations_ = federationsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.ListFederationsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ListFederationsResponse) { - return mergeFrom((com.google.cloud.metastore.v1beta.ListFederationsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListFederationsResponse other) { - if (other == com.google.cloud.metastore.v1beta.ListFederationsResponse.getDefaultInstance()) - return this; - if (federationsBuilder_ == null) { - if (!other.federations_.isEmpty()) { - if (federations_.isEmpty()) { - federations_ = other.federations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFederationsIsMutable(); - federations_.addAll(other.federations_); - } - onChanged(); - } - } else { - if (!other.federations_.isEmpty()) { - if (federationsBuilder_.isEmpty()) { - federationsBuilder_.dispose(); - federationsBuilder_ = null; - federations_ = other.federations_; - bitField0_ = (bitField0_ & ~0x00000001); - federationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFederationsFieldBuilder() - : null; - } else { - federationsBuilder_.addAllMessages(other.federations_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1beta.Federation m = - input.readMessage( - com.google.cloud.metastore.v1beta.Federation.parser(), extensionRegistry); - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(m); - } else { - federationsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List federations_ = - java.util.Collections.emptyList(); - - private void ensureFederationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - federations_ = - new java.util.ArrayList(federations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder> - federationsBuilder_; - - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public java.util.List getFederationsList() { - if (federationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(federations_); - } else { - return federationsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public int getFederationsCount() { - if (federationsBuilder_ == null) { - return federations_.size(); - } else { - return federationsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public com.google.cloud.metastore.v1beta.Federation getFederations(int index) { - if (federationsBuilder_ == null) { - return federations_.get(index); - } else { - return federationsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder setFederations(int index, com.google.cloud.metastore.v1beta.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.set(index, value); - onChanged(); - } else { - federationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder setFederations( - int index, com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.set(index, builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder addFederations(com.google.cloud.metastore.v1beta.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.add(value); - onChanged(); - } else { - federationsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder addFederations(int index, com.google.cloud.metastore.v1beta.Federation value) { - if (federationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFederationsIsMutable(); - federations_.add(index, value); - onChanged(); - } else { - federationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder addFederations( - com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder addFederations( - int index, com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.add(index, builderForValue.build()); - onChanged(); - } else { - federationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder addAllFederations( - java.lang.Iterable values) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, federations_); - onChanged(); - } else { - federationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder clearFederations() { - if (federationsBuilder_ == null) { - federations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - federationsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public Builder removeFederations(int index) { - if (federationsBuilder_ == null) { - ensureFederationsIsMutable(); - federations_.remove(index); - onChanged(); - } else { - federationsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public com.google.cloud.metastore.v1beta.Federation.Builder getFederationsBuilder(int index) { - return getFederationsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationsOrBuilder( - int index) { - if (federationsBuilder_ == null) { - return federations_.get(index); - } else { - return federationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public java.util.List - getFederationsOrBuilderList() { - if (federationsBuilder_ != null) { - return federationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(federations_); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public com.google.cloud.metastore.v1beta.Federation.Builder addFederationsBuilder() { - return getFederationsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public com.google.cloud.metastore.v1beta.Federation.Builder addFederationsBuilder(int index) { - return getFederationsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - public java.util.List - getFederationsBuilderList() { - return getFederationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder> - getFederationsFieldBuilder() { - if (federationsBuilder_ == null) { - federationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder>( - federations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - federations_ = null; - } - return federationsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListFederationsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListFederationsResponse) - private static final com.google.cloud.metastore.v1beta.ListFederationsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListFederationsResponse(); - } - - public static com.google.cloud.metastore.v1beta.ListFederationsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFederationsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListFederationsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponseOrBuilder.java deleted file mode 100644 index 37feec0868b1..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public interface ListFederationsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListFederationsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - java.util.List getFederationsList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - com.google.cloud.metastore.v1beta.Federation getFederations(int index); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - int getFederationsCount(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - java.util.List - getFederationsOrBuilderList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Federation federations = 1; - */ - com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequest.java deleted file mode 100644 index a32c6720c1ab..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequest.java +++ /dev/null @@ -1,1367 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListMetadataImportsRequest} - */ -public final class ListMetadataImportsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListMetadataImportsRequest) - ListMetadataImportsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListMetadataImportsRequest.newBuilder() to construct. - private ListMetadataImportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListMetadataImportsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListMetadataImportsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.class, - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of imports to return. The response may contain
-   * less than the maximum number. If unspecified, no more than 500 imports are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ListMetadataImportsRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest other = - (com.google.cloud.metastore.v1beta.ListMetadataImportsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListMetadataImportsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListMetadataImportsRequest) - com.google.cloud.metastore.v1beta.ListMetadataImportsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.class, - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListMetadataImportsRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListMetadataImportsRequest build() { - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListMetadataImportsRequest buildPartial() { - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest result = - new com.google.cloud.metastore.v1beta.ListMetadataImportsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.ListMetadataImportsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ListMetadataImportsRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.ListMetadataImportsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListMetadataImportsRequest other) { - if (other - == com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the service whose metadata imports
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of imports to return. The response may contain
-     * less than the maximum number. If unspecified, no more than 500 imports are
-     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListMetadataImportsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListMetadataImportsRequest) - private static final com.google.cloud.metastore.v1beta.ListMetadataImportsRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListMetadataImportsRequest(); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListMetadataImportsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListMetadataImportsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequestOrBuilder.java deleted file mode 100644 index 3d9bdb197739..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequestOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface ListMetadataImportsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListMetadataImportsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the service whose metadata imports
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of imports to return. The response may contain
-   * less than the maximum number. If unspecified, no more than 500 imports are
-   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponse.java deleted file mode 100644 index d5739a59735f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponse.java +++ /dev/null @@ -1,1422 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListMetadataImportsResponse} - */ -public final class ListMetadataImportsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListMetadataImportsResponse) - ListMetadataImportsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListMetadataImportsResponse.newBuilder() to construct. - private ListMetadataImportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListMetadataImportsResponse() { - metadataImports_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListMetadataImportsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.class, - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.Builder.class); - } - - public static final int METADATA_IMPORTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List metadataImports_; - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public java.util.List getMetadataImportsList() { - return metadataImports_; - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public java.util.List - getMetadataImportsOrBuilderList() { - return metadataImports_; - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public int getMetadataImportsCount() { - return metadataImports_.size(); - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImports(int index) { - return metadataImports_.get(index); - } - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportsOrBuilder( - int index) { - return metadataImports_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < metadataImports_.size(); i++) { - output.writeMessage(1, metadataImports_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < metadataImports_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metadataImports_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ListMetadataImportsResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse other = - (com.google.cloud.metastore.v1beta.ListMetadataImportsResponse) obj; - - if (!getMetadataImportsList().equals(other.getMetadataImportsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getMetadataImportsCount() > 0) { - hash = (37 * hash) + METADATA_IMPORTS_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImportsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListMetadataImportsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListMetadataImportsResponse) - com.google.cloud.metastore.v1beta.ListMetadataImportsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.class, - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (metadataImportsBuilder_ == null) { - metadataImports_ = java.util.Collections.emptyList(); - } else { - metadataImports_ = null; - metadataImportsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse build() { - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse buildPartial() { - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse result = - new com.google.cloud.metastore.v1beta.ListMetadataImportsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse result) { - if (metadataImportsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - metadataImports_ = java.util.Collections.unmodifiableList(metadataImports_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.metadataImports_ = metadataImports_; - } else { - result.metadataImports_ = metadataImportsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.ListMetadataImportsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ListMetadataImportsResponse) { - return mergeFrom((com.google.cloud.metastore.v1beta.ListMetadataImportsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListMetadataImportsResponse other) { - if (other - == com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.getDefaultInstance()) - return this; - if (metadataImportsBuilder_ == null) { - if (!other.metadataImports_.isEmpty()) { - if (metadataImports_.isEmpty()) { - metadataImports_ = other.metadataImports_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMetadataImportsIsMutable(); - metadataImports_.addAll(other.metadataImports_); - } - onChanged(); - } - } else { - if (!other.metadataImports_.isEmpty()) { - if (metadataImportsBuilder_.isEmpty()) { - metadataImportsBuilder_.dispose(); - metadataImportsBuilder_ = null; - metadataImports_ = other.metadataImports_; - bitField0_ = (bitField0_ & ~0x00000001); - metadataImportsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMetadataImportsFieldBuilder() - : null; - } else { - metadataImportsBuilder_.addAllMessages(other.metadataImports_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1beta.MetadataImport m = - input.readMessage( - com.google.cloud.metastore.v1beta.MetadataImport.parser(), - extensionRegistry); - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(m); - } else { - metadataImportsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List metadataImports_ = - java.util.Collections.emptyList(); - - private void ensureMetadataImportsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - metadataImports_ = - new java.util.ArrayList( - metadataImports_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> - metadataImportsBuilder_; - - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public java.util.List - getMetadataImportsList() { - if (metadataImportsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metadataImports_); - } else { - return metadataImportsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public int getMetadataImportsCount() { - if (metadataImportsBuilder_ == null) { - return metadataImports_.size(); - } else { - return metadataImportsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImports(int index) { - if (metadataImportsBuilder_ == null) { - return metadataImports_.get(index); - } else { - return metadataImportsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder setMetadataImports( - int index, com.google.cloud.metastore.v1beta.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.set(index, value); - onChanged(); - } else { - metadataImportsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder setMetadataImports( - int index, com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.set(index, builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports(com.google.cloud.metastore.v1beta.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.add(value); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - int index, com.google.cloud.metastore.v1beta.MetadataImport value) { - if (metadataImportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataImportsIsMutable(); - metadataImports_.add(index, value); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder addMetadataImports( - int index, com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.add(index, builderForValue.build()); - onChanged(); - } else { - metadataImportsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder addAllMetadataImports( - java.lang.Iterable values) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metadataImports_); - onChanged(); - } else { - metadataImportsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder clearMetadataImports() { - if (metadataImportsBuilder_ == null) { - metadataImports_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - metadataImportsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public Builder removeMetadataImports(int index) { - if (metadataImportsBuilder_ == null) { - ensureMetadataImportsIsMutable(); - metadataImports_.remove(index); - onChanged(); - } else { - metadataImportsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1beta.MetadataImport.Builder getMetadataImportsBuilder( - int index) { - return getMetadataImportsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportsOrBuilder( - int index) { - if (metadataImportsBuilder_ == null) { - return metadataImports_.get(index); - } else { - return metadataImportsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public java.util.List - getMetadataImportsOrBuilderList() { - if (metadataImportsBuilder_ != null) { - return metadataImportsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metadataImports_); - } - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1beta.MetadataImport.Builder addMetadataImportsBuilder() { - return getMetadataImportsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public com.google.cloud.metastore.v1beta.MetadataImport.Builder addMetadataImportsBuilder( - int index) { - return getMetadataImportsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()); - } - /** - * - * - *
-     * The imports in the specified service.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - public java.util.List - getMetadataImportsBuilderList() { - return getMetadataImportsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> - getMetadataImportsFieldBuilder() { - if (metadataImportsBuilder_ == null) { - metadataImportsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder>( - metadataImports_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - metadataImports_ = null; - } - return metadataImportsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListMetadataImportsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListMetadataImportsResponse) - private static final com.google.cloud.metastore.v1beta.ListMetadataImportsResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListMetadataImportsResponse(); - } - - public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListMetadataImportsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponseOrBuilder.java deleted file mode 100644 index b02999fffaaa..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface ListMetadataImportsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListMetadataImportsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - java.util.List getMetadataImportsList(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - com.google.cloud.metastore.v1beta.MetadataImport getMetadataImports(int index); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - int getMetadataImportsCount(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - java.util.List - getMetadataImportsOrBuilderList(); - /** - * - * - *
-   * The imports in the specified service.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; - */ - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportsOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequest.java deleted file mode 100644 index 26d14f5ae1c1..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequest.java +++ /dev/null @@ -1,1367 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListServicesRequest} - */ -public final class ListServicesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListServicesRequest) - ListServicesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListServicesRequest.newBuilder() to construct. - private ListServicesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListServicesRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListServicesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListServicesRequest.class, - com.google.cloud.metastore.v1beta.ListServicesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of services to return. The response may
-   * contain less than the maximum number. If unspecified, no more than 500
-   * services are returned. The maximum value is 1000; values above 1000 are
-   * changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ListServicesRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ListServicesRequest other = - (com.google.cloud.metastore.v1beta.ListServicesRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.ListServicesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListServicesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListServicesRequest) - com.google.cloud.metastore.v1beta.ListServicesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListServicesRequest.class, - com.google.cloud.metastore.v1beta.ListServicesRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ListServicesRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListServicesRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ListServicesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListServicesRequest build() { - com.google.cloud.metastore.v1beta.ListServicesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListServicesRequest buildPartial() { - com.google.cloud.metastore.v1beta.ListServicesRequest result = - new com.google.cloud.metastore.v1beta.ListServicesRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.ListServicesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.orderBy_ = orderBy_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ListServicesRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.ListServicesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListServicesRequest other) { - if (other == com.google.cloud.metastore.v1beta.ListServicesRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the location of metastore services
-     * to list, in the following form:
-     * `projects/{project_number}/locations/{location_id}`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of services to return. The response may
-     * contain less than the maximum number. If unspecified, no more than 500
-     * services are returned. The maximum value is 1000; values above 1000 are
-     * changed to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * call. Provide this token to retrieve the subsequent page.
-     * To retrieve the first page, supply an empty page token.
-     * When paginating, other parameters provided to
-     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The filter to apply to list results.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specify the ordering of results as described in [Sorting
-     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-     * If not specified, the results will be sorted in the default order.
-     * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListServicesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListServicesRequest) - private static final com.google.cloud.metastore.v1beta.ListServicesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListServicesRequest(); - } - - public static com.google.cloud.metastore.v1beta.ListServicesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListServicesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListServicesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequestOrBuilder.java deleted file mode 100644 index 23c66fd77b3d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface ListServicesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListServicesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The relative resource name of the location of metastore services
-   * to list, in the following form:
-   * `projects/{project_number}/locations/{location_id}`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of services to return. The response may
-   * contain less than the maximum number. If unspecified, no more than 500
-   * services are returned. The maximum value is 1000; values above 1000 are
-   * changed to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * call. Provide this token to retrieve the subsequent page.
-   * To retrieve the first page, supply an empty page token.
-   * When paginating, other parameters provided to
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. The filter to apply to list results.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Optional. Specify the ordering of results as described in [Sorting
-   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
-   * If not specified, the results will be sorted in the default order.
-   * 
- * - * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponse.java deleted file mode 100644 index 9c4a684bcda2..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponse.java +++ /dev/null @@ -1,1404 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListServicesResponse} - */ -public final class ListServicesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListServicesResponse) - ListServicesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListServicesResponse.newBuilder() to construct. - private ListServicesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListServicesResponse() { - services_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListServicesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListServicesResponse.class, - com.google.cloud.metastore.v1beta.ListServicesResponse.Builder.class); - } - - public static final int SERVICES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List services_; - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - @java.lang.Override - public java.util.List getServicesList() { - return services_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - @java.lang.Override - public java.util.List - getServicesOrBuilderList() { - return services_; - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - @java.lang.Override - public int getServicesCount() { - return services_.size(); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service getServices(int index) { - return services_.get(index); - } - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServicesOrBuilder(int index) { - return services_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < services_.size(); i++) { - output.writeMessage(1, services_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < services_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.ListServicesResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.ListServicesResponse other = - (com.google.cloud.metastore.v1beta.ListServicesResponse) obj; - - if (!getServicesList().equals(other.getServicesList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getServicesCount() > 0) { - hash = (37 * hash) + SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getServicesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.ListServicesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.ListServicesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListServicesResponse) - com.google.cloud.metastore.v1beta.ListServicesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.ListServicesResponse.class, - com.google.cloud.metastore.v1beta.ListServicesResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.ListServicesResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - } else { - services_ = null; - servicesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_ListServicesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListServicesResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.ListServicesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListServicesResponse build() { - com.google.cloud.metastore.v1beta.ListServicesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListServicesResponse buildPartial() { - com.google.cloud.metastore.v1beta.ListServicesResponse result = - new com.google.cloud.metastore.v1beta.ListServicesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1beta.ListServicesResponse result) { - if (servicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - services_ = java.util.Collections.unmodifiableList(services_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.services_ = services_; - } else { - result.services_ = servicesBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.unreachable_ = unreachable_; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.ListServicesResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.ListServicesResponse) { - return mergeFrom((com.google.cloud.metastore.v1beta.ListServicesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListServicesResponse other) { - if (other == com.google.cloud.metastore.v1beta.ListServicesResponse.getDefaultInstance()) - return this; - if (servicesBuilder_ == null) { - if (!other.services_.isEmpty()) { - if (services_.isEmpty()) { - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServicesIsMutable(); - services_.addAll(other.services_); - } - onChanged(); - } - } else { - if (!other.services_.isEmpty()) { - if (servicesBuilder_.isEmpty()) { - servicesBuilder_.dispose(); - servicesBuilder_ = null; - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - servicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getServicesFieldBuilder() - : null; - } else { - servicesBuilder_.addAllMessages(other.services_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1beta.Service m = - input.readMessage( - com.google.cloud.metastore.v1beta.Service.parser(), extensionRegistry); - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(m); - } else { - servicesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List services_ = - java.util.Collections.emptyList(); - - private void ensureServicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - services_ = new java.util.ArrayList(services_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder> - servicesBuilder_; - - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public java.util.List getServicesList() { - if (servicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(services_); - } else { - return servicesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public int getServicesCount() { - if (servicesBuilder_ == null) { - return services_.size(); - } else { - return servicesBuilder_.getCount(); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public com.google.cloud.metastore.v1beta.Service getServices(int index) { - if (servicesBuilder_ == null) { - return services_.get(index); - } else { - return servicesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder setServices(int index, com.google.cloud.metastore.v1beta.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.set(index, value); - onChanged(); - } else { - servicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder setServices( - int index, com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.set(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder addServices(com.google.cloud.metastore.v1beta.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(value); - onChanged(); - } else { - servicesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder addServices(int index, com.google.cloud.metastore.v1beta.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(index, value); - onChanged(); - } else { - servicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder addServices(com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder addServices( - int index, com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder addAllServices( - java.lang.Iterable values) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, services_); - onChanged(); - } else { - servicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder clearServices() { - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - servicesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public Builder removeServices(int index) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.remove(index); - onChanged(); - } else { - servicesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public com.google.cloud.metastore.v1beta.Service.Builder getServicesBuilder(int index) { - return getServicesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServicesOrBuilder(int index) { - if (servicesBuilder_ == null) { - return services_.get(index); - } else { - return servicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public java.util.List - getServicesOrBuilderList() { - if (servicesBuilder_ != null) { - return servicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(services_); - } - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public com.google.cloud.metastore.v1beta.Service.Builder addServicesBuilder() { - return getServicesFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1beta.Service.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public com.google.cloud.metastore.v1beta.Service.Builder addServicesBuilder(int index) { - return getServicesFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1beta.Service.getDefaultInstance()); - } - /** - * - * - *
-     * The services in the specified location.
-     * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - public java.util.List - getServicesBuilderList() { - return getServicesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder> - getServicesFieldBuilder() { - if (servicesBuilder_ == null) { - servicesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder>( - services_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - services_ = null; - } - return servicesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token that can be sent as `page_token` to retrieve the next page. If this
-     * field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Locations that could not be reached.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListServicesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListServicesResponse) - private static final com.google.cloud.metastore.v1beta.ListServicesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListServicesResponse(); - } - - public static com.google.cloud.metastore.v1beta.ListServicesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListServicesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.ListServicesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponseOrBuilder.java deleted file mode 100644 index 95cd75ebe388..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface ListServicesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListServicesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - java.util.List getServicesList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - com.google.cloud.metastore.v1beta.Service getServices(int index); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - int getServicesCount(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - java.util.List - getServicesOrBuilderList(); - /** - * - * - *
-   * The services in the specified location.
-   * 
- * - * repeated .google.cloud.metastore.v1beta.Service services = 1; - */ - com.google.cloud.metastore.v1beta.ServiceOrBuilder getServicesOrBuilder(int index); - - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token that can be sent as `page_token` to retrieve the next page. If this
-   * field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Locations that could not be reached.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadata.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadata.java deleted file mode 100644 index de2dc2bfc73b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadata.java +++ /dev/null @@ -1,1853 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Metadata about the service in a location.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.LocationMetadata} - */ -public final class LocationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.LocationMetadata) - LocationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use LocationMetadata.newBuilder() to construct. - private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private LocationMetadata() { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new LocationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.LocationMetadata.class, - com.google.cloud.metastore.v1beta.LocationMetadata.Builder.class); - } - - public interface HiveMetastoreVersionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-     * Whether `version` will be chosen by the server if a metastore service is
-     * created with a `HiveMetastoreConfig` that omits the `version`.
-     * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - boolean getIsDefault(); - } - /** - * - * - *
-   * A specification of a supported version of the Hive Metastore software.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} - */ - public static final class HiveMetastoreVersion extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) - HiveMetastoreVersionOrBuilder { - private static final long serialVersionUID = 0L; - // Use HiveMetastoreVersion.newBuilder() to construct. - private HiveMetastoreVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HiveMetastoreVersion() { - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HiveMetastoreVersion(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.class, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder - .class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * - * - *
-     * The semantic version of the Hive Metastore software.
-     * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IS_DEFAULT_FIELD_NUMBER = 2; - private boolean isDefault_ = false; - /** - * - * - *
-     * Whether `version` will be chosen by the server if a metastore service is
-     * created with a `HiveMetastoreConfig` that omits the `version`.
-     * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - @java.lang.Override - public boolean getIsDefault() { - return isDefault_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (isDefault_ != false) { - output.writeBool(2, isDefault_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (isDefault_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isDefault_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion other = - (com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (getIsDefault() != other.getIsDefault()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A specification of a supported version of the Hive Metastore software.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.class, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder - .class); - } - - // Construct using - // com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - isDefault_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion build() { - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - buildPartial() { - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion result = - new com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.isDefault_ = isDefault_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) { - return mergeFrom( - (com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion other) { - if (other - == com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getIsDefault() != false) { - setIsDefault(other.getIsDefault()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - isDefault_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return The bytes for version. - */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-       * The semantic version of the Hive Metastore software.
-       * 
- * - * string version = 1; - * - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private boolean isDefault_; - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @return The isDefault. - */ - @java.lang.Override - public boolean getIsDefault() { - return isDefault_; - } - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @param value The isDefault to set. - * @return This builder for chaining. - */ - public Builder setIsDefault(boolean value) { - - isDefault_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Whether `version` will be chosen by the server if a metastore service is
-       * created with a `HiveMetastoreConfig` that omits the `version`.
-       * 
- * - * bool is_default = 2; - * - * @return This builder for chaining. - */ - public Builder clearIsDefault() { - bitField0_ = (bitField0_ & ~0x00000002); - isDefault_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) - private static final com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion(); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HiveMetastoreVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List - supportedHiveMetastoreVersions_; - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public java.util.List - getSupportedHiveMetastoreVersionsList() { - return supportedHiveMetastoreVersions_; - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList() { - return supportedHiveMetastoreVersions_; - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public int getSupportedHiveMetastoreVersionsCount() { - return supportedHiveMetastoreVersions_.size(); - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index) { - return supportedHiveMetastoreVersions_.get(index); - } - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index) { - return supportedHiveMetastoreVersions_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { - output.writeMessage(1, supportedHiveMetastoreVersions_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, supportedHiveMetastoreVersions_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.LocationMetadata)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.LocationMetadata other = - (com.google.cloud.metastore.v1beta.LocationMetadata) obj; - - if (!getSupportedHiveMetastoreVersionsList() - .equals(other.getSupportedHiveMetastoreVersionsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSupportedHiveMetastoreVersionsCount() > 0) { - hash = (37 * hash) + SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getSupportedHiveMetastoreVersionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.LocationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Metadata about the service in a location.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.LocationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.LocationMetadata) - com.google.cloud.metastore.v1beta.LocationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.LocationMetadata.class, - com.google.cloud.metastore.v1beta.LocationMetadata.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.LocationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - } else { - supportedHiveMetastoreVersions_ = null; - supportedHiveMetastoreVersionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_LocationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.LocationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata build() { - com.google.cloud.metastore.v1beta.LocationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata buildPartial() { - com.google.cloud.metastore.v1beta.LocationMetadata result = - new com.google.cloud.metastore.v1beta.LocationMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1beta.LocationMetadata result) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - supportedHiveMetastoreVersions_ = - java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersions_; - } else { - result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersionsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.LocationMetadata result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.LocationMetadata) { - return mergeFrom((com.google.cloud.metastore.v1beta.LocationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.LocationMetadata other) { - if (other == com.google.cloud.metastore.v1beta.LocationMetadata.getDefaultInstance()) - return this; - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (!other.supportedHiveMetastoreVersions_.isEmpty()) { - if (supportedHiveMetastoreVersions_.isEmpty()) { - supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.addAll(other.supportedHiveMetastoreVersions_); - } - onChanged(); - } - } else { - if (!other.supportedHiveMetastoreVersions_.isEmpty()) { - if (supportedHiveMetastoreVersionsBuilder_.isEmpty()) { - supportedHiveMetastoreVersionsBuilder_.dispose(); - supportedHiveMetastoreVersionsBuilder_ = null; - supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - supportedHiveMetastoreVersionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSupportedHiveMetastoreVersionsFieldBuilder() - : null; - } else { - supportedHiveMetastoreVersionsBuilder_.addAllMessages( - other.supportedHiveMetastoreVersions_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion m = - input.readMessage( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - .parser(), - extensionRegistry); - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(m); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - - private void ensureSupportedHiveMetastoreVersionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - supportedHiveMetastoreVersions_ = - new java.util.ArrayList< - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion>( - supportedHiveMetastoreVersions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder> - supportedHiveMetastoreVersionsBuilder_; - - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List - getSupportedHiveMetastoreVersionsList() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public int getSupportedHiveMetastoreVersionsCount() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.size(); - } else { - return supportedHiveMetastoreVersionsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.get(index); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder setSupportedHiveMetastoreVersions( - int index, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.set(index, value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder setSupportedHiveMetastoreVersions( - int index, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.set(index, builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - int index, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion value) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(index, value); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addSupportedHiveMetastoreVersions( - int index, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder - builderForValue) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.add(index, builderForValue.build()); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder addAllSupportedHiveMetastoreVersions( - java.lang.Iterable< - ? extends com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion> - values) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, supportedHiveMetastoreVersions_); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder clearSupportedHiveMetastoreVersions() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public Builder removeSupportedHiveMetastoreVersions(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - ensureSupportedHiveMetastoreVersionsIsMutable(); - supportedHiveMetastoreVersions_.remove(index); - onChanged(); - } else { - supportedHiveMetastoreVersionsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder - getSupportedHiveMetastoreVersionsBuilder(int index) { - return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index) { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - return supportedHiveMetastoreVersions_.get(index); - } else { - return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList() { - if (supportedHiveMetastoreVersionsBuilder_ != null) { - return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); - } - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder - addSupportedHiveMetastoreVersionsBuilder() { - return getSupportedHiveMetastoreVersionsFieldBuilder() - .addBuilder( - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder - addSupportedHiveMetastoreVersionsBuilder(int index) { - return getSupportedHiveMetastoreVersionsFieldBuilder() - .addBuilder( - index, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - .getDefaultInstance()); - } - /** - * - * - *
-     * The versions of Hive Metastore that can be used when creating a new
-     * metastore service in this location. The server guarantees that exactly one
-     * `HiveMetastoreVersion` in the list will set `is_default`.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - public java.util.List< - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder> - getSupportedHiveMetastoreVersionsBuilderList() { - return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsFieldBuilder() { - if (supportedHiveMetastoreVersionsBuilder_ == null) { - supportedHiveMetastoreVersionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder, - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder>( - supportedHiveMetastoreVersions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - supportedHiveMetastoreVersions_ = null; - } - return supportedHiveMetastoreVersionsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.LocationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.LocationMetadata) - private static final com.google.cloud.metastore.v1beta.LocationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.LocationMetadata(); - } - - public static com.google.cloud.metastore.v1beta.LocationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.LocationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadataOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadataOrBuilder.java deleted file mode 100644 index cc41405133cd..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadataOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface LocationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.LocationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - java.util.List - getSupportedHiveMetastoreVersionsList(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion - getSupportedHiveMetastoreVersions(int index); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - int getSupportedHiveMetastoreVersionsCount(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder> - getSupportedHiveMetastoreVersionsOrBuilderList(); - /** - * - * - *
-   * The versions of Hive Metastore that can be used when creating a new
-   * metastore service in this location. The server guarantees that exactly one
-   * `HiveMetastoreVersion` in the list will set `is_default`.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; - * - */ - com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder - getSupportedHiveMetastoreVersionsOrBuilder(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindow.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindow.java deleted file mode 100644 index 972f1db4b1ea..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindow.java +++ /dev/null @@ -1,855 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Maintenance window. This specifies when Dataproc Metastore
- * may perform system maintenance operation to the service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MaintenanceWindow} - */ -public final class MaintenanceWindow extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MaintenanceWindow) - MaintenanceWindowOrBuilder { - private static final long serialVersionUID = 0L; - // Use MaintenanceWindow.newBuilder() to construct. - private MaintenanceWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MaintenanceWindow() { - dayOfWeek_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MaintenanceWindow(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MaintenanceWindow.class, - com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder.class); - } - - public static final int HOUR_OF_DAY_FIELD_NUMBER = 1; - private com.google.protobuf.Int32Value hourOfDay_; - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - @java.lang.Override - public boolean hasHourOfDay() { - return hourOfDay_ != null; - } - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - @java.lang.Override - public com.google.protobuf.Int32Value getHourOfDay() { - return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; - } - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - @java.lang.Override - public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { - return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; - } - - public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; - private int dayOfWeek_ = 0; - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - @java.lang.Override - public int getDayOfWeekValue() { - return dayOfWeek_; - } - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - @java.lang.Override - public com.google.type.DayOfWeek getDayOfWeek() { - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (hourOfDay_ != null) { - output.writeMessage(1, getHourOfDay()); - } - if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { - output.writeEnum(2, dayOfWeek_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hourOfDay_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHourOfDay()); - } - if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, dayOfWeek_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.MaintenanceWindow)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.MaintenanceWindow other = - (com.google.cloud.metastore.v1beta.MaintenanceWindow) obj; - - if (hasHourOfDay() != other.hasHourOfDay()) return false; - if (hasHourOfDay()) { - if (!getHourOfDay().equals(other.getHourOfDay())) return false; - } - if (dayOfWeek_ != other.dayOfWeek_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHourOfDay()) { - hash = (37 * hash) + HOUR_OF_DAY_FIELD_NUMBER; - hash = (53 * hash) + getHourOfDay().hashCode(); - } - hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; - hash = (53 * hash) + dayOfWeek_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.MaintenanceWindow prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Maintenance window. This specifies when Dataproc Metastore
-   * may perform system maintenance operation to the service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MaintenanceWindow} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MaintenanceWindow) - com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MaintenanceWindow.class, - com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.MaintenanceWindow.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hourOfDay_ = null; - if (hourOfDayBuilder_ != null) { - hourOfDayBuilder_.dispose(); - hourOfDayBuilder_ = null; - } - dayOfWeek_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MaintenanceWindow getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MaintenanceWindow build() { - com.google.cloud.metastore.v1beta.MaintenanceWindow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MaintenanceWindow buildPartial() { - com.google.cloud.metastore.v1beta.MaintenanceWindow result = - new com.google.cloud.metastore.v1beta.MaintenanceWindow(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.MaintenanceWindow result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hourOfDay_ = hourOfDayBuilder_ == null ? hourOfDay_ : hourOfDayBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dayOfWeek_ = dayOfWeek_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.MaintenanceWindow) { - return mergeFrom((com.google.cloud.metastore.v1beta.MaintenanceWindow) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.MaintenanceWindow other) { - if (other == com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance()) - return this; - if (other.hasHourOfDay()) { - mergeHourOfDay(other.getHourOfDay()); - } - if (other.dayOfWeek_ != 0) { - setDayOfWeekValue(other.getDayOfWeekValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getHourOfDayFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - dayOfWeek_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Int32Value hourOfDay_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder> - hourOfDayBuilder_; - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - public boolean hasHourOfDay() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - public com.google.protobuf.Int32Value getHourOfDay() { - if (hourOfDayBuilder_ == null) { - return hourOfDay_ == null - ? com.google.protobuf.Int32Value.getDefaultInstance() - : hourOfDay_; - } else { - return hourOfDayBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder setHourOfDay(com.google.protobuf.Int32Value value) { - if (hourOfDayBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hourOfDay_ = value; - } else { - hourOfDayBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder setHourOfDay(com.google.protobuf.Int32Value.Builder builderForValue) { - if (hourOfDayBuilder_ == null) { - hourOfDay_ = builderForValue.build(); - } else { - hourOfDayBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder mergeHourOfDay(com.google.protobuf.Int32Value value) { - if (hourOfDayBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && hourOfDay_ != null - && hourOfDay_ != com.google.protobuf.Int32Value.getDefaultInstance()) { - getHourOfDayBuilder().mergeFrom(value); - } else { - hourOfDay_ = value; - } - } else { - hourOfDayBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public Builder clearHourOfDay() { - bitField0_ = (bitField0_ & ~0x00000001); - hourOfDay_ = null; - if (hourOfDayBuilder_ != null) { - hourOfDayBuilder_.dispose(); - hourOfDayBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public com.google.protobuf.Int32Value.Builder getHourOfDayBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHourOfDayFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { - if (hourOfDayBuilder_ != null) { - return hourOfDayBuilder_.getMessageOrBuilder(); - } else { - return hourOfDay_ == null - ? com.google.protobuf.Int32Value.getDefaultInstance() - : hourOfDay_; - } - } - /** - * - * - *
-     * The hour of day (0-23) when the window starts.
-     * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder> - getHourOfDayFieldBuilder() { - if (hourOfDayBuilder_ == null) { - hourOfDayBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Int32Value, - com.google.protobuf.Int32Value.Builder, - com.google.protobuf.Int32ValueOrBuilder>( - getHourOfDay(), getParentForChildren(), isClean()); - hourOfDay_ = null; - } - return hourOfDayBuilder_; - } - - private int dayOfWeek_ = 0; - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - @java.lang.Override - public int getDayOfWeekValue() { - return dayOfWeek_; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @param value The enum numeric value on the wire for dayOfWeek to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeekValue(int value) { - dayOfWeek_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - @java.lang.Override - public com.google.type.DayOfWeek getDayOfWeek() { - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @param value The dayOfWeek to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeek(com.google.type.DayOfWeek value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - dayOfWeek_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The day of week, when the window starts.
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return This builder for chaining. - */ - public Builder clearDayOfWeek() { - bitField0_ = (bitField0_ & ~0x00000002); - dayOfWeek_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MaintenanceWindow) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MaintenanceWindow) - private static final com.google.cloud.metastore.v1beta.MaintenanceWindow DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MaintenanceWindow(); - } - - public static com.google.cloud.metastore.v1beta.MaintenanceWindow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MaintenanceWindow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MaintenanceWindow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindowOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindowOrBuilder.java deleted file mode 100644 index 2406fa250cef..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindowOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface MaintenanceWindowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MaintenanceWindow) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return Whether the hourOfDay field is set. - */ - boolean hasHourOfDay(); - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - * - * @return The hourOfDay. - */ - com.google.protobuf.Int32Value getHourOfDay(); - /** - * - * - *
-   * The hour of day (0-23) when the window starts.
-   * 
- * - * .google.protobuf.Int32Value hour_of_day = 1; - */ - com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder(); - - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The enum numeric value on the wire for dayOfWeek. - */ - int getDayOfWeekValue(); - /** - * - * - *
-   * The day of week, when the window starts.
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * - * @return The dayOfWeek. - */ - com.google.type.DayOfWeek getDayOfWeek(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExport.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExport.java deleted file mode 100644 index dfd1fcc3f3f8..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExport.java +++ /dev/null @@ -1,1860 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * The details of a metadata export operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataExport} - */ -public final class MetadataExport extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataExport) - MetadataExportOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataExport.newBuilder() to construct. - private MetadataExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataExport() { - state_ = 0; - databaseDumpType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataExport(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataExport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataExport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataExport.class, - com.google.cloud.metastore.v1beta.MetadataExport.Builder.class); - } - - /** - * - * - *
-   * The current state of the metadata export.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.MetadataExport.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata export is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata export is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata export completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata export failed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - * - * - *
-     * The metadata export is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata export is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata export is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata export completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata export failed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - * - * - *
-     * The metadata export is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return FAILED; - case 4: - return CANCELLED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetadataExport.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.MetadataExport.State) - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DESTINATION_GCS_URI(4), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 4: - return DESTINATION_GCS_URI; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int DESTINATION_GCS_URI_FIELD_NUMBER = 4; - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - public boolean hasDestinationGcsUri() { - return destinationCase_ == 4; - } - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - public java.lang.String getDestinationGcsUri() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 4) { - destination_ = s; - } - return s; - } - } - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - public com.google.protobuf.ByteString getDestinationGcsUriBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 4) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataExport.State getState() { - com.google.cloud.metastore.v1beta.MetadataExport.State result = - com.google.cloud.metastore.v1beta.MetadataExport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1beta.MetadataExport.State.UNRECOGNIZED - : result; - } - - public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 5; - private int databaseDumpType_ = 0; - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (state_ - != com.google.cloud.metastore.v1beta.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (destinationCase_ == 4) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destination_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, databaseDumpType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (state_ - != com.google.cloud.metastore.v1beta.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); - } - if (destinationCase_ == 4) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destination_); - } - if (databaseDumpType_ - != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, databaseDumpType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataExport)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.MetadataExport other = - (com.google.cloud.metastore.v1beta.MetadataExport) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (databaseDumpType_ != other.databaseDumpType_) return false; - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 4: - if (!getDestinationGcsUri().equals(other.getDestinationGcsUri())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseDumpType_; - switch (destinationCase_) { - case 4: - hash = (37 * hash) + DESTINATION_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getDestinationGcsUri().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.MetadataExport prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a metadata export operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataExport} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataExport) - com.google.cloud.metastore.v1beta.MetadataExportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataExport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataExport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataExport.class, - com.google.cloud.metastore.v1beta.MetadataExport.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.MetadataExport.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - databaseDumpType_ = 0; - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataExport_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataExport getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.MetadataExport.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataExport build() { - com.google.cloud.metastore.v1beta.MetadataExport result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataExport buildPartial() { - com.google.cloud.metastore.v1beta.MetadataExport result = - new com.google.cloud.metastore.v1beta.MetadataExport(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.MetadataExport result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.databaseDumpType_ = databaseDumpType_; - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1beta.MetadataExport result) { - result.destinationCase_ = destinationCase_; - result.destination_ = this.destination_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.MetadataExport) { - return mergeFrom((com.google.cloud.metastore.v1beta.MetadataExport) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataExport other) { - if (other == com.google.cloud.metastore.v1beta.MetadataExport.getDefaultInstance()) - return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.databaseDumpType_ != 0) { - setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); - } - switch (other.getDestinationCase()) { - case DESTINATION_GCS_URI: - { - destinationCase_ = 4; - destination_ = other.destination_; - onChanged(); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 24: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 24 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 4; - destination_ = s; - break; - } // case 34 - case 40: - { - databaseDumpType_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - @java.lang.Override - public boolean hasDestinationGcsUri() { - return destinationCase_ == 4; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - @java.lang.Override - public java.lang.String getDestinationGcsUri() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (destinationCase_ == 4) { - destination_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDestinationGcsUriBytes() { - java.lang.Object ref = ""; - if (destinationCase_ == 4) { - ref = destination_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (destinationCase_ == 4) { - destination_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The destinationGcsUri to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationCase_ = 4; - destination_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDestinationGcsUri() { - if (destinationCase_ == 4) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI of a folder that metadata are exported
-     * to, in the form of
-     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-     * `<export_folder>` is automatically generated.
-     * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for destinationGcsUri to set. - * @return This builder for chaining. - */ - public Builder setDestinationGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - destinationCase_ = 4; - destination_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && startTime_ != null - && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000002); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Output only. The time when the export started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000004); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the export ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataExport.State getState() { - com.google.cloud.metastore.v1beta.MetadataExport.State result = - com.google.cloud.metastore.v1beta.MetadataExport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1beta.MetadataExport.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1beta.MetadataExport.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the export.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000008); - state_ = 0; - onChanged(); - return this; - } - - private int databaseDumpType_ = 0; - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - @java.lang.Override - public int getDatabaseDumpTypeValue() { - return databaseDumpType_; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpTypeValue(int value) { - databaseDumpType_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType() { - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); - return result == null - ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The databaseDumpType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseDumpType( - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - databaseDumpType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of the database dump.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseDumpType() { - bitField0_ = (bitField0_ & ~0x00000010); - databaseDumpType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataExport) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataExport) - private static final com.google.cloud.metastore.v1beta.MetadataExport DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataExport(); - } - - public static com.google.cloud.metastore.v1beta.MetadataExport getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataExport parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataExport getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExportOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExportOrBuilder.java deleted file mode 100644 index 70169d1d7003..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExportOrBuilder.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface MetadataExportOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataExport) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the destinationGcsUri field is set. - */ - boolean hasDestinationGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The destinationGcsUri. - */ - java.lang.String getDestinationGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI of a folder that metadata are exported
-   * to, in the form of
-   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
-   * `<export_folder>` is automatically generated.
-   * 
- * - * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for destinationGcsUri. - */ - com.google.protobuf.ByteString getDestinationGcsUriBytes(); - - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Output only. The time when the export started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the export ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the export.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1beta.MetadataExport.State getState(); - - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for databaseDumpType. - */ - int getDatabaseDumpTypeValue(); - /** - * - * - *
-   * Output only. The type of the database dump.
-   * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The databaseDumpType. - */ - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType(); - - public com.google.cloud.metastore.v1beta.MetadataExport.DestinationCase getDestinationCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImport.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImport.java deleted file mode 100644 index 2a16b10eff7f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImport.java +++ /dev/null @@ -1,3901 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * A metastore resource that imports metadata.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataImport} - */ -public final class MetadataImport extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataImport) - MetadataImportOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataImport.newBuilder() to construct. - private MetadataImport(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataImport() { - name_ = ""; - description_ = ""; - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataImport(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataImport.class, - com.google.cloud.metastore.v1beta.MetadataImport.Builder.class); - } - - /** - * - * - *
-   * The current state of the metadata import.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.MetadataImport.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata import is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata import is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata import completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata import is being updated.
-     * 
- * - * UPDATING = 3; - */ - UPDATING(3), - /** - * - * - *
-     * The metadata import failed, and attempted metadata changes were rolled
-     * back.
-     * 
- * - * FAILED = 4; - */ - FAILED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata import is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata import is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata import completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata import is being updated.
-     * 
- * - * UPDATING = 3; - */ - public static final int UPDATING_VALUE = 3; - /** - * - * - *
-     * The metadata import failed, and attempted metadata changes were rolled
-     * back.
-     * 
- * - * FAILED = 4; - */ - public static final int FAILED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return UPDATING; - case 4: - return FAILED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetadataImport.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.MetadataImport.State) - } - - public interface DatabaseDumpOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Deprecated - int getDatabaseTypeValue(); - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @return The databaseType. - */ - @java.lang.Deprecated - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType getDatabaseType(); - - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - java.lang.String getGcsUri(); - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - com.google.protobuf.ByteString getGcsUriBytes(); - - /** - * - * - *
-     * The name of the source database.
-     * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @return The sourceDatabase. - */ - @java.lang.Deprecated - java.lang.String getSourceDatabase(); - /** - * - * - *
-     * The name of the source database.
-     * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @return The bytes for sourceDatabase. - */ - @java.lang.Deprecated - com.google.protobuf.ByteString getSourceDatabaseBytes(); - - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getType(); - } - /** - * - * - *
-   * A specification of the location of and metadata about a database dump from
-   * a relational database management system.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} - */ - public static final class DatabaseDump extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) - DatabaseDumpOrBuilder { - private static final long serialVersionUID = 0L; - // Use DatabaseDump.newBuilder() to construct. - private DatabaseDump(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DatabaseDump() { - databaseType_ = 0; - gcsUri_ = ""; - sourceDatabase_ = ""; - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DatabaseDump(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.class, - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder.class); - } - - /** - * - * - *
-     * The type of the database.
-     * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType} - */ - public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * The type of the source database is unknown.
-       * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - DATABASE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-       * The type of the source database is MySQL.
-       * 
- * - * MYSQL = 1; - */ - MYSQL(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * The type of the source database is unknown.
-       * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * The type of the source database is MySQL.
-       * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DatabaseType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DatabaseType forNumber(int value) { - switch (value) { - case 0: - return DATABASE_TYPE_UNSPECIFIED; - case 1: - return MYSQL; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DatabaseType findValueByNumber(int number) { - return DatabaseType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final DatabaseType[] VALUES = values(); - - public static DatabaseType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DatabaseType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType) - } - - public static final int DATABASE_TYPE_FIELD_NUMBER = 1; - private int databaseType_ = 0; - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-     * The type of the database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @return The databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType - getDatabaseType() { - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType result = - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.forNumber( - databaseType_); - return result == null - ? com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED - : result; - } - - public static final int GCS_URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object gcsUri_ = ""; - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - @java.lang.Override - public java.lang.String getGcsUri() { - java.lang.Object ref = gcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsUri_ = s; - return s; - } - } - /** - * - * - *
-     * A Cloud Storage object or folder URI that specifies the source from which
-     * to import metadata. It must begin with `gs://`.
-     * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGcsUriBytes() { - java.lang.Object ref = gcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_DATABASE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object sourceDatabase_ = ""; - /** - * - * - *
-     * The name of the source database.
-     * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @return The sourceDatabase. - */ - @java.lang.Override - @java.lang.Deprecated - public java.lang.String getSourceDatabase() { - java.lang.Object ref = sourceDatabase_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceDatabase_ = s; - return s; - } - } - /** - * - * - *
-     * The name of the source database.
-     * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @return The bytes for sourceDatabase. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.protobuf.ByteString getSourceDatabaseBytes() { - java.lang.Object ref = sourceDatabase_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceDatabase_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 4; - private int type_ = 0; - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-     * Optional. The type of the database dump. If unspecified, defaults to
-     * `MYSQL`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getType() { - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (databaseType_ - != com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType - .DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, databaseType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceDatabase_); - } - if (type_ - != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, type_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (databaseType_ - != com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType - .DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, databaseType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceDatabase_); - } - if (type_ - != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump other = - (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) obj; - - if (databaseType_ != other.databaseType_) return false; - if (!getGcsUri().equals(other.getGcsUri())) return false; - if (!getSourceDatabase().equals(other.getSourceDatabase())) return false; - if (type_ != other.type_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseType_; - hash = (37 * hash) + GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getGcsUri().hashCode(); - hash = (37 * hash) + SOURCE_DATABASE_FIELD_NUMBER; - hash = (53 * hash) + getSourceDatabase().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A specification of the location of and metadata about a database dump from
-     * a relational database management system.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.class, - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - databaseType_ = 0; - gcsUri_ = ""; - sourceDatabase_ = ""; - type_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump build() { - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump buildPartial() { - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump result = - new com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.databaseType_ = databaseType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.gcsUri_ = gcsUri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.sourceDatabase_ = sourceDatabase_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.type_ = type_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) { - return mergeFrom((com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump other) { - if (other - == com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance()) - return this; - if (other.databaseType_ != 0) { - setDatabaseTypeValue(other.getDatabaseTypeValue()); - } - if (!other.getGcsUri().isEmpty()) { - gcsUri_ = other.gcsUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getSourceDatabase().isEmpty()) { - sourceDatabase_ = other.sourceDatabase_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - databaseType_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - gcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - sourceDatabase_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int databaseType_ = 0; - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @param value The enum numeric value on the wire for databaseType to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setDatabaseTypeValue(int value) { - databaseType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @return The databaseType. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType - getDatabaseType() { - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType result = - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.forNumber( - databaseType_); - return result == null - ? com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType - .UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @param value The databaseType to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setDatabaseType( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - databaseType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The type of the database.
-       * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; - * - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=691 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearDatabaseType() { - bitField0_ = (bitField0_ & ~0x00000001); - databaseType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object gcsUri_ = ""; - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return The gcsUri. - */ - public java.lang.String getGcsUri() { - java.lang.Object ref = gcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return The bytes for gcsUri. - */ - public com.google.protobuf.ByteString getGcsUriBytes() { - java.lang.Object ref = gcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @param value The gcsUri to set. - * @return This builder for chaining. - */ - public Builder setGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - gcsUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearGcsUri() { - gcsUri_ = getDefaultInstance().getGcsUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * A Cloud Storage object or folder URI that specifies the source from which
-       * to import metadata. It must begin with `gs://`.
-       * 
- * - * string gcs_uri = 2; - * - * @param value The bytes for gcsUri to set. - * @return This builder for chaining. - */ - public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - gcsUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object sourceDatabase_ = ""; - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @return The sourceDatabase. - */ - @java.lang.Deprecated - public java.lang.String getSourceDatabase() { - java.lang.Object ref = sourceDatabase_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceDatabase_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @return The bytes for sourceDatabase. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getSourceDatabaseBytes() { - java.lang.Object ref = sourceDatabase_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceDatabase_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @param value The sourceDatabase to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setSourceDatabase(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceDatabase_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearSourceDatabase() { - sourceDatabase_ = getDefaultInstance().getSourceDatabase(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the source database.
-       * 
- * - * string source_database = 3 [deprecated = true]; - * - * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is - * deprecated. See google/cloud/metastore/v1beta/metastore.proto;l=698 - * @param value The bytes for sourceDatabase to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setSourceDatabaseBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceDatabase_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getType() { - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = - com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The type of the database dump. If unspecified, defaults to
-       * `MYSQL`.
-       * 
- * - * - * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000008); - type_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) - private static final com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump(); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DatabaseDump parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int metadataCase_ = 0; - private java.lang.Object metadata_; - - public enum MetadataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DATABASE_DUMP(6), - METADATA_NOT_SET(0); - private final int value; - - private MetadataCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetadataCase valueOf(int value) { - return forNumber(value); - } - - public static MetadataCase forNumber(int value) { - switch (value) { - case 6: - return DATABASE_DUMP; - case 0: - return METADATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MetadataCase getMetadataCase() { - return MetadataCase.forNumber(metadataCase_); - } - - public static final int DATABASE_DUMP_FIELD_NUMBER = 6; - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - @java.lang.Override - public boolean hasDatabaseDump() { - return metadataCase_ == 6; - } - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDatabaseDump() { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); - } - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder - getDatabaseDumpOrBuilder() { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 5; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.State getState() { - com.google.cloud.metastore.v1beta.MetadataImport.State result = - com.google.cloud.metastore.v1beta.MetadataImport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1beta.MetadataImport.State.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (createTime_ != null) { - output.writeMessage(3, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(4, getUpdateTime()); - } - if (state_ - != com.google.cloud.metastore.v1beta.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, state_); - } - if (metadataCase_ == 6) { - output.writeMessage( - 6, (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_); - } - if (endTime_ != null) { - output.writeMessage(7, getEndTime()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); - } - if (state_ - != com.google.cloud.metastore.v1beta.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); - } - if (metadataCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEndTime()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataImport)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.MetadataImport other = - (com.google.cloud.metastore.v1beta.MetadataImport) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (!getMetadataCase().equals(other.getMetadataCase())) return false; - switch (metadataCase_) { - case 6: - if (!getDatabaseDump().equals(other.getDatabaseDump())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - switch (metadataCase_) { - case 6: - hash = (37 * hash) + DATABASE_DUMP_FIELD_NUMBER; - hash = (53 * hash) + getDatabaseDump().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.MetadataImport prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A metastore resource that imports metadata.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataImport} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataImport) - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataImport.class, - com.google.cloud.metastore.v1beta.MetadataImport.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.MetadataImport.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (databaseDumpBuilder_ != null) { - databaseDumpBuilder_.clear(); - } - name_ = ""; - description_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - metadataCase_ = 0; - metadata_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataImport_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport build() { - com.google.cloud.metastore.v1beta.MetadataImport result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport buildPartial() { - com.google.cloud.metastore.v1beta.MetadataImport result = - new com.google.cloud.metastore.v1beta.MetadataImport(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.MetadataImport result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.state_ = state_; - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1beta.MetadataImport result) { - result.metadataCase_ = metadataCase_; - result.metadata_ = this.metadata_; - if (metadataCase_ == 6 && databaseDumpBuilder_ != null) { - result.metadata_ = databaseDumpBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.MetadataImport) { - return mergeFrom((com.google.cloud.metastore.v1beta.MetadataImport) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataImport other) { - if (other == com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - switch (other.getMetadataCase()) { - case DATABASE_DUMP: - { - mergeDatabaseDump(other.getDatabaseDump()); - break; - } - case METADATA_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 40: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000040; - break; - } // case 40 - case 50: - { - input.readMessage(getDatabaseDumpFieldBuilder().getBuilder(), extensionRegistry); - metadataCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int metadataCase_ = 0; - private java.lang.Object metadata_; - - public MetadataCase getMetadataCase() { - return MetadataCase.forNumber(metadataCase_); - } - - public Builder clearMetadata() { - metadataCase_ = 0; - metadata_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder> - databaseDumpBuilder_; - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - @java.lang.Override - public boolean hasDatabaseDump() { - return metadataCase_ == 6; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDatabaseDump() { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); - } else { - if (metadataCase_ == 6) { - return databaseDumpBuilder_.getMessage(); - } - return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); - } - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setDatabaseDump( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump value) { - if (databaseDumpBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - onChanged(); - } else { - databaseDumpBuilder_.setMessage(value); - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setDatabaseDump( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder builderForValue) { - if (databaseDumpBuilder_ == null) { - metadata_ = builderForValue.build(); - onChanged(); - } else { - databaseDumpBuilder_.setMessage(builderForValue.build()); - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeDatabaseDump( - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump value) { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6 - && metadata_ - != com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump - .getDefaultInstance()) { - metadata_ = - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.newBuilder( - (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_) - .mergeFrom(value) - .buildPartial(); - } else { - metadata_ = value; - } - onChanged(); - } else { - if (metadataCase_ == 6) { - databaseDumpBuilder_.mergeFrom(value); - } else { - databaseDumpBuilder_.setMessage(value); - } - } - metadataCase_ = 6; - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearDatabaseDump() { - if (databaseDumpBuilder_ == null) { - if (metadataCase_ == 6) { - metadataCase_ = 0; - metadata_ = null; - onChanged(); - } - } else { - if (metadataCase_ == 6) { - metadataCase_ = 0; - metadata_ = null; - } - databaseDumpBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder - getDatabaseDumpBuilder() { - return getDatabaseDumpFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder - getDatabaseDumpOrBuilder() { - if ((metadataCase_ == 6) && (databaseDumpBuilder_ != null)) { - return databaseDumpBuilder_.getMessageOrBuilder(); - } else { - if (metadataCase_ == 6) { - return (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_; - } - return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); - } - } - /** - * - * - *
-     * Immutable. A database dump from a pre-existing metastore's database.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder> - getDatabaseDumpFieldBuilder() { - if (databaseDumpBuilder_ == null) { - if (!(metadataCase_ == 6)) { - metadata_ = - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); - } - databaseDumpBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump, - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder, - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder>( - (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_, - getParentForChildren(), - isClean()); - metadata_ = null; - } - metadataCase_ = 6; - onChanged(); - return databaseDumpBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metadata import, of the form:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * The description of the metadata import.
-     * 
- * - * string description = 2; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was started.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000010); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000020); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metadata import finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport.State getState() { - com.google.cloud.metastore.v1beta.MetadataImport.State result = - com.google.cloud.metastore.v1beta.MetadataImport.State.forNumber(state_); - return result == null - ? com.google.cloud.metastore.v1beta.MetadataImport.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1beta.MetadataImport.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metadata import.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000040); - state_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataImport) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataImport) - private static final com.google.cloud.metastore.v1beta.MetadataImport DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataImport(); - } - - public static com.google.cloud.metastore.v1beta.MetadataImport getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataImport parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportOrBuilder.java deleted file mode 100644 index 920f8701b497..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportOrBuilder.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface MetadataImportOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataImport) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the databaseDump field is set. - */ - boolean hasDatabaseDump(); - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseDump. - */ - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDatabaseDump(); - /** - * - * - *
-   * Immutable. A database dump from a pre-existing metastore's database.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder(); - - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the metadata import, of the form:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * The description of the metadata import.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was started.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metadata import was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the metadata import finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the metadata import.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1beta.MetadataImport.State getState(); - - public com.google.cloud.metastore.v1beta.MetadataImport.MetadataCase getMetadataCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegration.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegration.java deleted file mode 100644 index a2d024aa4caf..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegration.java +++ /dev/null @@ -1,988 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Specifies how metastore metadata should be integrated with external services.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataIntegration} - */ -public final class MetadataIntegration extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataIntegration) - MetadataIntegrationOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataIntegration.newBuilder() to construct. - private MetadataIntegration(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataIntegration() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataIntegration(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataIntegration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataIntegration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataIntegration.class, - com.google.cloud.metastore.v1beta.MetadataIntegration.Builder.class); - } - - public static final int DATA_CATALOG_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.metastore.v1beta.DataCatalogConfig dataCatalogConfig_; - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - * - * @return Whether the dataCatalogConfig field is set. - */ - @java.lang.Override - public boolean hasDataCatalogConfig() { - return dataCatalogConfig_ != null; - } - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - * - * @return The dataCatalogConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataCatalogConfig getDataCatalogConfig() { - return dataCatalogConfig_ == null - ? com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance() - : dataCatalogConfig_; - } - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder - getDataCatalogConfigOrBuilder() { - return dataCatalogConfig_ == null - ? com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance() - : dataCatalogConfig_; - } - - public static final int DATAPLEX_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1beta.DataplexConfig dataplexConfig_; - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - * - * @return Whether the dataplexConfig field is set. - */ - @java.lang.Override - public boolean hasDataplexConfig() { - return dataplexConfig_ != null; - } - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - * - * @return The dataplexConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataplexConfig getDataplexConfig() { - return dataplexConfig_ == null - ? com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance() - : dataplexConfig_; - } - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder getDataplexConfigOrBuilder() { - return dataplexConfig_ == null - ? com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance() - : dataplexConfig_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (dataCatalogConfig_ != null) { - output.writeMessage(1, getDataCatalogConfig()); - } - if (dataplexConfig_ != null) { - output.writeMessage(2, getDataplexConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataCatalogConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataCatalogConfig()); - } - if (dataplexConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataplexConfig()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataIntegration)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.MetadataIntegration other = - (com.google.cloud.metastore.v1beta.MetadataIntegration) obj; - - if (hasDataCatalogConfig() != other.hasDataCatalogConfig()) return false; - if (hasDataCatalogConfig()) { - if (!getDataCatalogConfig().equals(other.getDataCatalogConfig())) return false; - } - if (hasDataplexConfig() != other.hasDataplexConfig()) return false; - if (hasDataplexConfig()) { - if (!getDataplexConfig().equals(other.getDataplexConfig())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDataCatalogConfig()) { - hash = (37 * hash) + DATA_CATALOG_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDataCatalogConfig().hashCode(); - } - if (hasDataplexConfig()) { - hash = (37 * hash) + DATAPLEX_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDataplexConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.MetadataIntegration prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Specifies how metastore metadata should be integrated with external services.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataIntegration} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataIntegration) - com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataIntegration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataIntegration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataIntegration.class, - com.google.cloud.metastore.v1beta.MetadataIntegration.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.MetadataIntegration.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dataCatalogConfig_ = null; - if (dataCatalogConfigBuilder_ != null) { - dataCatalogConfigBuilder_.dispose(); - dataCatalogConfigBuilder_ = null; - } - dataplexConfig_ = null; - if (dataplexConfigBuilder_ != null) { - dataplexConfigBuilder_.dispose(); - dataplexConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataIntegration_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataIntegration getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataIntegration build() { - com.google.cloud.metastore.v1beta.MetadataIntegration result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataIntegration buildPartial() { - com.google.cloud.metastore.v1beta.MetadataIntegration result = - new com.google.cloud.metastore.v1beta.MetadataIntegration(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.MetadataIntegration result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dataCatalogConfig_ = - dataCatalogConfigBuilder_ == null - ? dataCatalogConfig_ - : dataCatalogConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dataplexConfig_ = - dataplexConfigBuilder_ == null ? dataplexConfig_ : dataplexConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.MetadataIntegration) { - return mergeFrom((com.google.cloud.metastore.v1beta.MetadataIntegration) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataIntegration other) { - if (other == com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance()) - return this; - if (other.hasDataCatalogConfig()) { - mergeDataCatalogConfig(other.getDataCatalogConfig()); - } - if (other.hasDataplexConfig()) { - mergeDataplexConfig(other.getDataplexConfig()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - getDataCatalogConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getDataplexConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.cloud.metastore.v1beta.DataCatalogConfig dataCatalogConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.DataCatalogConfig, - com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder, - com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder> - dataCatalogConfigBuilder_; - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - * - * @return Whether the dataCatalogConfig field is set. - */ - public boolean hasDataCatalogConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - * - * @return The dataCatalogConfig. - */ - public com.google.cloud.metastore.v1beta.DataCatalogConfig getDataCatalogConfig() { - if (dataCatalogConfigBuilder_ == null) { - return dataCatalogConfig_ == null - ? com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance() - : dataCatalogConfig_; - } else { - return dataCatalogConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - public Builder setDataCatalogConfig(com.google.cloud.metastore.v1beta.DataCatalogConfig value) { - if (dataCatalogConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataCatalogConfig_ = value; - } else { - dataCatalogConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - public Builder setDataCatalogConfig( - com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder builderForValue) { - if (dataCatalogConfigBuilder_ == null) { - dataCatalogConfig_ = builderForValue.build(); - } else { - dataCatalogConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - public Builder mergeDataCatalogConfig( - com.google.cloud.metastore.v1beta.DataCatalogConfig value) { - if (dataCatalogConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && dataCatalogConfig_ != null - && dataCatalogConfig_ - != com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance()) { - getDataCatalogConfigBuilder().mergeFrom(value); - } else { - dataCatalogConfig_ = value; - } - } else { - dataCatalogConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - public Builder clearDataCatalogConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - dataCatalogConfig_ = null; - if (dataCatalogConfigBuilder_ != null) { - dataCatalogConfigBuilder_.dispose(); - dataCatalogConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - public com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder - getDataCatalogConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getDataCatalogConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - public com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder - getDataCatalogConfigOrBuilder() { - if (dataCatalogConfigBuilder_ != null) { - return dataCatalogConfigBuilder_.getMessageOrBuilder(); - } else { - return dataCatalogConfig_ == null - ? com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance() - : dataCatalogConfig_; - } - } - /** - * - * - *
-     * The integration config for the Data Catalog service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.DataCatalogConfig, - com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder, - com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder> - getDataCatalogConfigFieldBuilder() { - if (dataCatalogConfigBuilder_ == null) { - dataCatalogConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.DataCatalogConfig, - com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder, - com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder>( - getDataCatalogConfig(), getParentForChildren(), isClean()); - dataCatalogConfig_ = null; - } - return dataCatalogConfigBuilder_; - } - - private com.google.cloud.metastore.v1beta.DataplexConfig dataplexConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.DataplexConfig, - com.google.cloud.metastore.v1beta.DataplexConfig.Builder, - com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder> - dataplexConfigBuilder_; - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - * - * @return Whether the dataplexConfig field is set. - */ - public boolean hasDataplexConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - * - * @return The dataplexConfig. - */ - public com.google.cloud.metastore.v1beta.DataplexConfig getDataplexConfig() { - if (dataplexConfigBuilder_ == null) { - return dataplexConfig_ == null - ? com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance() - : dataplexConfig_; - } else { - return dataplexConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - public Builder setDataplexConfig(com.google.cloud.metastore.v1beta.DataplexConfig value) { - if (dataplexConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataplexConfig_ = value; - } else { - dataplexConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - public Builder setDataplexConfig( - com.google.cloud.metastore.v1beta.DataplexConfig.Builder builderForValue) { - if (dataplexConfigBuilder_ == null) { - dataplexConfig_ = builderForValue.build(); - } else { - dataplexConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - public Builder mergeDataplexConfig(com.google.cloud.metastore.v1beta.DataplexConfig value) { - if (dataplexConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && dataplexConfig_ != null - && dataplexConfig_ - != com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance()) { - getDataplexConfigBuilder().mergeFrom(value); - } else { - dataplexConfig_ = value; - } - } else { - dataplexConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - public Builder clearDataplexConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - dataplexConfig_ = null; - if (dataplexConfigBuilder_ != null) { - dataplexConfigBuilder_.dispose(); - dataplexConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - public com.google.cloud.metastore.v1beta.DataplexConfig.Builder getDataplexConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDataplexConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - public com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder getDataplexConfigOrBuilder() { - if (dataplexConfigBuilder_ != null) { - return dataplexConfigBuilder_.getMessageOrBuilder(); - } else { - return dataplexConfig_ == null - ? com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance() - : dataplexConfig_; - } - } - /** - * - * - *
-     * The integration config for the Dataplex service.
-     * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.DataplexConfig, - com.google.cloud.metastore.v1beta.DataplexConfig.Builder, - com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder> - getDataplexConfigFieldBuilder() { - if (dataplexConfigBuilder_ == null) { - dataplexConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.DataplexConfig, - com.google.cloud.metastore.v1beta.DataplexConfig.Builder, - com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder>( - getDataplexConfig(), getParentForChildren(), isClean()); - dataplexConfig_ = null; - } - return dataplexConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataIntegration) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataIntegration) - private static final com.google.cloud.metastore.v1beta.MetadataIntegration DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataIntegration(); - } - - public static com.google.cloud.metastore.v1beta.MetadataIntegration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataIntegration parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataIntegration getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegrationOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegrationOrBuilder.java deleted file mode 100644 index ca5d7980b8c9..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegrationOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface MetadataIntegrationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataIntegration) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - * - * @return Whether the dataCatalogConfig field is set. - */ - boolean hasDataCatalogConfig(); - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - * - * @return The dataCatalogConfig. - */ - com.google.cloud.metastore.v1beta.DataCatalogConfig getDataCatalogConfig(); - /** - * - * - *
-   * The integration config for the Data Catalog service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; - */ - com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder getDataCatalogConfigOrBuilder(); - - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - * - * @return Whether the dataplexConfig field is set. - */ - boolean hasDataplexConfig(); - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - * - * @return The dataplexConfig. - */ - com.google.cloud.metastore.v1beta.DataplexConfig getDataplexConfig(); - /** - * - * - *
-   * The integration config for the Dataplex service.
-   * 
- * - * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; - */ - com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder getDataplexConfigOrBuilder(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivity.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivity.java deleted file mode 100644 index a4dc295f0aa4..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivity.java +++ /dev/null @@ -1,1539 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * The metadata management activities of the metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataManagementActivity} - */ -public final class MetadataManagementActivity extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataManagementActivity) - MetadataManagementActivityOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetadataManagementActivity.newBuilder() to construct. - private MetadataManagementActivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetadataManagementActivity() { - metadataExports_ = java.util.Collections.emptyList(); - restores_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetadataManagementActivity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataManagementActivity.class, - com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder.class); - } - - public static final int METADATA_EXPORTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List metadataExports_; - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getMetadataExportsList() { - return metadataExports_; - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getMetadataExportsOrBuilderList() { - return metadataExports_; - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getMetadataExportsCount() { - return metadataExports_.size(); - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataExport getMetadataExports(int index) { - return metadataExports_.get(index); - } - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataExportOrBuilder getMetadataExportsOrBuilder( - int index) { - return metadataExports_.get(index); - } - - public static final int RESTORES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List restores_; - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getRestoresList() { - return restores_; - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getRestoresOrBuilderList() { - return restores_; - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getRestoresCount() { - return restores_.size(); - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore getRestores(int index) { - return restores_.get(index); - } - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.RestoreOrBuilder getRestoresOrBuilder(int index) { - return restores_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < metadataExports_.size(); i++) { - output.writeMessage(1, metadataExports_.get(i)); - } - for (int i = 0; i < restores_.size(); i++) { - output.writeMessage(2, restores_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < metadataExports_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metadataExports_.get(i)); - } - for (int i = 0; i < restores_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, restores_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataManagementActivity)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.MetadataManagementActivity other = - (com.google.cloud.metastore.v1beta.MetadataManagementActivity) obj; - - if (!getMetadataExportsList().equals(other.getMetadataExportsList())) return false; - if (!getRestoresList().equals(other.getRestoresList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getMetadataExportsCount() > 0) { - hash = (37 * hash) + METADATA_EXPORTS_FIELD_NUMBER; - hash = (53 * hash) + getMetadataExportsList().hashCode(); - } - if (getRestoresCount() > 0) { - hash = (37 * hash) + RESTORES_FIELD_NUMBER; - hash = (53 * hash) + getRestoresList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.MetadataManagementActivity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The metadata management activities of the metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MetadataManagementActivity} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataManagementActivity) - com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MetadataManagementActivity.class, - com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.MetadataManagementActivity.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (metadataExportsBuilder_ == null) { - metadataExports_ = java.util.Collections.emptyList(); - } else { - metadataExports_ = null; - metadataExportsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (restoresBuilder_ == null) { - restores_ = java.util.Collections.emptyList(); - } else { - restores_ = null; - restoresBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataManagementActivity - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataManagementActivity build() { - com.google.cloud.metastore.v1beta.MetadataManagementActivity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataManagementActivity buildPartial() { - com.google.cloud.metastore.v1beta.MetadataManagementActivity result = - new com.google.cloud.metastore.v1beta.MetadataManagementActivity(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1beta.MetadataManagementActivity result) { - if (metadataExportsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - metadataExports_ = java.util.Collections.unmodifiableList(metadataExports_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.metadataExports_ = metadataExports_; - } else { - result.metadataExports_ = metadataExportsBuilder_.build(); - } - if (restoresBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - restores_ = java.util.Collections.unmodifiableList(restores_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.restores_ = restores_; - } else { - result.restores_ = restoresBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.MetadataManagementActivity result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.MetadataManagementActivity) { - return mergeFrom((com.google.cloud.metastore.v1beta.MetadataManagementActivity) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataManagementActivity other) { - if (other - == com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance()) - return this; - if (metadataExportsBuilder_ == null) { - if (!other.metadataExports_.isEmpty()) { - if (metadataExports_.isEmpty()) { - metadataExports_ = other.metadataExports_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMetadataExportsIsMutable(); - metadataExports_.addAll(other.metadataExports_); - } - onChanged(); - } - } else { - if (!other.metadataExports_.isEmpty()) { - if (metadataExportsBuilder_.isEmpty()) { - metadataExportsBuilder_.dispose(); - metadataExportsBuilder_ = null; - metadataExports_ = other.metadataExports_; - bitField0_ = (bitField0_ & ~0x00000001); - metadataExportsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMetadataExportsFieldBuilder() - : null; - } else { - metadataExportsBuilder_.addAllMessages(other.metadataExports_); - } - } - } - if (restoresBuilder_ == null) { - if (!other.restores_.isEmpty()) { - if (restores_.isEmpty()) { - restores_ = other.restores_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRestoresIsMutable(); - restores_.addAll(other.restores_); - } - onChanged(); - } - } else { - if (!other.restores_.isEmpty()) { - if (restoresBuilder_.isEmpty()) { - restoresBuilder_.dispose(); - restoresBuilder_ = null; - restores_ = other.restores_; - bitField0_ = (bitField0_ & ~0x00000002); - restoresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRestoresFieldBuilder() - : null; - } else { - restoresBuilder_.addAllMessages(other.restores_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1beta.MetadataExport m = - input.readMessage( - com.google.cloud.metastore.v1beta.MetadataExport.parser(), - extensionRegistry); - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(m); - } else { - metadataExportsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - com.google.cloud.metastore.v1beta.Restore m = - input.readMessage( - com.google.cloud.metastore.v1beta.Restore.parser(), extensionRegistry); - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(m); - } else { - restoresBuilder_.addMessage(m); - } - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List metadataExports_ = - java.util.Collections.emptyList(); - - private void ensureMetadataExportsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - metadataExports_ = - new java.util.ArrayList( - metadataExports_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataExport, - com.google.cloud.metastore.v1beta.MetadataExport.Builder, - com.google.cloud.metastore.v1beta.MetadataExportOrBuilder> - metadataExportsBuilder_; - - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMetadataExportsList() { - if (metadataExportsBuilder_ == null) { - return java.util.Collections.unmodifiableList(metadataExports_); - } else { - return metadataExportsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getMetadataExportsCount() { - if (metadataExportsBuilder_ == null) { - return metadataExports_.size(); - } else { - return metadataExportsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataExport getMetadataExports(int index) { - if (metadataExportsBuilder_ == null) { - return metadataExports_.get(index); - } else { - return metadataExportsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataExports( - int index, com.google.cloud.metastore.v1beta.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.set(index, value); - onChanged(); - } else { - metadataExportsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataExports( - int index, com.google.cloud.metastore.v1beta.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.set(index, builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports(com.google.cloud.metastore.v1beta.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.add(value); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - int index, com.google.cloud.metastore.v1beta.MetadataExport value) { - if (metadataExportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataExportsIsMutable(); - metadataExports_.add(index, value); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - com.google.cloud.metastore.v1beta.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMetadataExports( - int index, com.google.cloud.metastore.v1beta.MetadataExport.Builder builderForValue) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.add(index, builderForValue.build()); - onChanged(); - } else { - metadataExportsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllMetadataExports( - java.lang.Iterable values) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metadataExports_); - onChanged(); - } else { - metadataExportsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMetadataExports() { - if (metadataExportsBuilder_ == null) { - metadataExports_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - metadataExportsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeMetadataExports(int index) { - if (metadataExportsBuilder_ == null) { - ensureMetadataExportsIsMutable(); - metadataExports_.remove(index); - onChanged(); - } else { - metadataExportsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataExport.Builder getMetadataExportsBuilder( - int index) { - return getMetadataExportsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataExportOrBuilder getMetadataExportsOrBuilder( - int index) { - if (metadataExportsBuilder_ == null) { - return metadataExports_.get(index); - } else { - return metadataExportsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMetadataExportsOrBuilderList() { - if (metadataExportsBuilder_ != null) { - return metadataExportsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metadataExports_); - } - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataExport.Builder addMetadataExportsBuilder() { - return getMetadataExportsFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1beta.MetadataExport.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataExport.Builder addMetadataExportsBuilder( - int index) { - return getMetadataExportsFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1beta.MetadataExport.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest metadata exports of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMetadataExportsBuilderList() { - return getMetadataExportsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataExport, - com.google.cloud.metastore.v1beta.MetadataExport.Builder, - com.google.cloud.metastore.v1beta.MetadataExportOrBuilder> - getMetadataExportsFieldBuilder() { - if (metadataExportsBuilder_ == null) { - metadataExportsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataExport, - com.google.cloud.metastore.v1beta.MetadataExport.Builder, - com.google.cloud.metastore.v1beta.MetadataExportOrBuilder>( - metadataExports_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - metadataExports_ = null; - } - return metadataExportsBuilder_; - } - - private java.util.List restores_ = - java.util.Collections.emptyList(); - - private void ensureRestoresIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - restores_ = new java.util.ArrayList(restores_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Restore, - com.google.cloud.metastore.v1beta.Restore.Builder, - com.google.cloud.metastore.v1beta.RestoreOrBuilder> - restoresBuilder_; - - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getRestoresList() { - if (restoresBuilder_ == null) { - return java.util.Collections.unmodifiableList(restores_); - } else { - return restoresBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getRestoresCount() { - if (restoresBuilder_ == null) { - return restores_.size(); - } else { - return restoresBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.Restore getRestores(int index) { - if (restoresBuilder_ == null) { - return restores_.get(index); - } else { - return restoresBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRestores(int index, com.google.cloud.metastore.v1beta.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.set(index, value); - onChanged(); - } else { - restoresBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRestores( - int index, com.google.cloud.metastore.v1beta.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.set(index, builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(com.google.cloud.metastore.v1beta.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.add(value); - onChanged(); - } else { - restoresBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(int index, com.google.cloud.metastore.v1beta.Restore value) { - if (restoresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestoresIsMutable(); - restores_.add(index, value); - onChanged(); - } else { - restoresBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores(com.google.cloud.metastore.v1beta.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addRestores( - int index, com.google.cloud.metastore.v1beta.Restore.Builder builderForValue) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.add(index, builderForValue.build()); - onChanged(); - } else { - restoresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllRestores( - java.lang.Iterable values) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restores_); - onChanged(); - } else { - restoresBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearRestores() { - if (restoresBuilder_ == null) { - restores_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - restoresBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeRestores(int index) { - if (restoresBuilder_ == null) { - ensureRestoresIsMutable(); - restores_.remove(index); - onChanged(); - } else { - restoresBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.Restore.Builder getRestoresBuilder(int index) { - return getRestoresFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.RestoreOrBuilder getRestoresOrBuilder(int index) { - if (restoresBuilder_ == null) { - return restores_.get(index); - } else { - return restoresBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getRestoresOrBuilderList() { - if (restoresBuilder_ != null) { - return restoresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(restores_); - } - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.Restore.Builder addRestoresBuilder() { - return getRestoresFieldBuilder() - .addBuilder(com.google.cloud.metastore.v1beta.Restore.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.Restore.Builder addRestoresBuilder(int index) { - return getRestoresFieldBuilder() - .addBuilder(index, com.google.cloud.metastore.v1beta.Restore.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The latest restores of the metastore service.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getRestoresBuilderList() { - return getRestoresFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Restore, - com.google.cloud.metastore.v1beta.Restore.Builder, - com.google.cloud.metastore.v1beta.RestoreOrBuilder> - getRestoresFieldBuilder() { - if (restoresBuilder_ == null) { - restoresBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.Restore, - com.google.cloud.metastore.v1beta.Restore.Builder, - com.google.cloud.metastore.v1beta.RestoreOrBuilder>( - restores_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - restores_ = null; - } - return restoresBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataManagementActivity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataManagementActivity) - private static final com.google.cloud.metastore.v1beta.MetadataManagementActivity - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataManagementActivity(); - } - - public static com.google.cloud.metastore.v1beta.MetadataManagementActivity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataManagementActivity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataManagementActivity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivityOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivityOrBuilder.java deleted file mode 100644 index ed71d2e92782..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivityOrBuilder.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface MetadataManagementActivityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataManagementActivity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getMetadataExportsList(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1beta.MetadataExport getMetadataExports(int index); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getMetadataExportsCount(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getMetadataExportsOrBuilderList(); - /** - * - * - *
-   * Output only. The latest metadata exports of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1beta.MetadataExportOrBuilder getMetadataExportsOrBuilder(int index); - - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getRestoresList(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1beta.Restore getRestores(int index); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getRestoresCount(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getRestoresOrBuilderList(); - /** - * - * - *
-   * Output only. The latest restores of the metastore service.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1beta.RestoreOrBuilder getRestoresOrBuilder(int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreFederationProto.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreFederationProto.java deleted file mode 100644 index a449446e36b5..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreFederationProto.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public final class MetastoreFederationProto { - private MetastoreFederationProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Federation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Federation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_BackendMetastore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_GetFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n8google/cloud/metastore/v1beta/metastor" - + "e_federation.proto\022\035google.cloud.metasto" - + "re.v1beta\032\034google/api/annotations.proto\032" - + "\027google/api/client.proto\032\037google/api/fie" - + "ld_behavior.proto\032\031google/api/resource.p" - + "roto\032#google/longrunning/operations.prot" - + "o\032 google/protobuf/field_mask.proto\032\037goo" - + "gle/protobuf/timestamp.proto\"\273\006\n\nFederat" - + "ion\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030\002 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013" - + "update_time\030\003 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\022E\n\006labels\030\004 \003(\01325.google.clou" - + "d.metastore.v1beta.Federation.LabelsEntr" - + "y\022\024\n\007version\030\005 \001(\tB\003\340A\005\022\\\n\022backend_metas" - + "tores\030\006 \003(\0132@.google.cloud.metastore.v1b" - + "eta.Federation.BackendMetastoresEntry\022\031\n" - + "\014endpoint_uri\030\007 \001(\tB\003\340A\003\022C\n\005state\030\010 \001(\0162" - + "/.google.cloud.metastore.v1beta.Federati" - + "on.StateB\003\340A\003\022\032\n\rstate_message\030\t \001(\tB\003\340A" - + "\003\022\020\n\003uid\030\n \001(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032i\n\026BackendMet" - + "astoresEntry\022\013\n\003key\030\001 \001(\005\022>\n\005value\030\002 \001(\013" - + "2/.google.cloud.metastore.v1beta.Backend" - + "Metastore:\0028\001\"_\n\005State\022\025\n\021STATE_UNSPECIF" - + "IED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UPDAT" - + "ING\020\003\022\014\n\010DELETING\020\004\022\t\n\005ERROR\020\005:j\352Ag\n#met" - + "astore.googleapis.com/Federation\022@projec" - + "ts/{project}/locations/{location}/federa" - + "tions/{federation}\"\316\001\n\020BackendMetastore\022" - + "\014\n\004name\030\001 \001(\t\022U\n\016metastore_type\030\002 \001(\0162=." - + "google.cloud.metastore.v1beta.BackendMet" - + "astore.MetastoreType\"U\n\rMetastoreType\022\036\n" - + "\032METASTORE_TYPE_UNSPECIFIED\020\000\022\014\n\010BIGQUER" - + "Y\020\002\022\026\n\022DATAPROC_METASTORE\020\003\"\262\001\n\026ListFede" - + "rationsRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#" - + "metastore.googleapis.com/Federation\022\026\n\tp" - + "age_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB" - + "\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 " - + "\001(\tB\003\340A\001\"\207\001\n\027ListFederationsResponse\022>\n\013" - + "federations\030\001 \003(\0132).google.cloud.metasto" - + "re.v1beta.Federation\022\027\n\017next_page_token\030" - + "\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Q\n\024GetFederat" - + "ionRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#metast" - + "ore.googleapis.com/Federation\"\317\001\n\027Create" - + "FederationRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A" - + "%\022#metastore.googleapis.com/Federation\022\032" - + "\n\rfederation_id\030\002 \001(\tB\003\340A\002\022B\n\nfederation" - + "\030\003 \001(\0132).google.cloud.metastore.v1beta.F" - + "ederationB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"" - + "\254\001\n\027UpdateFederationRequest\0224\n\013update_ma" - + "sk\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A" - + "\002\022B\n\nfederation\030\002 \001(\0132).google.cloud.met" - + "astore.v1beta.FederationB\003\340A\002\022\027\n\nrequest" - + "_id\030\003 \001(\tB\003\340A\001\"m\n\027DeleteFederationReques" - + "t\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#metastore.googl" - + "eapis.com/Federation\022\027\n\nrequest_id\030\002 \001(\t" - + "B\003\340A\0012\230\n\n\033DataprocMetastoreFederation\022\306\001" - + "\n\017ListFederations\0225.google.cloud.metasto" - + "re.v1beta.ListFederationsRequest\0326.googl" - + "e.cloud.metastore.v1beta.ListFederations" - + "Response\"D\202\323\344\223\0025\0223/v1beta/{parent=projec" - + "ts/*/locations/*}/federations\332A\006parent\022\263" - + "\001\n\rGetFederation\0223.google.cloud.metastor" - + "e.v1beta.GetFederationRequest\032).google.c" - + "loud.metastore.v1beta.Federation\"B\202\323\344\223\0025" - + "\0223/v1beta/{name=projects/*/locations/*/f" - + "ederations/*}\332A\004name\022\225\002\n\020CreateFederatio" - + "n\0226.google.cloud.metastore.v1beta.Create" - + "FederationRequest\032\035.google.longrunning.O" - + "peration\"\251\001\202\323\344\223\002A\"3/v1beta/{parent=proje" - + "cts/*/locations/*}/federations:\nfederati" - + "on\332A\037parent,federation,federation_id\312A=\n" - + "\nFederation\022/google.cloud.metastore.v1be" - + "ta.OperationMetadata\022\227\002\n\020UpdateFederatio" - + "n\0226.google.cloud.metastore.v1beta.Update" - + "FederationRequest\032\035.google.longrunning.O" - + "peration\"\253\001\202\323\344\223\002L2>/v1beta/{federation.n" - + "ame=projects/*/locations/*/federations/*" - + "}:\nfederation\332A\026federation,update_mask\312A" - + "=\n\nFederation\022/google.cloud.metastore.v1" - + "beta.OperationMetadata\022\371\001\n\020DeleteFederat" - + "ion\0226.google.cloud.metastore.v1beta.Dele" - + "teFederationRequest\032\035.google.longrunning" - + ".Operation\"\215\001\202\323\344\223\0025*3/v1beta/{name=proje" - + "cts/*/locations/*/federations/*}\332A\004name\312" - + "AH\n\025google.protobuf.Empty\022/google.cloud." - + "metastore.v1beta.OperationMetadata\032L\312A\030m" - + "etastore.googleapis.com\322A.https://www.go" - + "ogleapis.com/auth/cloud-platformB\200\001\n!com" - + ".google.cloud.metastore.v1betaB\030Metastor" - + "eFederationProtoP\001Z?cloud.google.com/go/" - + "metastore/apiv1beta/metastorepb;metastor" - + "epbb\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_metastore_v1beta_Federation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_metastore_v1beta_Federation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_Federation_descriptor, - new java.lang.String[] { - "Name", - "CreateTime", - "UpdateTime", - "Labels", - "Version", - "BackendMetastores", - "EndpointUri", - "State", - "StateMessage", - "Uid", - }); - internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_descriptor = - internal_static_google_cloud_metastore_v1beta_Federation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_descriptor = - internal_static_google_cloud_metastore_v1beta_Federation_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_metastore_v1beta_BackendMetastore_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor, - new java.lang.String[] { - "Name", "MetastoreType", - }); - internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", "Filter", "OrderBy", - }); - internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor, - new java.lang.String[] { - "Federations", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_metastore_v1beta_GetFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor, - new java.lang.String[] { - "Parent", "FederationId", "Federation", "RequestId", - }); - internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor, - new java.lang.String[] { - "UpdateMask", "Federation", "RequestId", - }); - internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor, - new java.lang.String[] { - "Name", "RequestId", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreProto.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreProto.java deleted file mode 100644 index 2a5f94cf73b0..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreProto.java +++ /dev/null @@ -1,1196 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public final class MetastoreProto { - private MetastoreProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Service_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Service_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Service_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Service_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_MetadataIntegration_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_MetadataIntegration_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_DataplexConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_DataplexConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_DataplexConfig_LakeResourcesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_DataplexConfig_LakeResourcesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Lake_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Lake_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_ConfigOverridesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_ConfigOverridesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_AuxiliaryVersionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_KerberosConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_KerberosConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Secret_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Secret_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_EncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_EncryptionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_ConfigOverridesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_NetworkConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_NetworkConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_TelemetryConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_TelemetryConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_MetadataImport_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_MetadataImport_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_MetadataExport_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_MetadataExport_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Backup_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Backup_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_Restore_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_Restore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ListServicesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ListServicesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ListServicesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ListServicesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_GetServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_GetServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_GetBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_GetBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_OperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_LocationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_LocationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n-google/cloud/metastore/v1beta/metastor" - + "e.proto\022\035google.cloud.metastore.v1beta\032\034" - + "google/api/annotations.proto\032\027google/api" - + "/client.proto\032\037google/api/field_behavior" - + ".proto\032\031google/api/resource.proto\032#googl" - + "e/longrunning/operations.proto\032 google/p" - + "rotobuf/field_mask.proto\032\037google/protobu" - + "f/timestamp.proto\032\036google/protobuf/wrapp" - + "ers.proto\032\033google/type/dayofweek.proto\"\317" - + "\r\n\007Service\022S\n\025hive_metastore_config\030\005 \001(" - + "\01322.google.cloud.metastore.v1beta.HiveMe" - + "tastoreConfigH\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013cr" - + "eate_time\030\002 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\022B\n\006labels\030\004 \003(\01322" - + ".google.cloud.metastore.v1beta.Service.L" - + "abelsEntry\0227\n\007network\030\007 \001(\tB&\340A\005\372A \n\036com" - + "pute.googleapis.com/Network\022\031\n\014endpoint_" - + "uri\030\010 \001(\tB\003\340A\003\022\014\n\004port\030\t \001(\005\022@\n\005state\030\n " - + "\001(\0162,.google.cloud.metastore.v1beta.Serv" - + "ice.StateB\003\340A\003\022\032\n\rstate_message\030\013 \001(\tB\003\340" - + "A\003\022\035\n\020artifact_gcs_uri\030\014 \001(\tB\003\340A\003\0229\n\004tie" - + "r\030\r \001(\0162+.google.cloud.metastore.v1beta." - + "Service.Tier\022P\n\024metadata_integration\030\016 \001" - + "(\01322.google.cloud.metastore.v1beta.Metad" - + "ataIntegration\022L\n\022maintenance_window\030\017 \001" - + "(\01320.google.cloud.metastore.v1beta.Maint" - + "enanceWindow\022\020\n\003uid\030\020 \001(\tB\003\340A\003\022d\n\034metada" - + "ta_management_activity\030\021 \001(\01329.google.cl" - + "oud.metastore.v1beta.MetadataManagementA" - + "ctivityB\003\340A\003\022S\n\017release_channel\030\023 \001(\01625." - + "google.cloud.metastore.v1beta.Service.Re" - + "leaseChannelB\003\340A\005\022O\n\021encryption_config\030\024" - + " \001(\0132/.google.cloud.metastore.v1beta.Enc" - + "ryptionConfigB\003\340A\005\022D\n\016network_config\030\025 \001" - + "(\0132,.google.cloud.metastore.v1beta.Netwo" - + "rkConfig\022O\n\rdatabase_type\030\026 \001(\01623.google" - + ".cloud.metastore.v1beta.Service.Database" - + "TypeB\003\340A\005\022H\n\020telemetry_config\030\027 \001(\0132..go" - + "ogle.cloud.metastore.v1beta.TelemetryCon" - + "fig\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001\"~\n\005State\022\025\n\021STATE_UNSPECIFIED" - + "\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\016\n\nSUSPENDI" - + "NG\020\003\022\r\n\tSUSPENDED\020\004\022\014\n\010UPDATING\020\005\022\014\n\010DEL" - + "ETING\020\006\022\t\n\005ERROR\020\007\";\n\004Tier\022\024\n\020TIER_UNSPE" - + "CIFIED\020\000\022\r\n\tDEVELOPER\020\001\022\016\n\nENTERPRISE\020\003\"" - + "I\n\016ReleaseChannel\022\037\n\033RELEASE_CHANNEL_UNS" - + "PECIFIED\020\000\022\n\n\006CANARY\020\001\022\n\n\006STABLE\020\002\"E\n\014Da" - + "tabaseType\022\035\n\031DATABASE_TYPE_UNSPECIFIED\020" - + "\000\022\t\n\005MYSQL\020\001\022\013\n\007SPANNER\020\002:a\352A^\n metastor" - + "e.googleapis.com/Service\022:projects/{proj" - + "ect}/locations/{location}/services/{serv" - + "ice}B\022\n\020metastore_config\"\254\001\n\023MetadataInt" - + "egration\022M\n\023data_catalog_config\030\001 \001(\01320." - + "google.cloud.metastore.v1beta.DataCatalo" - + "gConfig\022F\n\017dataplex_config\030\002 \001(\0132-.googl" - + "e.cloud.metastore.v1beta.DataplexConfig\"" - + "$\n\021DataCatalogConfig\022\017\n\007enabled\030\002 \001(\010\"\305\001" - + "\n\016DataplexConfig\022X\n\016lake_resources\030\001 \003(\013" - + "2@.google.cloud.metastore.v1beta.Dataple" - + "xConfig.LakeResourcesEntry\032Y\n\022LakeResour" - + "cesEntry\022\013\n\003key\030\001 \001(\t\0222\n\005value\030\002 \001(\0132#.g" - + "oogle.cloud.metastore.v1beta.Lake:\0028\001\"7\n" - + "\004Lake\022/\n\004name\030\001 \001(\tB!\372A\036\n\034dataplex.googl" - + "eapis.com/Lake\"r\n\021MaintenanceWindow\0220\n\013h" - + "our_of_day\030\001 \001(\0132\033.google.protobuf.Int32" - + "Value\022+\n\013day_of_week\030\002 \001(\0162\026.google.type" - + ".DayOfWeek\"\223\005\n\023HiveMetastoreConfig\022\024\n\007ve" - + "rsion\030\001 \001(\tB\003\340A\005\022a\n\020config_overrides\030\002 \003" - + "(\0132G.google.cloud.metastore.v1beta.HiveM" - + "etastoreConfig.ConfigOverridesEntry\022F\n\017k" - + "erberos_config\030\003 \001(\0132-.google.cloud.meta" - + "store.v1beta.KerberosConfig\022^\n\021endpoint_" - + "protocol\030\004 \001(\0162C.google.cloud.metastore." - + "v1beta.HiveMetastoreConfig.EndpointProto" - + "col\022e\n\022auxiliary_versions\030\005 \003(\0132I.google" - + ".cloud.metastore.v1beta.HiveMetastoreCon" - + "fig.AuxiliaryVersionsEntry\0326\n\024ConfigOver" - + "ridesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - + "8\001\032o\n\026AuxiliaryVersionsEntry\022\013\n\003key\030\001 \001(" - + "\t\022D\n\005value\030\002 \001(\01325.google.cloud.metastor" - + "e.v1beta.AuxiliaryVersionConfig:\0028\001\"K\n\020E" - + "ndpointProtocol\022!\n\035ENDPOINT_PROTOCOL_UNS" - + "PECIFIED\020\000\022\n\n\006THRIFT\020\001\022\010\n\004GRPC\020\002\"w\n\016Kerb" - + "erosConfig\0225\n\006keytab\030\001 \001(\0132%.google.clou" - + "d.metastore.v1beta.Secret\022\021\n\tprincipal\030\002" - + " \001(\t\022\033\n\023krb5_config_gcs_uri\030\003 \001(\t\")\n\006Sec" - + "ret\022\026\n\014cloud_secret\030\002 \001(\tH\000B\007\n\005value\"#\n\020" - + "EncryptionConfig\022\017\n\007kms_key\030\001 \001(\t\"\222\002\n\026Au" - + "xiliaryVersionConfig\022\017\n\007version\030\001 \001(\t\022d\n" - + "\020config_overrides\030\002 \003(\0132J.google.cloud.m" - + "etastore.v1beta.AuxiliaryVersionConfig.C" - + "onfigOverridesEntry\022I\n\016network_config\030\003 " - + "\001(\0132,.google.cloud.metastore.v1beta.Netw" - + "orkConfigB\003\340A\003\0326\n\024ConfigOverridesEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\326\001\n\rNetwo" - + "rkConfig\022M\n\tconsumers\030\001 \003(\01325.google.clo" - + "ud.metastore.v1beta.NetworkConfig.Consum" - + "erB\003\340A\005\032v\n\010Consumer\022?\n\nsubnetwork\030\001 \001(\tB" - + ")\340A\005\372A#\n!compute.googleapis.com/Subnetwo" - + "rkH\000\022\031\n\014endpoint_uri\030\003 \001(\tB\003\340A\003B\016\n\014vpc_r" - + "esource\"\236\001\n\017TelemetryConfig\022L\n\nlog_forma" - + "t\030\001 \001(\01628.google.cloud.metastore.v1beta." - + "TelemetryConfig.LogFormat\"=\n\tLogFormat\022\032" - + "\n\026LOG_FORMAT_UNSPECIFIED\020\000\022\n\n\006LEGACY\020\001\022\010" - + "\n\004JSON\020\002\"\251\001\n\032MetadataManagementActivity\022" - + "L\n\020metadata_exports\030\001 \003(\0132-.google.cloud" - + ".metastore.v1beta.MetadataExportB\003\340A\003\022=\n" - + "\010restores\030\002 \003(\0132&.google.cloud.metastore" - + ".v1beta.RestoreB\003\340A\003\"\220\007\n\016MetadataImport\022" - + "X\n\rdatabase_dump\030\006 \001(\0132:.google.cloud.me" - + "tastore.v1beta.MetadataImport.DatabaseDu" - + "mpB\003\340A\005H\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\023\n\013descript" - + "ion\030\002 \001(\t\0224\n\013create_time\030\003 \001(\0132\032.google." - + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\004" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" - + "\010end_time\030\007 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\022G\n\005state\030\005 \001(\01623.google.cloud.m" - + "etastore.v1beta.MetadataImport.StateB\003\340A" - + "\003\032\243\002\n\014DatabaseDump\022b\n\rdatabase_type\030\001 \001(" - + "\0162G.google.cloud.metastore.v1beta.Metada" - + "taImport.DatabaseDump.DatabaseTypeB\002\030\001\022\017" - + "\n\007gcs_uri\030\002 \001(\t\022\033\n\017source_database\030\003 \001(\t" - + "B\002\030\001\022G\n\004type\030\004 \001(\01624.google.cloud.metast" - + "ore.v1beta.DatabaseDumpSpec.TypeB\003\340A\001\"8\n" - + "\014DatabaseType\022\035\n\031DATABASE_TYPE_UNSPECIFI" - + "ED\020\000\022\t\n\005MYSQL\020\001\"T\n\005State\022\025\n\021STATE_UNSPEC" - + "IFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002\022\014\n\010U" - + "PDATING\020\003\022\n\n\006FAILED\020\004:\213\001\352A\207\001\n\'metastore." - + "googleapis.com/MetadataImport\022\\projects/" - + "{project}/locations/{location}/services/" - + "{service}/metadataImports/{metadata_impo" - + "rt}B\n\n\010metadata\"\242\003\n\016MetadataExport\022\"\n\023de" - + "stination_gcs_uri\030\004 \001(\tB\003\340A\003H\000\0223\n\nstart_" - + "time\030\001 \001(\0132\032.google.protobuf.TimestampB\003" - + "\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\022G\n\005state\030\003 \001(\01623.google.c" - + "loud.metastore.v1beta.MetadataExport.Sta" - + "teB\003\340A\003\022U\n\022database_dump_type\030\005 \001(\01624.go" - + "ogle.cloud.metastore.v1beta.DatabaseDump" - + "Spec.TypeB\003\340A\003\"U\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FA" - + "ILED\020\003\022\r\n\tCANCELLED\020\004B\r\n\013destination\"\230\004\n" - + "\006Backup\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_tim" - + "e\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\0221\n\010end_time\030\003 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\022?\n\005state\030\004 \001(\0162+.google.clou" - + "d.metastore.v1beta.Backup.StateB\003\340A\003\022E\n\020" - + "service_revision\030\005 \001(\0132&.google.cloud.me" - + "tastore.v1beta.ServiceB\003\340A\003\022\023\n\013descripti" - + "on\030\006 \001(\t\022\037\n\022restoring_services\030\007 \003(\tB\003\340A" - + "\003\"a\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CRE" - + "ATING\020\001\022\014\n\010DELETING\020\002\022\n\n\006ACTIVE\020\003\022\n\n\006FAI" - + "LED\020\004\022\r\n\tRESTORING\020\005:q\352An\n\037metastore.goo" - + "gleapis.com/Backup\022Kprojects/{project}/l" - + "ocations/{location}/services/{service}/b" - + "ackups/{backup}\"\352\003\n\007Restore\0223\n\nstart_tim" - + "e\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\0221\n\010end_time\030\002 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\022@\n\005state\030\003 \001(\0162,.google.clou" - + "d.metastore.v1beta.Restore.StateB\003\340A\003\0227\n" - + "\006backup\030\004 \001(\tB\'\340A\003\372A!\n\037metastore.googlea" - + "pis.com/Backup\022E\n\004type\030\005 \001(\01622.google.cl" - + "oud.metastore.v1beta.Restore.RestoreType" - + "B\003\340A\003\022\024\n\007details\030\006 \001(\tB\003\340A\003\"U\n\005State\022\025\n\021" - + "STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCC" - + "EEDED\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED\020\004\"H\n\013Re" - + "storeType\022\034\n\030RESTORE_TYPE_UNSPECIFIED\020\000\022" - + "\010\n\004FULL\020\001\022\021\n\rMETADATA_ONLY\020\002\"\254\001\n\023ListSer" - + "vicesRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 me" - + "tastore.googleapis.com/Service\022\026\n\tpage_s" - + "ize\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022" - + "\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003" - + "\340A\001\"~\n\024ListServicesResponse\0228\n\010services\030" - + "\001 \003(\0132&.google.cloud.metastore.v1beta.Se" - + "rvice\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreac" - + "hable\030\003 \003(\t\"K\n\021GetServiceRequest\0226\n\004name" - + "\030\001 \001(\tB(\340A\002\372A\"\n metastore.googleapis.com" - + "/Service\"\300\001\n\024CreateServiceRequest\0228\n\006par" - + "ent\030\001 \001(\tB(\340A\002\372A\"\022 metastore.googleapis." - + "com/Service\022\027\n\nservice_id\030\002 \001(\tB\003\340A\002\022<\n\007" - + "service\030\003 \001(\0132&.google.cloud.metastore.v" - + "1beta.ServiceB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003" - + "\340A\001\"\243\001\n\024UpdateServiceRequest\0224\n\013update_m" - + "ask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340" - + "A\002\022<\n\007service\030\002 \001(\0132&.google.cloud.metas" - + "tore.v1beta.ServiceB\003\340A\002\022\027\n\nrequest_id\030\003" - + " \001(\tB\003\340A\001\"g\n\024DeleteServiceRequest\0226\n\004nam" - + "e\030\001 \001(\tB(\340A\002\372A\"\n metastore.googleapis.co" - + "m/Service\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\272\001\n\032L" - + "istMetadataImportsRequest\022?\n\006parent\030\001 \001(" - + "\tB/\340A\002\372A)\022\'metastore.googleapis.com/Meta" - + "dataImport\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npa" - + "ge_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001" - + "\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\224\001\n\033ListMetadata" - + "ImportsResponse\022G\n\020metadata_imports\030\001 \003(" - + "\0132-.google.cloud.metastore.v1beta.Metada" - + "taImport\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unr" - + "eachable\030\003 \003(\t\"Y\n\030GetMetadataImportReque" - + "st\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'metastore.goog" - + "leapis.com/MetadataImport\"\345\001\n\033CreateMeta" - + "dataImportRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372A" - + ")\022\'metastore.googleapis.com/MetadataImpo" - + "rt\022\037\n\022metadata_import_id\030\002 \001(\tB\003\340A\002\022K\n\017m" - + "etadata_import\030\003 \001(\0132-.google.cloud.meta" - + "store.v1beta.MetadataImportB\003\340A\002\022\027\n\nrequ" - + "est_id\030\004 \001(\tB\003\340A\001\"\271\001\n\033UpdateMetadataImpo" - + "rtRequest\0224\n\013update_mask\030\001 \001(\0132\032.google." - + "protobuf.FieldMaskB\003\340A\002\022K\n\017metadata_impo" - + "rt\030\002 \001(\0132-.google.cloud.metastore.v1beta" - + ".MetadataImportB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\t" - + "B\003\340A\001\"\252\001\n\022ListBackupsRequest\0227\n\006parent\030\001" - + " \001(\tB\'\340A\002\372A!\022\037metastore.googleapis.com/B" - + "ackup\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_to" - + "ken\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010o" - + "rder_by\030\005 \001(\tB\003\340A\001\"{\n\023ListBackupsRespons" - + "e\0226\n\007backups\030\001 \003(\0132%.google.cloud.metast" - + "ore.v1beta.Backup\022\027\n\017next_page_token\030\002 \001" - + "(\t\022\023\n\013unreachable\030\003 \003(\t\"I\n\020GetBackupRequ" - + "est\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037metastore.goo" - + "gleapis.com/Backup\"\273\001\n\023CreateBackupReque" - + "st\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037metastore.go" - + "ogleapis.com/Backup\022\026\n\tbackup_id\030\002 \001(\tB\003" - + "\340A\002\022:\n\006backup\030\003 \001(\0132%.google.cloud.metas" - + "tore.v1beta.BackupB\003\340A\002\022\027\n\nrequest_id\030\004 " - + "\001(\tB\003\340A\001\"e\n\023DeleteBackupRequest\0225\n\004name\030" - + "\001 \001(\tB\'\340A\002\372A!\n\037metastore.googleapis.com/" - + "Backup\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\363\001\n\025Expo" - + "rtMetadataRequest\022 \n\026destination_gcs_fol" - + "der\030\002 \001(\tH\000\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n me" - + "tastore.googleapis.com/Service\022\027\n\nreques" - + "t_id\030\003 \001(\tB\003\340A\001\022U\n\022database_dump_type\030\004 " - + "\001(\01624.google.cloud.metastore.v1beta.Data" - + "baseDumpSpec.TypeB\003\340A\001B\r\n\013destination\"\363\001" - + "\n\025RestoreServiceRequest\0229\n\007service\030\001 \001(\t" - + "B(\340A\002\372A\"\n metastore.googleapis.com/Servi" - + "ce\0227\n\006backup\030\002 \001(\tB\'\340A\002\372A!\n\037metastore.go" - + "ogleapis.com/Backup\022M\n\014restore_type\030\003 \001(" - + "\01622.google.cloud.metastore.v1beta.Restor" - + "e.RestoreTypeB\003\340A\001\022\027\n\nrequest_id\030\004 \001(\tB\003" - + "\340A\001\"\200\002\n\021OperationMetadata\0224\n\013create_time" - + "\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" - + "1\n\010end_time\030\002 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030" - + "\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022" - + "#\n\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013" - + "api_version\030\007 \001(\tB\003\340A\003\"\300\001\n\020LocationMetad" - + "ata\022o\n!supported_hive_metastore_versions" - + "\030\001 \003(\0132D.google.cloud.metastore.v1beta.L" - + "ocationMetadata.HiveMetastoreVersion\032;\n\024" - + "HiveMetastoreVersion\022\017\n\007version\030\001 \001(\t\022\022\n" - + "\nis_default\030\002 \001(\010\"E\n\020DatabaseDumpSpec\"1\n" - + "\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005MYSQL\020\001\022\010" - + "\n\004AVRO\020\002\"P\n\026RemoveIamPolicyRequest\022\033\n\010re" - + "source\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022\031\n\014asynchronous\030" - + "\002 \001(\010B\003\340A\001\"*\n\027RemoveIamPolicyResponse\022\017\n" - + "\007success\030\001 \001(\010\"e\n\024QueryMetadataRequest\0229" - + "\n\007service\030\001 \001(\tB(\340A\002\372A\"\n metastore.googl" - + "eapis.com/Service\022\022\n\005query\030\002 \001(\tB\003\340A\002\"4\n" - + "\025QueryMetadataResponse\022\033\n\023result_manifes" - + "t_uri\030\001 \001(\t\"\250\001\n\032MoveTableToDatabaseReque" - + "st\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n metastore.g" - + "oogleapis.com/Service\022\027\n\ntable_name\030\002 \001(" - + "\tB\003\340A\002\022\024\n\007db_name\030\003 \001(\tB\003\340A\002\022 \n\023destinat" - + "ion_db_name\030\004 \001(\tB\003\340A\002\"\035\n\033MoveTableToDat" - + "abaseResponse\"\230\001\n$AlterMetadataResourceL" - + "ocationRequest\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n" - + " metastore.googleapis.com/Service\022\032\n\rres" - + "ource_name\030\002 \001(\tB\003\340A\002\022\031\n\014location_uri\030\003 " - + "\001(\tB\003\340A\002\"\'\n%AlterMetadataResourceLocatio" - + "nResponse2\217%\n\021DataprocMetastore\022\272\001\n\014List" - + "Services\0222.google.cloud.metastore.v1beta" - + ".ListServicesRequest\0323.google.cloud.meta" - + "store.v1beta.ListServicesResponse\"A\202\323\344\223\002" - + "2\0220/v1beta/{parent=projects/*/locations/" - + "*}/services\332A\006parent\022\247\001\n\nGetService\0220.go" - + "ogle.cloud.metastore.v1beta.GetServiceRe" - + "quest\032&.google.cloud.metastore.v1beta.Se" - + "rvice\"?\202\323\344\223\0022\0220/v1beta/{name=projects/*/" - + "locations/*/services/*}\332A\004name\022\200\002\n\rCreat" - + "eService\0223.google.cloud.metastore.v1beta" - + ".CreateServiceRequest\032\035.google.longrunni" - + "ng.Operation\"\232\001\202\323\344\223\002;\"0/v1beta/{parent=p" - + "rojects/*/locations/*}/services:\007service" - + "\332A\031parent,service,service_id\312A:\n\007Service" - + "\022/google.cloud.metastore.v1beta.Operatio" - + "nMetadata\022\202\002\n\rUpdateService\0223.google.clo" - + "ud.metastore.v1beta.UpdateServiceRequest" - + "\032\035.google.longrunning.Operation\"\234\001\202\323\344\223\002C" - + "28/v1beta/{service.name=projects/*/locat" - + "ions/*/services/*}:\007service\332A\023service,up" - + "date_mask\312A:\n\007Service\022/google.cloud.meta" - + "store.v1beta.OperationMetadata\022\360\001\n\rDelet" - + "eService\0223.google.cloud.metastore.v1beta" - + ".DeleteServiceRequest\032\035.google.longrunni" - + "ng.Operation\"\212\001\202\323\344\223\0022*0/v1beta/{name=pro" - + "jects/*/locations/*/services/*}\332A\004name\312A" - + "H\n\025google.protobuf.Empty\022/google.cloud.m" - + "etastore.v1beta.OperationMetadata\022\341\001\n\023Li" - + "stMetadataImports\0229.google.cloud.metasto" - + "re.v1beta.ListMetadataImportsRequest\032:.g" - + "oogle.cloud.metastore.v1beta.ListMetadat" - + "aImportsResponse\"S\202\323\344\223\002D\022B/v1beta/{paren" - + "t=projects/*/locations/*/services/*}/met" - + "adataImports\332A\006parent\022\316\001\n\021GetMetadataImp" - + "ort\0227.google.cloud.metastore.v1beta.GetM" - + "etadataImportRequest\032-.google.cloud.meta" - + "store.v1beta.MetadataImport\"Q\202\323\344\223\002D\022B/v1" - + "beta/{name=projects/*/locations/*/servic" - + "es/*/metadataImports/*}\332A\004name\022\277\002\n\024Creat" - + "eMetadataImport\022:.google.cloud.metastore" - + ".v1beta.CreateMetadataImportRequest\032\035.go" - + "ogle.longrunning.Operation\"\313\001\202\323\344\223\002U\"B/v1" - + "beta/{parent=projects/*/locations/*/serv" - + "ices/*}/metadataImports:\017metadata_import" - + "\332A)parent,metadata_import,metadata_impor" - + "t_id\312AA\n\016MetadataImport\022/google.cloud.me" - + "tastore.v1beta.OperationMetadata\022\301\002\n\024Upd" - + "ateMetadataImport\022:.google.cloud.metasto" - + "re.v1beta.UpdateMetadataImportRequest\032\035." - + "google.longrunning.Operation\"\315\001\202\323\344\223\002e2R/" - + "v1beta/{metadata_import.name=projects/*/" - + "locations/*/services/*/metadataImports/*" - + "}:\017metadata_import\332A\033metadata_import,upd" - + "ate_mask\312AA\n\016MetadataImport\022/google.clou" - + "d.metastore.v1beta.OperationMetadata\022\371\001\n" - + "\016ExportMetadata\0224.google.cloud.metastore" - + ".v1beta.ExportMetadataRequest\032\035.google.l" - + "ongrunning.Operation\"\221\001\202\323\344\223\002G\"B/v1beta/{" - + "service=projects/*/locations/*/services/" - + "*}:exportMetadata:\001*\312AA\n\016MetadataExport\022" - + "/google.cloud.metastore.v1beta.Operation" - + "Metadata\022\374\001\n\016RestoreService\0224.google.clo" - + "ud.metastore.v1beta.RestoreServiceReques" - + "t\032\035.google.longrunning.Operation\"\224\001\202\323\344\223\002" - + "@\";/v1beta/{service=projects/*/locations" - + "/*/services/*}:restore:\001*\332A\016service,back" - + "up\312A:\n\007Restore\022/google.cloud.metastore.v" - + "1beta.OperationMetadata\022\301\001\n\013ListBackups\022" - + "1.google.cloud.metastore.v1beta.ListBack" - + "upsRequest\0322.google.cloud.metastore.v1be" - + "ta.ListBackupsResponse\"K\202\323\344\223\002<\022:/v1beta/" - + "{parent=projects/*/locations/*/services/" - + "*}/backups\332A\006parent\022\256\001\n\tGetBackup\022/.goog" - + "le.cloud.metastore.v1beta.GetBackupReque" - + "st\032%.google.cloud.metastore.v1beta.Backu" - + "p\"I\202\323\344\223\002<\022:/v1beta/{name=projects/*/loca" - + "tions/*/services/*/backups/*}\332A\004name\022\204\002\n" - + "\014CreateBackup\0222.google.cloud.metastore.v" - + "1beta.CreateBackupRequest\032\035.google.longr" - + "unning.Operation\"\240\001\202\323\344\223\002D\":/v1beta/{pare" - + "nt=projects/*/locations/*/services/*}/ba" - + "ckups:\006backup\332A\027parent,backup,backup_id\312" - + "A9\n\006Backup\022/google.cloud.metastore.v1bet" - + "a.OperationMetadata\022\370\001\n\014DeleteBackup\0222.g" - + "oogle.cloud.metastore.v1beta.DeleteBacku" - + "pRequest\032\035.google.longrunning.Operation\"" - + "\224\001\202\323\344\223\002<*:/v1beta/{name=projects/*/locat" - + "ions/*/services/*/backups/*}\332A\004name\312AH\n\025" - + "google.protobuf.Empty\022/google.cloud.meta" - + "store.v1beta.OperationMetadata\022\324\001\n\017Remov" - + "eIamPolicy\0225.google.cloud.metastore.v1be" - + "ta.RemoveIamPolicyRequest\0326.google.cloud" - + ".metastore.v1beta.RemoveIamPolicyRespons" - + "e\"R\202\323\344\223\002L\"G/v1beta/{resource=projects/*/" - + "locations/*/services/*/**}:removeIamPoli" - + "cy:\001*\022\375\001\n\rQueryMetadata\0223.google.cloud.m" - + "etastore.v1beta.QueryMetadataRequest\032\035.g" - + "oogle.longrunning.Operation\"\227\001\202\323\344\223\002F\"A/v" - + "1beta/{service=projects/*/locations/*/se" - + "rvices/*}:queryMetadata:\001*\312AH\n\025QueryMeta" - + "dataResponse\022/google.cloud.metastore.v1b" - + "eta.OperationMetadata\022\225\002\n\023MoveTableToDat" - + "abase\0229.google.cloud.metastore.v1beta.Mo" - + "veTableToDatabaseRequest\032\035.google.longru" - + "nning.Operation\"\243\001\202\323\344\223\002L\"G/v1beta/{servi" - + "ce=projects/*/locations/*/services/*}:mo" - + "veTableToDatabase:\001*\312AN\n\033MoveTableToData" - + "baseResponse\022/google.cloud.metastore.v1b" - + "eta.OperationMetadata\022\255\002\n\035AlterMetadataR" - + "esourceLocation\022C.google.cloud.metastore" - + ".v1beta.AlterMetadataResourceLocationReq" - + "uest\032\035.google.longrunning.Operation\"\247\001\202\323" - + "\344\223\002F\"A/v1beta/{service=projects/*/locati" - + "ons/*/services/*}:alterLocation:\001*\312AX\n%A" - + "lterMetadataResourceLocationResponse\022/go" - + "ogle.cloud.metastore.v1beta.OperationMet" - + "adata\032L\312A\030metastore.googleapis.com\322A.htt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "ormB\242\003\n!com.google.cloud.metastore.v1bet" - + "aB\016MetastoreProtoP\001Z?cloud.google.com/go" - + "/metastore/apiv1beta/metastorepb;metasto" - + "repb\312\002\035Google\\Cloud\\Metastore\\V1beta\352AN\n" - + "\036compute.googleapis.com/Network\022,project" - + "s/{project}/global/networks/{network}\352Aa" - + "\n!compute.googleapis.com/Subnetwork\022 - * Request message for - * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase]. - * - * - * Protobuf type {@code google.cloud.metastore.v1beta.MoveTableToDatabaseRequest} - */ -public final class MoveTableToDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) - MoveTableToDatabaseRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use MoveTableToDatabaseRequest.newBuilder() to construct. - private MoveTableToDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MoveTableToDatabaseRequest() { - service_ = ""; - tableName_ = ""; - dbName_ = ""; - destinationDbName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveTableToDatabaseRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.class, - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object tableName_ = ""; - /** - * - * - *
-   * Required. The name of the table to be moved.
-   * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The tableName. - */ - @java.lang.Override - public java.lang.String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the table to be moved.
-   * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for tableName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DB_NAME_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object dbName_ = ""; - /** - * - * - *
-   * Required. The name of the database where the table resides.
-   * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dbName. - */ - @java.lang.Override - public java.lang.String getDbName() { - java.lang.Object ref = dbName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dbName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the database where the table resides.
-   * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dbName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDbNameBytes() { - java.lang.Object ref = dbName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dbName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESTINATION_DB_NAME_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object destinationDbName_ = ""; - /** - * - * - *
-   * Required. The name of the database where the table should be moved.
-   * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The destinationDbName. - */ - @java.lang.Override - public java.lang.String getDestinationDbName() { - java.lang.Object ref = destinationDbName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationDbName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the database where the table should be moved.
-   * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for destinationDbName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDestinationDbNameBytes() { - java.lang.Object ref = destinationDbName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - destinationDbName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dbName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationDbName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destinationDbName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dbName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationDbName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destinationDbName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest other = - (com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getTableName().equals(other.getTableName())) return false; - if (!getDbName().equals(other.getDbName())) return false; - if (!getDestinationDbName().equals(other.getDestinationDbName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getTableName().hashCode(); - hash = (37 * hash) + DB_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDbName().hashCode(); - hash = (37 * hash) + DESTINATION_DB_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDestinationDbName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MoveTableToDatabaseRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.class, - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - tableName_ = ""; - dbName_ = ""; - destinationDbName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest build() { - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest buildPartial() { - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest result = - new com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.tableName_ = tableName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.dbName_ = dbName_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.destinationDbName_ = destinationDbName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest other) { - if (other - == com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getTableName().isEmpty()) { - tableName_ = other.tableName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDbName().isEmpty()) { - dbName_ = other.dbName_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getDestinationDbName().isEmpty()) { - destinationDbName_ = other.destinationDbName_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - tableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - dbName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - destinationDbName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to mutate
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object tableName_ = ""; - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The tableName. - */ - public java.lang.String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for tableName. - */ - public com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The tableName to set. - * @return This builder for chaining. - */ - public Builder setTableName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - tableName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTableName() { - tableName_ = getDefaultInstance().getTableName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the table to be moved.
-     * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for tableName to set. - * @return This builder for chaining. - */ - public Builder setTableNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - tableName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object dbName_ = ""; - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dbName. - */ - public java.lang.String getDbName() { - java.lang.Object ref = dbName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dbName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dbName. - */ - public com.google.protobuf.ByteString getDbNameBytes() { - java.lang.Object ref = dbName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dbName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The dbName to set. - * @return This builder for chaining. - */ - public Builder setDbName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - dbName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDbName() { - dbName_ = getDefaultInstance().getDbName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the database where the table resides.
-     * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for dbName to set. - * @return This builder for chaining. - */ - public Builder setDbNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - dbName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object destinationDbName_ = ""; - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The destinationDbName. - */ - public java.lang.String getDestinationDbName() { - java.lang.Object ref = destinationDbName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationDbName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for destinationDbName. - */ - public com.google.protobuf.ByteString getDestinationDbNameBytes() { - java.lang.Object ref = destinationDbName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - destinationDbName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The destinationDbName to set. - * @return This builder for chaining. - */ - public Builder setDestinationDbName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationDbName_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDestinationDbName() { - destinationDbName_ = getDefaultInstance().getDestinationDbName(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the database where the table should be moved.
-     * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for destinationDbName to set. - * @return This builder for chaining. - */ - public Builder setDestinationDbNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - destinationDbName_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) - private static final com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest(); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MoveTableToDatabaseRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseRequestOrBuilder.java deleted file mode 100644 index adb7ded6f20c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseRequestOrBuilder.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface MoveTableToDatabaseRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to mutate
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Required. The name of the table to be moved.
-   * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The tableName. - */ - java.lang.String getTableName(); - /** - * - * - *
-   * Required. The name of the table to be moved.
-   * 
- * - * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for tableName. - */ - com.google.protobuf.ByteString getTableNameBytes(); - - /** - * - * - *
-   * Required. The name of the database where the table resides.
-   * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The dbName. - */ - java.lang.String getDbName(); - /** - * - * - *
-   * Required. The name of the database where the table resides.
-   * 
- * - * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for dbName. - */ - com.google.protobuf.ByteString getDbNameBytes(); - - /** - * - * - *
-   * Required. The name of the database where the table should be moved.
-   * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The destinationDbName. - */ - java.lang.String getDestinationDbName(); - /** - * - * - *
-   * Required. The name of the database where the table should be moved.
-   * 
- * - * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for destinationDbName. - */ - com.google.protobuf.ByteString getDestinationDbNameBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponse.java deleted file mode 100644 index be68385f4fbf..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponse.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MoveTableToDatabaseResponse} - */ -public final class MoveTableToDatabaseResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) - MoveTableToDatabaseResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use MoveTableToDatabaseResponse.newBuilder() to construct. - private MoveTableToDatabaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MoveTableToDatabaseResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveTableToDatabaseResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.class, - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse other = - (com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.MoveTableToDatabaseResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.class, - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse build() { - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse buildPartial() { - com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse result = - new com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) { - return mergeFrom((com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse other) { - if (other - == com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) - private static final com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse(); - } - - public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MoveTableToDatabaseResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponseOrBuilder.java deleted file mode 100644 index ba13e26136e2..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponseOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface MoveTableToDatabaseResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfig.java deleted file mode 100644 index c0383b1cb52a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfig.java +++ /dev/null @@ -1,2132 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Network configuration for the Dataproc Metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.NetworkConfig} - */ -public final class NetworkConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.NetworkConfig) - NetworkConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use NetworkConfig.newBuilder() to construct. - private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NetworkConfig() { - consumers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NetworkConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.NetworkConfig.class, - com.google.cloud.metastore.v1beta.NetworkConfig.Builder.class); - } - - public interface ConsumerOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.NetworkConfig.Consumer) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - boolean hasSubnetwork(); - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - java.lang.String getSubnetwork(); - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - com.google.protobuf.ByteString getSubnetworkBytes(); - - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore
-     * service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore
-     * service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.VpcResourceCase - getVpcResourceCase(); - } - /** - * - * - *
-   * Contains information of the customer's network configurations.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.NetworkConfig.Consumer} - */ - public static final class Consumer extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.NetworkConfig.Consumer) - ConsumerOrBuilder { - private static final long serialVersionUID = 0L; - // Use Consumer.newBuilder() to construct. - private Consumer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Consumer() { - endpointUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Consumer(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.class, - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder.class); - } - - private int vpcResourceCase_ = 0; - private java.lang.Object vpcResource_; - - public enum VpcResourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SUBNETWORK(1), - VPCRESOURCE_NOT_SET(0); - private final int value; - - private VpcResourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VpcResourceCase valueOf(int value) { - return forNumber(value); - } - - public static VpcResourceCase forNumber(int value) { - switch (value) { - case 1: - return SUBNETWORK; - case 0: - return VPCRESOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VpcResourceCase getVpcResourceCase() { - return VpcResourceCase.forNumber(vpcResourceCase_); - } - - public static final int SUBNETWORK_FIELD_NUMBER = 1; - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - public boolean hasSubnetwork() { - return vpcResourceCase_ == 1; - } - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - public java.lang.String getSubnetwork() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (vpcResourceCase_ == 1) { - vpcResource_ = s; - } - return s; - } - } - /** - * - * - *
-     * Immutable. The subnetwork of the customer project from which an IP
-     * address is reserved and used as the Dataproc Metastore service's
-     * endpoint. It is accessible to hosts in the subnet and to all
-     * hosts in a subnet in the same region and same network. There must
-     * be at least one IP address available in the subnet's primary range. The
-     * subnet is specified in the following form:
-     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-     * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - public com.google.protobuf.ByteString getSubnetworkBytes() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (vpcResourceCase_ == 1) { - vpcResource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore
-     * service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore
-     * service.
-     * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (vpcResourceCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vpcResource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (vpcResourceCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vpcResource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.NetworkConfig.Consumer)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer other = - (com.google.cloud.metastore.v1beta.NetworkConfig.Consumer) obj; - - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (!getVpcResourceCase().equals(other.getVpcResourceCase())) return false; - switch (vpcResourceCase_) { - case 1: - if (!getSubnetwork().equals(other.getSubnetwork())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - switch (vpcResourceCase_) { - case 1: - hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; - hash = (53 * hash) + getSubnetwork().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Contains information of the customer's network configurations.
-     * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.NetworkConfig.Consumer} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.NetworkConfig.Consumer) - com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.class, - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpointUri_ = ""; - vpcResourceCase_ = 0; - vpcResource_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer build() { - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer buildPartial() { - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer result = - new com.google.cloud.metastore.v1beta.NetworkConfig.Consumer(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.NetworkConfig.Consumer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endpointUri_ = endpointUri_; - } - } - - private void buildPartialOneofs( - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer result) { - result.vpcResourceCase_ = vpcResourceCase_; - result.vpcResource_ = this.vpcResource_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.NetworkConfig.Consumer) { - return mergeFrom((com.google.cloud.metastore.v1beta.NetworkConfig.Consumer) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.NetworkConfig.Consumer other) { - if (other == com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.getDefaultInstance()) - return this; - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - switch (other.getVpcResourceCase()) { - case SUBNETWORK: - { - vpcResourceCase_ = 1; - vpcResource_ = other.vpcResource_; - onChanged(); - break; - } - case VPCRESOURCE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - vpcResourceCase_ = 1; - vpcResource_ = s; - break; - } // case 10 - case 26: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int vpcResourceCase_ = 0; - private java.lang.Object vpcResource_; - - public VpcResourceCase getVpcResourceCase() { - return VpcResourceCase.forNumber(vpcResourceCase_); - } - - public Builder clearVpcResource() { - vpcResourceCase_ = 0; - vpcResource_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return Whether the subnetwork field is set. - */ - @java.lang.Override - public boolean hasSubnetwork() { - return vpcResourceCase_ == 1; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The subnetwork. - */ - @java.lang.Override - public java.lang.String getSubnetwork() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (vpcResourceCase_ == 1) { - vpcResource_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for subnetwork. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSubnetworkBytes() { - java.lang.Object ref = ""; - if (vpcResourceCase_ == 1) { - ref = vpcResource_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (vpcResourceCase_ == 1) { - vpcResource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The subnetwork to set. - * @return This builder for chaining. - */ - public Builder setSubnetwork(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - vpcResourceCase_ = 1; - vpcResource_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearSubnetwork() { - if (vpcResourceCase_ == 1) { - vpcResourceCase_ = 0; - vpcResource_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-       * Immutable. The subnetwork of the customer project from which an IP
-       * address is reserved and used as the Dataproc Metastore service's
-       * endpoint. It is accessible to hosts in the subnet and to all
-       * hosts in a subnet in the same region and same network. There must
-       * be at least one IP address available in the subnet's primary range. The
-       * subnet is specified in the following form:
-       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
-       * 
- * - * - * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for subnetwork to set. - * @return This builder for chaining. - */ - public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - vpcResourceCase_ = 1; - vpcResource_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The URI of the endpoint used to access the metastore
-       * service.
-       * 
- * - * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.NetworkConfig.Consumer) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.NetworkConfig.Consumer) - private static final com.google.cloud.metastore.v1beta.NetworkConfig.Consumer DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.NetworkConfig.Consumer(); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Consumer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int CONSUMERS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List consumers_; - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public java.util.List - getConsumersList() { - return consumers_; - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public java.util.List - getConsumersOrBuilderList() { - return consumers_; - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public int getConsumersCount() { - return consumers_.size(); - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getConsumers(int index) { - return consumers_.get(index); - } - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( - int index) { - return consumers_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < consumers_.size(); i++) { - output.writeMessage(1, consumers_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < consumers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, consumers_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.NetworkConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.NetworkConfig other = - (com.google.cloud.metastore.v1beta.NetworkConfig) obj; - - if (!getConsumersList().equals(other.getConsumersList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConsumersCount() > 0) { - hash = (37 * hash) + CONSUMERS_FIELD_NUMBER; - hash = (53 * hash) + getConsumersList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.NetworkConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Network configuration for the Dataproc Metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.NetworkConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.NetworkConfig) - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.NetworkConfig.class, - com.google.cloud.metastore.v1beta.NetworkConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.NetworkConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (consumersBuilder_ == null) { - consumers_ = java.util.Collections.emptyList(); - } else { - consumers_ = null; - consumersBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_NetworkConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig build() { - com.google.cloud.metastore.v1beta.NetworkConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig buildPartial() { - com.google.cloud.metastore.v1beta.NetworkConfig result = - new com.google.cloud.metastore.v1beta.NetworkConfig(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.metastore.v1beta.NetworkConfig result) { - if (consumersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - consumers_ = java.util.Collections.unmodifiableList(consumers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.consumers_ = consumers_; - } else { - result.consumers_ = consumersBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.NetworkConfig result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.NetworkConfig) { - return mergeFrom((com.google.cloud.metastore.v1beta.NetworkConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.NetworkConfig other) { - if (other == com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance()) - return this; - if (consumersBuilder_ == null) { - if (!other.consumers_.isEmpty()) { - if (consumers_.isEmpty()) { - consumers_ = other.consumers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConsumersIsMutable(); - consumers_.addAll(other.consumers_); - } - onChanged(); - } - } else { - if (!other.consumers_.isEmpty()) { - if (consumersBuilder_.isEmpty()) { - consumersBuilder_.dispose(); - consumersBuilder_ = null; - consumers_ = other.consumers_; - bitField0_ = (bitField0_ & ~0x00000001); - consumersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getConsumersFieldBuilder() - : null; - } else { - consumersBuilder_.addAllMessages(other.consumers_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer m = - input.readMessage( - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.parser(), - extensionRegistry); - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(m); - } else { - consumersBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List consumers_ = - java.util.Collections.emptyList(); - - private void ensureConsumersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - consumers_ = - new java.util.ArrayList( - consumers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer, - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder> - consumersBuilder_; - - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getConsumersList() { - if (consumersBuilder_ == null) { - return java.util.Collections.unmodifiableList(consumers_); - } else { - return consumersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public int getConsumersCount() { - if (consumersBuilder_ == null) { - return consumers_.size(); - } else { - return consumersBuilder_.getCount(); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getConsumers(int index) { - if (consumersBuilder_ == null) { - return consumers_.get(index); - } else { - return consumersBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setConsumers( - int index, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.set(index, value); - onChanged(); - } else { - consumersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setConsumers( - int index, - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.set(index, builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers(com.google.cloud.metastore.v1beta.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.add(value); - onChanged(); - } else { - consumersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - int index, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer value) { - if (consumersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsumersIsMutable(); - consumers_.add(index, value); - onChanged(); - } else { - consumersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addConsumers( - int index, - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder builderForValue) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.add(index, builderForValue.build()); - onChanged(); - } else { - consumersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addAllConsumers( - java.lang.Iterable - values) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumers_); - onChanged(); - } else { - consumersBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearConsumers() { - if (consumersBuilder_ == null) { - consumers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - consumersBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder removeConsumers(int index) { - if (consumersBuilder_ == null) { - ensureConsumersIsMutable(); - consumers_.remove(index); - onChanged(); - } else { - consumersBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder getConsumersBuilder( - int index) { - return getConsumersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( - int index) { - if (consumersBuilder_ == null) { - return consumers_.get(index); - } else { - return consumersBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List< - ? extends com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder> - getConsumersOrBuilderList() { - if (consumersBuilder_ != null) { - return consumersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(consumers_); - } - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder addConsumersBuilder() { - return getConsumersFieldBuilder() - .addBuilder( - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.getDefaultInstance()); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder addConsumersBuilder( - int index) { - return getConsumersFieldBuilder() - .addBuilder( - index, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.getDefaultInstance()); - } - /** - * - * - *
-     * Immutable. The consumer-side network configuration for the Dataproc
-     * Metastore instance.
-     * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getConsumersBuilderList() { - return getConsumersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer, - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder> - getConsumersFieldBuilder() { - if (consumersBuilder_ == null) { - consumersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer, - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder, - com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder>( - consumers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - consumers_ = null; - } - return consumersBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.NetworkConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.NetworkConfig) - private static final com.google.cloud.metastore.v1beta.NetworkConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.NetworkConfig(); - } - - public static com.google.cloud.metastore.v1beta.NetworkConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NetworkConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfigOrBuilder.java deleted file mode 100644 index 08893d991b82..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfigOrBuilder.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface NetworkConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.NetworkConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - java.util.List getConsumersList(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getConsumers(int index); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - int getConsumersCount(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - java.util.List - getConsumersOrBuilderList(); - /** - * - * - *
-   * Immutable. The consumer-side network configuration for the Dataproc
-   * Metastore instance.
-   * 
- * - * - * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( - int index); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadata.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadata.java deleted file mode 100644 index 540d86fbdc33..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadata.java +++ /dev/null @@ -1,1833 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Represents the metadata of a long-running operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.OperationMetadata} - */ -public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.OperationMetadata) - OperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OperationMetadata() { - target_ = ""; - verb_ = ""; - statusMessage_ = ""; - apiVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.OperationMetadata.class, - com.google.cloud.metastore.v1beta.OperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int TARGET_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object target_ = ""; - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERB_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object verb_ = ""; - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - @java.lang.Override - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object statusMessage_ = ""; - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - @java.lang.Override - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; - private boolean requestedCancellation_ = false; - /** - * - * - *
-   * Output only. Identifies whether the caller has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a
-   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-   * `Code.CANCELLED`.
-   * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - @java.lang.Override - public boolean getRequestedCancellation() { - return requestedCancellation_; - } - - public static final int API_VERSION_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object apiVersion_ = ""; - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - @java.lang.Override - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); - } - if (requestedCancellation_ != false) { - output.writeBool(6, requestedCancellation_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); - } - if (requestedCancellation_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.OperationMetadata other = - (com.google.cloud.metastore.v1beta.OperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (!getTarget().equals(other.getTarget())) return false; - if (!getVerb().equals(other.getVerb())) return false; - if (!getStatusMessage().equals(other.getStatusMessage())) return false; - if (getRequestedCancellation() != other.getRequestedCancellation()) return false; - if (!getApiVersion().equals(other.getApiVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - hash = (37 * hash) + VERB_FIELD_NUMBER; - hash = (53 * hash) + getVerb().hashCode(); - hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStatusMessage().hashCode(); - hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the metadata of a long-running operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.OperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.OperationMetadata) - com.google.cloud.metastore.v1beta.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.OperationMetadata.class, - com.google.cloud.metastore.v1beta.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.OperationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - target_ = ""; - verb_ = ""; - statusMessage_ = ""; - requestedCancellation_ = false; - apiVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.OperationMetadata build() { - com.google.cloud.metastore.v1beta.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.OperationMetadata buildPartial() { - com.google.cloud.metastore.v1beta.OperationMetadata result = - new com.google.cloud.metastore.v1beta.OperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.OperationMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.target_ = target_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.verb_ = verb_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.statusMessage_ = statusMessage_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.requestedCancellation_ = requestedCancellation_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.apiVersion_ = apiVersion_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.OperationMetadata) { - return mergeFrom((com.google.cloud.metastore.v1beta.OperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.OperationMetadata other) { - if (other == com.google.cloud.metastore.v1beta.OperationMetadata.getDefaultInstance()) - return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getStatusMessage().isEmpty()) { - statusMessage_ = other.statusMessage_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.getRequestedCancellation() != false) { - setRequestedCancellation(other.getRequestedCancellation()); - } - if (!other.getApiVersion().isEmpty()) { - apiVersion_ = other.apiVersion_; - bitField0_ |= 0x00000040; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - target_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - verb_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - statusMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 48: - { - requestedCancellation_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 58: - { - apiVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000001); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000002); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object target_ = ""; - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The target to set. - * @return This builder for chaining. - */ - public Builder setTarget(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - target_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearTarget() { - target_ = getDefaultInstance().getTarget(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for target to set. - * @return This builder for chaining. - */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - target_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The verb to set. - * @return This builder for chaining. - */ - public Builder setVerb(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - verb_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearVerb() { - verb_ = getDefaultInstance().getVerb(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Name of the verb executed by the operation.
-     * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for verb to set. - * @return This builder for chaining. - */ - public Builder setVerbBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - verb_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object statusMessage_ = ""; - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - public java.lang.String getStatusMessage() { - java.lang.Object ref = statusMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - statusMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - public com.google.protobuf.ByteString getStatusMessageBytes() { - java.lang.Object ref = statusMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - statusMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - statusMessage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStatusMessage() { - statusMessage_ = getDefaultInstance().getStatusMessage(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Human-readable status of the operation, if any.
-     * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for statusMessage to set. - * @return This builder for chaining. - */ - public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - statusMessage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private boolean requestedCancellation_; - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - @java.lang.Override - public boolean getRequestedCancellation() { - return requestedCancellation_; - } - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The requestedCancellation to set. - * @return This builder for chaining. - */ - public Builder setRequestedCancellation(boolean value) { - - requestedCancellation_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Identifies whether the caller has requested cancellation
-     * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
-     * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearRequestedCancellation() { - bitField0_ = (bitField0_ & ~0x00000020); - requestedCancellation_ = false; - onChanged(); - return this; - } - - private java.lang.Object apiVersion_ = ""; - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - apiVersion_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearApiVersion() { - apiVersion_ = getDefaultInstance().getApiVersion(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. API version used to start the operation.
-     * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - apiVersion_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.OperationMetadata) - private static final com.google.cloud.metastore.v1beta.OperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.OperationMetadata(); - } - - public static com.google.cloud.metastore.v1beta.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadataOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadataOrBuilder.java deleted file mode 100644 index 2a90f1cdd22b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface OperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The target. - */ - java.lang.String getTarget(); - /** - * - * - *
-   * Output only. Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for target. - */ - com.google.protobuf.ByteString getTargetBytes(); - - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The verb. - */ - java.lang.String getVerb(); - /** - * - * - *
-   * Output only. Name of the verb executed by the operation.
-   * 
- * - * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for verb. - */ - com.google.protobuf.ByteString getVerbBytes(); - - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The statusMessage. - */ - java.lang.String getStatusMessage(); - /** - * - * - *
-   * Output only. Human-readable status of the operation, if any.
-   * 
- * - * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for statusMessage. - */ - com.google.protobuf.ByteString getStatusMessageBytes(); - - /** - * - * - *
-   * Output only. Identifies whether the caller has requested cancellation
-   * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a
-   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-   * `Code.CANCELLED`.
-   * 
- * - * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The requestedCancellation. - */ - boolean getRequestedCancellation(); - - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The apiVersion. - */ - java.lang.String getApiVersion(); - /** - * - * - *
-   * Output only. API version used to start the operation.
-   * 
- * - * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for apiVersion. - */ - com.google.protobuf.ByteString getApiVersionBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequest.java deleted file mode 100644 index 542f1299388c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequest.java +++ /dev/null @@ -1,849 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.QueryMetadataRequest} - */ -public final class QueryMetadataRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.QueryMetadataRequest) - QueryMetadataRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use QueryMetadataRequest.newBuilder() to construct. - private QueryMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private QueryMetadataRequest() { - service_ = ""; - query_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryMetadataRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.QueryMetadataRequest.class, - com.google.cloud.metastore.v1beta.QueryMetadataRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to query
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to query
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object query_ = ""; - /** - * - * - *
-   * Required. A read-only SQL query to execute against the metadata database.
-   * The query cannot change or mutate the data.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The query. - */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } - } - /** - * - * - *
-   * Required. A read-only SQL query to execute against the metadata database.
-   * The query cannot change or mutate the data.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for query. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.QueryMetadataRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.QueryMetadataRequest other = - (com.google.cloud.metastore.v1beta.QueryMetadataRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getQuery().equals(other.getQuery())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.QueryMetadataRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.QueryMetadataRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.QueryMetadataRequest) - com.google.cloud.metastore.v1beta.QueryMetadataRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.QueryMetadataRequest.class, - com.google.cloud.metastore.v1beta.QueryMetadataRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.QueryMetadataRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - query_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.QueryMetadataRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.QueryMetadataRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.QueryMetadataRequest build() { - com.google.cloud.metastore.v1beta.QueryMetadataRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.QueryMetadataRequest buildPartial() { - com.google.cloud.metastore.v1beta.QueryMetadataRequest result = - new com.google.cloud.metastore.v1beta.QueryMetadataRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.QueryMetadataRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.query_ = query_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.QueryMetadataRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.QueryMetadataRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.QueryMetadataRequest other) { - if (other == com.google.cloud.metastore.v1beta.QueryMetadataRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - query_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to query
-     * metadata, in the following format:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object query_ = ""; - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The query. - */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for query. - */ - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The query to set. - * @return This builder for chaining. - */ - public Builder setQuery(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - query_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearQuery() { - query_ = getDefaultInstance().getQuery(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. A read-only SQL query to execute against the metadata database.
-     * The query cannot change or mutate the data.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for query to set. - * @return This builder for chaining. - */ - public Builder setQueryBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - query_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.QueryMetadataRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.QueryMetadataRequest) - private static final com.google.cloud.metastore.v1beta.QueryMetadataRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.QueryMetadataRequest(); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryMetadataRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.QueryMetadataRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequestOrBuilder.java deleted file mode 100644 index ec237ccac1ba..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface QueryMetadataRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.QueryMetadataRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to query
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to query
-   * metadata, in the following format:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * Required. A read-only SQL query to execute against the metadata database.
-   * The query cannot change or mutate the data.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The query. - */ - java.lang.String getQuery(); - /** - * - * - *
-   * Required. A read-only SQL query to execute against the metadata database.
-   * The query cannot change or mutate the data.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for query. - */ - com.google.protobuf.ByteString getQueryBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponse.java deleted file mode 100644 index e6e3c118c5ad..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponse.java +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.QueryMetadataResponse} - */ -public final class QueryMetadataResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.QueryMetadataResponse) - QueryMetadataResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use QueryMetadataResponse.newBuilder() to construct. - private QueryMetadataResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private QueryMetadataResponse() { - resultManifestUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryMetadataResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.QueryMetadataResponse.class, - com.google.cloud.metastore.v1beta.QueryMetadataResponse.Builder.class); - } - - public static final int RESULT_MANIFEST_URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object resultManifestUri_ = ""; - /** - * - * - *
-   * The manifest URI  is link to a JSON instance in Cloud Storage.
-   * This instance manifests immediately along with QueryMetadataResponse. The
-   * content of the URI is not retriable until the long-running operation query
-   * against the metadata finishes.
-   * 
- * - * string result_manifest_uri = 1; - * - * @return The resultManifestUri. - */ - @java.lang.Override - public java.lang.String getResultManifestUri() { - java.lang.Object ref = resultManifestUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resultManifestUri_ = s; - return s; - } - } - /** - * - * - *
-   * The manifest URI  is link to a JSON instance in Cloud Storage.
-   * This instance manifests immediately along with QueryMetadataResponse. The
-   * content of the URI is not retriable until the long-running operation query
-   * against the metadata finishes.
-   * 
- * - * string result_manifest_uri = 1; - * - * @return The bytes for resultManifestUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResultManifestUriBytes() { - java.lang.Object ref = resultManifestUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resultManifestUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resultManifestUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resultManifestUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resultManifestUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resultManifestUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.QueryMetadataResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.QueryMetadataResponse other = - (com.google.cloud.metastore.v1beta.QueryMetadataResponse) obj; - - if (!getResultManifestUri().equals(other.getResultManifestUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESULT_MANIFEST_URI_FIELD_NUMBER; - hash = (53 * hash) + getResultManifestUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.QueryMetadataResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.QueryMetadataResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.QueryMetadataResponse) - com.google.cloud.metastore.v1beta.QueryMetadataResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.QueryMetadataResponse.class, - com.google.cloud.metastore.v1beta.QueryMetadataResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.QueryMetadataResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resultManifestUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.QueryMetadataResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.QueryMetadataResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.QueryMetadataResponse build() { - com.google.cloud.metastore.v1beta.QueryMetadataResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.QueryMetadataResponse buildPartial() { - com.google.cloud.metastore.v1beta.QueryMetadataResponse result = - new com.google.cloud.metastore.v1beta.QueryMetadataResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.QueryMetadataResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resultManifestUri_ = resultManifestUri_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.QueryMetadataResponse) { - return mergeFrom((com.google.cloud.metastore.v1beta.QueryMetadataResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.QueryMetadataResponse other) { - if (other == com.google.cloud.metastore.v1beta.QueryMetadataResponse.getDefaultInstance()) - return this; - if (!other.getResultManifestUri().isEmpty()) { - resultManifestUri_ = other.resultManifestUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - resultManifestUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object resultManifestUri_ = ""; - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @return The resultManifestUri. - */ - public java.lang.String getResultManifestUri() { - java.lang.Object ref = resultManifestUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resultManifestUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @return The bytes for resultManifestUri. - */ - public com.google.protobuf.ByteString getResultManifestUriBytes() { - java.lang.Object ref = resultManifestUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resultManifestUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @param value The resultManifestUri to set. - * @return This builder for chaining. - */ - public Builder setResultManifestUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - resultManifestUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearResultManifestUri() { - resultManifestUri_ = getDefaultInstance().getResultManifestUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The manifest URI  is link to a JSON instance in Cloud Storage.
-     * This instance manifests immediately along with QueryMetadataResponse. The
-     * content of the URI is not retriable until the long-running operation query
-     * against the metadata finishes.
-     * 
- * - * string result_manifest_uri = 1; - * - * @param value The bytes for resultManifestUri to set. - * @return This builder for chaining. - */ - public Builder setResultManifestUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - resultManifestUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.QueryMetadataResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.QueryMetadataResponse) - private static final com.google.cloud.metastore.v1beta.QueryMetadataResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.QueryMetadataResponse(); - } - - public static com.google.cloud.metastore.v1beta.QueryMetadataResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryMetadataResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.QueryMetadataResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponseOrBuilder.java deleted file mode 100644 index 43ae832cc8ba..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponseOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface QueryMetadataResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.QueryMetadataResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The manifest URI  is link to a JSON instance in Cloud Storage.
-   * This instance manifests immediately along with QueryMetadataResponse. The
-   * content of the URI is not retriable until the long-running operation query
-   * against the metadata finishes.
-   * 
- * - * string result_manifest_uri = 1; - * - * @return The resultManifestUri. - */ - java.lang.String getResultManifestUri(); - /** - * - * - *
-   * The manifest URI  is link to a JSON instance in Cloud Storage.
-   * This instance manifests immediately along with QueryMetadataResponse. The
-   * content of the URI is not retriable until the long-running operation query
-   * against the metadata finishes.
-   * 
- * - * string result_manifest_uri = 1; - * - * @return The bytes for resultManifestUri. - */ - com.google.protobuf.ByteString getResultManifestUriBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequest.java deleted file mode 100644 index 31b9124a6065..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequest.java +++ /dev/null @@ -1,771 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.RemoveIamPolicyRequest} - */ -public final class RemoveIamPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) - RemoveIamPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use RemoveIamPolicyRequest.newBuilder() to construct. - private RemoveIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RemoveIamPolicyRequest() { - resource_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RemoveIamPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.class, - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.Builder.class); - } - - public static final int RESOURCE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object resource_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the dataplane resource to remove
-   * IAM policy, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-   * or
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the dataplane resource to remove
-   * IAM policy, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-   * or
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASYNCHRONOUS_FIELD_NUMBER = 2; - private boolean asynchronous_ = false; - /** - * - * - *
-   * Optional. Removes IAM policy attached to database or table asynchronously
-   * when it is set. The default is false.
-   * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The asynchronous. - */ - @java.lang.Override - public boolean getAsynchronous() { - return asynchronous_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - if (asynchronous_ != false) { - output.writeBool(2, asynchronous_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - if (asynchronous_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, asynchronous_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest other = - (com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest) obj; - - if (!getResource().equals(other.getResource())) return false; - if (getAsynchronous() != other.getAsynchronous()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - hash = (37 * hash) + ASYNCHRONOUS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAsynchronous()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.RemoveIamPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.class, - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resource_ = ""; - asynchronous_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest build() { - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest buildPartial() { - com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest result = - new com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resource_ = resource_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.asynchronous_ = asynchronous_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest other) { - if (other == com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.getDefaultInstance()) - return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getAsynchronous() != false) { - setAsynchronous(other.getAsynchronous()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - resource_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - asynchronous_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object resource_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - resource_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearResource() { - resource_ = getDefaultInstance().getResource(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the dataplane resource to remove
-     * IAM policy, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-     * or
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-     * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - resource_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private boolean asynchronous_; - /** - * - * - *
-     * Optional. Removes IAM policy attached to database or table asynchronously
-     * when it is set. The default is false.
-     * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The asynchronous. - */ - @java.lang.Override - public boolean getAsynchronous() { - return asynchronous_; - } - /** - * - * - *
-     * Optional. Removes IAM policy attached to database or table asynchronously
-     * when it is set. The default is false.
-     * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The asynchronous to set. - * @return This builder for chaining. - */ - public Builder setAsynchronous(boolean value) { - - asynchronous_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Removes IAM policy attached to database or table asynchronously
-     * when it is set. The default is false.
-     * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearAsynchronous() { - bitField0_ = (bitField0_ & ~0x00000002); - asynchronous_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) - private static final com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest(); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveIamPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequestOrBuilder.java deleted file mode 100644 index f51c2efcef44..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequestOrBuilder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface RemoveIamPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the dataplane resource to remove
-   * IAM policy, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-   * or
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The resource. - */ - java.lang.String getResource(); - /** - * - * - *
-   * Required. The relative resource name of the dataplane resource to remove
-   * IAM policy, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
-   * or
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
-   * 
- * - * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for resource. - */ - com.google.protobuf.ByteString getResourceBytes(); - - /** - * - * - *
-   * Optional. Removes IAM policy attached to database or table asynchronously
-   * when it is set. The default is false.
-   * 
- * - * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The asynchronous. - */ - boolean getAsynchronous(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponse.java deleted file mode 100644 index 8c094274497b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponse.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Response message for
- * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.RemoveIamPolicyResponse} - */ -public final class RemoveIamPolicyResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) - RemoveIamPolicyResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use RemoveIamPolicyResponse.newBuilder() to construct. - private RemoveIamPolicyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RemoveIamPolicyResponse() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RemoveIamPolicyResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.class, - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.Builder.class); - } - - public static final int SUCCESS_FIELD_NUMBER = 1; - private boolean success_ = false; - /** - * - * - *
-   * True if the policy is successfully removed.
-   * 
- * - * bool success = 1; - * - * @return The success. - */ - @java.lang.Override - public boolean getSuccess() { - return success_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (success_ != false) { - output.writeBool(1, success_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (success_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, success_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse other = - (com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse) obj; - - if (getSuccess() != other.getSuccess()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SUCCESS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSuccess()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for
-   * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.RemoveIamPolicyResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.class, - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - success_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse build() { - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse buildPartial() { - com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse result = - new com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.success_ = success_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse) { - return mergeFrom((com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse other) { - if (other == com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.getDefaultInstance()) - return this; - if (other.getSuccess() != false) { - setSuccess(other.getSuccess()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - success_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private boolean success_; - /** - * - * - *
-     * True if the policy is successfully removed.
-     * 
- * - * bool success = 1; - * - * @return The success. - */ - @java.lang.Override - public boolean getSuccess() { - return success_; - } - /** - * - * - *
-     * True if the policy is successfully removed.
-     * 
- * - * bool success = 1; - * - * @param value The success to set. - * @return This builder for chaining. - */ - public Builder setSuccess(boolean value) { - - success_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * True if the policy is successfully removed.
-     * 
- * - * bool success = 1; - * - * @return This builder for chaining. - */ - public Builder clearSuccess() { - bitField0_ = (bitField0_ & ~0x00000001); - success_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) - private static final com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse(); - } - - public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveIamPolicyResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponseOrBuilder.java deleted file mode 100644 index d78f4cfd592f..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponseOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface RemoveIamPolicyResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * True if the policy is successfully removed.
-   * 
- * - * bool success = 1; - * - * @return The success. - */ - boolean getSuccess(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Restore.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Restore.java deleted file mode 100644 index 7e5b53440e02..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Restore.java +++ /dev/null @@ -1,2071 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * The details of a metadata restore operation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Restore} - */ -public final class Restore extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Restore) - RestoreOrBuilder { - private static final long serialVersionUID = 0L; - // Use Restore.newBuilder() to construct. - private Restore(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Restore() { - state_ = 0; - backup_ = ""; - type_ = 0; - details_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Restore(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Restore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Restore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Restore.class, - com.google.cloud.metastore.v1beta.Restore.Builder.class); - } - - /** - * - * - *
-   * The current state of the restore.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.Restore.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metadata restore is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metadata restore is running.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - * - * - *
-     * The metadata restore completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - SUCCEEDED(2), - /** - * - * - *
-     * The metadata restore failed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - * - * - *
-     * The metadata restore is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metadata restore is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metadata restore is running.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - * - * - *
-     * The metadata restore completed successfully.
-     * 
- * - * SUCCEEDED = 2; - */ - public static final int SUCCEEDED_VALUE = 2; - /** - * - * - *
-     * The metadata restore failed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - * - * - *
-     * The metadata restore is cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return RUNNING; - case 2: - return SUCCEEDED; - case 3: - return FAILED; - case 4: - return CANCELLED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.Restore.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Restore.State) - } - - /** - * - * - *
-   * The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.Restore.RestoreType} - */ - public enum RestoreType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The restore type is unknown.
-     * 
- * - * RESTORE_TYPE_UNSPECIFIED = 0; - */ - RESTORE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * The service's metadata and configuration are restored.
-     * 
- * - * FULL = 1; - */ - FULL(1), - /** - * - * - *
-     * Only the service's metadata is restored.
-     * 
- * - * METADATA_ONLY = 2; - */ - METADATA_ONLY(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The restore type is unknown.
-     * 
- * - * RESTORE_TYPE_UNSPECIFIED = 0; - */ - public static final int RESTORE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The service's metadata and configuration are restored.
-     * 
- * - * FULL = 1; - */ - public static final int FULL_VALUE = 1; - /** - * - * - *
-     * Only the service's metadata is restored.
-     * 
- * - * METADATA_ONLY = 2; - */ - public static final int METADATA_ONLY_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RestoreType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static RestoreType forNumber(int value) { - switch (value) { - case 0: - return RESTORE_TYPE_UNSPECIFIED; - case 1: - return FULL; - case 2: - return METADATA_ONLY; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RestoreType findValueByNumber(int number) { - return RestoreType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.Restore.getDescriptor().getEnumTypes().get(1); - } - - private static final RestoreType[] VALUES = values(); - - public static RestoreType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private RestoreType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Restore.RestoreType) - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore.State getState() { - com.google.cloud.metastore.v1beta.Restore.State result = - com.google.cloud.metastore.v1beta.Restore.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1beta.Restore.State.UNRECOGNIZED : result; - } - - public static final int BACKUP_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object backup_ = ""; - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - @java.lang.Override - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 5; - private int type_ = 0; - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore.RestoreType getType() { - com.google.cloud.metastore.v1beta.Restore.RestoreType result = - com.google.cloud.metastore.v1beta.Restore.RestoreType.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1beta.Restore.RestoreType.UNRECOGNIZED - : result; - } - - public static final int DETAILS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object details_ = ""; - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to
-   * be restored to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - @java.lang.Override - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to
-   * be restored to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1beta.Restore.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, backup_); - } - if (type_ - != com.google.cloud.metastore.v1beta.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(5, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, details_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (state_ != com.google.cloud.metastore.v1beta.Restore.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, backup_); - } - if (type_ - != com.google.cloud.metastore.v1beta.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, details_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.Restore)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.Restore other = - (com.google.cloud.metastore.v1beta.Restore) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (state_ != other.state_) return false; - if (!getBackup().equals(other.getBackup())) return false; - if (type_ != other.type_) return false; - if (!getDetails().equals(other.getDetails())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Restore parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Restore parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Restore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.Restore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The details of a metadata restore operation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Restore} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Restore) - com.google.cloud.metastore.v1beta.RestoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Restore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Restore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Restore.class, - com.google.cloud.metastore.v1beta.Restore.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.Restore.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - state_ = 0; - backup_ = ""; - type_ = 0; - details_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Restore_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.Restore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore build() { - com.google.cloud.metastore.v1beta.Restore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore buildPartial() { - com.google.cloud.metastore.v1beta.Restore result = - new com.google.cloud.metastore.v1beta.Restore(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.Restore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.backup_ = backup_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.details_ = details_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.Restore) { - return mergeFrom((com.google.cloud.metastore.v1beta.Restore) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.Restore other) { - if (other == com.google.cloud.metastore.v1beta.Restore.getDefaultInstance()) return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getBackup().isEmpty()) { - backup_ = other.backup_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getDetails().isEmpty()) { - details_ = other.details_; - bitField0_ |= 0x00000020; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - backup_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: - { - details_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && startTime_ != null - && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000001); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Output only. The time when the restore started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000002); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. The time when the restore ended.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore.State getState() { - com.google.cloud.metastore.v1beta.Restore.State result = - com.google.cloud.metastore.v1beta.Restore.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1beta.Restore.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1beta.Restore.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000004); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object backup_ = ""; - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The backup to set. - * @return This builder for chaining. - */ - public Builder setBackup(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearBackup() { - backup_ = getDefaultInstance().getBackup(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. 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}`.
-     * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for backup to set. - * @return This builder for chaining. - */ - public Builder setBackupBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backup_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore.RestoreType getType() { - com.google.cloud.metastore.v1beta.Restore.RestoreType result = - com.google.cloud.metastore.v1beta.Restore.RestoreType.forNumber(type_); - return result == null - ? com.google.cloud.metastore.v1beta.Restore.RestoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.metastore.v1beta.Restore.RestoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The type of restore.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000010); - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object details_ = ""; - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The details to set. - * @return This builder for chaining. - */ - public Builder setDetails(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDetails() { - details_ = getDefaultInstance().getDetails(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The restore details containing the revision of the service to
-     * be restored to, in format of JSON.
-     * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for details to set. - * @return This builder for chaining. - */ - public Builder setDetailsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - details_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Restore) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Restore) - private static final com.google.cloud.metastore.v1beta.Restore DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Restore(); - } - - public static com.google.cloud.metastore.v1beta.Restore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Restore parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreOrBuilder.java deleted file mode 100644 index 2ab02c7eb8c1..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreOrBuilder.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface RestoreOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Restore) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Output only. The time when the restore started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. The time when the restore ended.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the restore.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1beta.Restore.State getState(); - - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - java.lang.String getBackup(); - /** - * - * - *
-   * Output only. 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}`.
-   * 
- * - * - * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - com.google.protobuf.ByteString getBackupBytes(); - - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * - * - *
-   * Output only. The type of restore.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The type. - */ - com.google.cloud.metastore.v1beta.Restore.RestoreType getType(); - - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to
-   * be restored to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - java.lang.String getDetails(); - /** - * - * - *
-   * Output only. The restore details containing the revision of the service to
-   * be restored to, in format of JSON.
-   * 
- * - * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - com.google.protobuf.ByteString getDetailsBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequest.java deleted file mode 100644 index acc11367351d..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequest.java +++ /dev/null @@ -1,1283 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for [DataprocMetastore.Restore][].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.RestoreServiceRequest} - */ -public final class RestoreServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.RestoreServiceRequest) - RestoreServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use RestoreServiceRequest.newBuilder() to construct. - private RestoreServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RestoreServiceRequest() { - service_ = ""; - backup_ = ""; - restoreType_ = 0; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.RestoreServiceRequest.class, - com.google.cloud.metastore.v1beta.RestoreServiceRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object service_ = ""; - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * restore, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * restore, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BACKUP_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - @java.lang.Override - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } - } - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESTORE_TYPE_FIELD_NUMBER = 3; - private int restoreType_ = 0; - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - @java.lang.Override - public int getRestoreTypeValue() { - return restoreType_; - } - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore.RestoreType getRestoreType() { - com.google.cloud.metastore.v1beta.Restore.RestoreType result = - com.google.cloud.metastore.v1beta.Restore.RestoreType.forNumber(restoreType_); - return result == null - ? com.google.cloud.metastore.v1beta.Restore.RestoreType.UNRECOGNIZED - : result; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backup_); - } - if (restoreType_ - != com.google.cloud.metastore.v1beta.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, restoreType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backup_); - } - if (restoreType_ - != com.google.cloud.metastore.v1beta.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, restoreType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.RestoreServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.RestoreServiceRequest other = - (com.google.cloud.metastore.v1beta.RestoreServiceRequest) obj; - - if (!getService().equals(other.getService())) return false; - if (!getBackup().equals(other.getBackup())) return false; - if (restoreType_ != other.restoreType_) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (37 * hash) + BACKUP_FIELD_NUMBER; - hash = (53 * hash) + getBackup().hashCode(); - hash = (37 * hash) + RESTORE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + restoreType_; - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.RestoreServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [DataprocMetastore.Restore][].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.RestoreServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.RestoreServiceRequest) - com.google.cloud.metastore.v1beta.RestoreServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.RestoreServiceRequest.class, - com.google.cloud.metastore.v1beta.RestoreServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.RestoreServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - service_ = ""; - backup_ = ""; - restoreType_ = 0; - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RestoreServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.RestoreServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RestoreServiceRequest build() { - com.google.cloud.metastore.v1beta.RestoreServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RestoreServiceRequest buildPartial() { - com.google.cloud.metastore.v1beta.RestoreServiceRequest result = - new com.google.cloud.metastore.v1beta.RestoreServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.RestoreServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.service_ = service_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.backup_ = backup_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.restoreType_ = restoreType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.RestoreServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.RestoreServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.RestoreServiceRequest other) { - if (other == com.google.cloud.metastore.v1beta.RestoreServiceRequest.getDefaultInstance()) - return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBackup().isEmpty()) { - backup_ = other.backup_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.restoreType_ != 0) { - setRestoreTypeValue(other.getRestoreTypeValue()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - service_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - backup_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - restoreType_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object service_ = ""; - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - public com.google.protobuf.ByteString getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearService() { - service_ = getDefaultInstance().getService(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The relative resource name of the metastore service to run
-     * restore, in the following form:
-     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - service_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - public java.lang.String getBackup() { - java.lang.Object ref = backup_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - backup_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - public com.google.protobuf.ByteString getBackupBytes() { - java.lang.Object ref = backup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - backup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The backup to set. - * @return This builder for chaining. - */ - public Builder setBackup(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - backup_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearBackup() { - backup_ = getDefaultInstance().getBackup(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * 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}`.
-     * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for backup to set. - * @return This builder for chaining. - */ - public Builder setBackupBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - backup_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int restoreType_ = 0; - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - @java.lang.Override - public int getRestoreTypeValue() { - return restoreType_; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for restoreType to set. - * @return This builder for chaining. - */ - public Builder setRestoreTypeValue(int value) { - restoreType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Restore.RestoreType getRestoreType() { - com.google.cloud.metastore.v1beta.Restore.RestoreType result = - com.google.cloud.metastore.v1beta.Restore.RestoreType.forNumber(restoreType_); - return result == null - ? com.google.cloud.metastore.v1beta.Restore.RestoreType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The restoreType to set. - * @return This builder for chaining. - */ - public Builder setRestoreType(com.google.cloud.metastore.v1beta.Restore.RestoreType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - restoreType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearRestoreType() { - bitField0_ = (bitField0_ & ~0x00000004); - restoreType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.RestoreServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.RestoreServiceRequest) - private static final com.google.cloud.metastore.v1beta.RestoreServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.RestoreServiceRequest(); - } - - public static com.google.cloud.metastore.v1beta.RestoreServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RestoreServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.RestoreServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequestOrBuilder.java deleted file mode 100644 index af8fdff1a386..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequestOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface RestoreServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.RestoreServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * restore, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The service. - */ - java.lang.String getService(); - /** - * - * - *
-   * Required. The relative resource name of the metastore service to run
-   * restore, in the following form:
-   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * - * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for service. - */ - com.google.protobuf.ByteString getServiceBytes(); - - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The backup. - */ - java.lang.String getBackup(); - /** - * - * - *
-   * 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}`.
-   * 
- * - * - * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for backup. - */ - com.google.protobuf.ByteString getBackupBytes(); - - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for restoreType. - */ - int getRestoreTypeValue(); - /** - * - * - *
-   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The restoreType. - */ - com.google.cloud.metastore.v1beta.Restore.RestoreType getRestoreType(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Secret.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Secret.java deleted file mode 100644 index 145af8e1b343..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Secret.java +++ /dev/null @@ -1,774 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * A securely stored value.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Secret} - */ -public final class Secret extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Secret) - SecretOrBuilder { - private static final long serialVersionUID = 0L; - // Use Secret.newBuilder() to construct. - private Secret(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Secret() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Secret(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Secret_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Secret_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Secret.class, - com.google.cloud.metastore.v1beta.Secret.Builder.class); - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public enum ValueCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CLOUD_SECRET(2), - VALUE_NOT_SET(0); - private final int value; - - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 2: - return CLOUD_SECRET; - case 0: - return VALUE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public static final int CLOUD_SECRET_FIELD_NUMBER = 2; - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - public boolean hasCloudSecret() { - return valueCase_ == 2; - } - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - public java.lang.String getCloudSecret() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 2) { - value_ = s; - } - return s; - } - } - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - public com.google.protobuf.ByteString getCloudSecretBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (valueCase_ == 2) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (valueCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.Secret)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.Secret other = (com.google.cloud.metastore.v1beta.Secret) obj; - - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 2: - if (!getCloudSecret().equals(other.getCloudSecret())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (valueCase_) { - case 2: - hash = (37 * hash) + CLOUD_SECRET_FIELD_NUMBER; - hash = (53 * hash) + getCloudSecret().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Secret parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Secret parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Secret parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.Secret prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A securely stored value.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Secret} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Secret) - com.google.cloud.metastore.v1beta.SecretOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Secret_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Secret_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Secret.class, - com.google.cloud.metastore.v1beta.Secret.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.Secret.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Secret_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Secret getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.Secret.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Secret build() { - com.google.cloud.metastore.v1beta.Secret result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Secret buildPartial() { - com.google.cloud.metastore.v1beta.Secret result = - new com.google.cloud.metastore.v1beta.Secret(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.Secret result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1beta.Secret result) { - result.valueCase_ = valueCase_; - result.value_ = this.value_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.Secret) { - return mergeFrom((com.google.cloud.metastore.v1beta.Secret) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.Secret other) { - if (other == com.google.cloud.metastore.v1beta.Secret.getDefaultInstance()) return this; - switch (other.getValueCase()) { - case CLOUD_SECRET: - { - valueCase_ = 2; - value_ = other.value_; - onChanged(); - break; - } - case VALUE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - valueCase_ = 2; - value_ = s; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int valueCase_ = 0; - private java.lang.Object value_; - - public ValueCase getValueCase() { - return ValueCase.forNumber(valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - @java.lang.Override - public boolean hasCloudSecret() { - return valueCase_ == 2; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - @java.lang.Override - public java.lang.String getCloudSecret() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 2) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCloudSecretBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (valueCase_ == 2) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @param value The cloudSecret to set. - * @return This builder for chaining. - */ - public Builder setCloudSecret(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @return This builder for chaining. - */ - public Builder clearCloudSecret() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The relative resource name of a Secret Manager secret version, in the
-     * following form:
-     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-     * 
- * - * string cloud_secret = 2; - * - * @param value The bytes for cloudSecret to set. - * @return This builder for chaining. - */ - public Builder setCloudSecretBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Secret) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Secret) - private static final com.google.cloud.metastore.v1beta.Secret DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Secret(); - } - - public static com.google.cloud.metastore.v1beta.Secret getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Secret parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Secret getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/SecretOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/SecretOrBuilder.java deleted file mode 100644 index a19cf0c5a486..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/SecretOrBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface SecretOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Secret) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return Whether the cloudSecret field is set. - */ - boolean hasCloudSecret(); - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The cloudSecret. - */ - java.lang.String getCloudSecret(); - /** - * - * - *
-   * The relative resource name of a Secret Manager secret version, in the
-   * following form:
-   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
-   * 
- * - * string cloud_secret = 2; - * - * @return The bytes for cloudSecret. - */ - com.google.protobuf.ByteString getCloudSecretBytes(); - - public com.google.cloud.metastore.v1beta.Secret.ValueCase getValueCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Service.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Service.java deleted file mode 100644 index 62a3aca6b049..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Service.java +++ /dev/null @@ -1,6165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * A managed metastore service that serves metadata queries.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Service} - */ -public final class Service extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Service) - ServiceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Service.newBuilder() to construct. - private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Service() { - name_ = ""; - network_ = ""; - endpointUri_ = ""; - state_ = 0; - stateMessage_ = ""; - artifactGcsUri_ = ""; - tier_ = 0; - uid_ = ""; - releaseChannel_ = 0; - databaseType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Service(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Service_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Service.class, - com.google.cloud.metastore.v1beta.Service.Builder.class); - } - - /** - * - * - *
-   * The current state of the metastore service.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.Service.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The state of the metastore service is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The metastore service is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The metastore service is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - ACTIVE(2), - /** - * - * - *
-     * The metastore service is entering suspension. Its query-serving
-     * availability may cease unexpectedly.
-     * 
- * - * SUSPENDING = 3; - */ - SUSPENDING(3), - /** - * - * - *
-     * The metastore service is suspended and unable to serve queries.
-     * 
- * - * SUSPENDED = 4; - */ - SUSPENDED(4), - /** - * - * - *
-     * The metastore service is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 5; - */ - UPDATING(5), - /** - * - * - *
-     * The metastore service is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 6; - */ - DELETING(6), - /** - * - * - *
-     * The metastore service has encountered an error and cannot be used. The
-     * metastore service should be deleted.
-     * 
- * - * ERROR = 7; - */ - ERROR(7), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The state of the metastore service is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The metastore service is in the process of being created.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The metastore service is running and ready to serve queries.
-     * 
- * - * ACTIVE = 2; - */ - public static final int ACTIVE_VALUE = 2; - /** - * - * - *
-     * The metastore service is entering suspension. Its query-serving
-     * availability may cease unexpectedly.
-     * 
- * - * SUSPENDING = 3; - */ - public static final int SUSPENDING_VALUE = 3; - /** - * - * - *
-     * The metastore service is suspended and unable to serve queries.
-     * 
- * - * SUSPENDED = 4; - */ - public static final int SUSPENDED_VALUE = 4; - /** - * - * - *
-     * The metastore service is being updated. It remains usable but cannot
-     * accept additional update requests or be deleted at this time.
-     * 
- * - * UPDATING = 5; - */ - public static final int UPDATING_VALUE = 5; - /** - * - * - *
-     * The metastore service is undergoing deletion. It cannot be used.
-     * 
- * - * DELETING = 6; - */ - public static final int DELETING_VALUE = 6; - /** - * - * - *
-     * The metastore service has encountered an error and cannot be used. The
-     * metastore service should be deleted.
-     * 
- * - * ERROR = 7; - */ - public static final int ERROR_VALUE = 7; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return CREATING; - case 2: - return ACTIVE; - case 3: - return SUSPENDING; - case 4: - return SUSPENDED; - case 5: - return UPDATING; - case 6: - return DELETING; - case 7: - return ERROR; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.Service.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Service.State) - } - - /** - * - * - *
-   * Available service tiers.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.Service.Tier} - */ - public enum Tier implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The tier is not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - TIER_UNSPECIFIED(0), - /** - * - * - *
-     * The developer tier provides limited scalability and no fault tolerance.
-     * Good for low-cost proof-of-concept.
-     * 
- * - * DEVELOPER = 1; - */ - DEVELOPER(1), - /** - * - * - *
-     * The enterprise tier provides multi-zone high availability, and sufficient
-     * scalability for enterprise-level Dataproc Metastore workloads.
-     * 
- * - * ENTERPRISE = 3; - */ - ENTERPRISE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The tier is not set.
-     * 
- * - * TIER_UNSPECIFIED = 0; - */ - public static final int TIER_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The developer tier provides limited scalability and no fault tolerance.
-     * Good for low-cost proof-of-concept.
-     * 
- * - * DEVELOPER = 1; - */ - public static final int DEVELOPER_VALUE = 1; - /** - * - * - *
-     * The enterprise tier provides multi-zone high availability, and sufficient
-     * scalability for enterprise-level Dataproc Metastore workloads.
-     * 
- * - * ENTERPRISE = 3; - */ - public static final int ENTERPRISE_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Tier valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Tier forNumber(int value) { - switch (value) { - case 0: - return TIER_UNSPECIFIED; - case 1: - return DEVELOPER; - case 3: - return ENTERPRISE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Tier findValueByNumber(int number) { - return Tier.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.Service.getDescriptor().getEnumTypes().get(1); - } - - private static final Tier[] VALUES = values(); - - public static Tier valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Tier(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Service.Tier) - } - - /** - * - * - *
-   * Release channels bundle features of varying levels of stability. Newer
-   * features may be introduced initially into less stable release channels and
-   * can be automatically promoted into more stable release channels.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.Service.ReleaseChannel} - */ - public enum ReleaseChannel implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Release channel is not specified.
-     * 
- * - * RELEASE_CHANNEL_UNSPECIFIED = 0; - */ - RELEASE_CHANNEL_UNSPECIFIED(0), - /** - * - * - *
-     * The `CANARY` release channel contains the newest features, which may be
-     * unstable and subject to unresolved issues with no known workarounds.
-     * Services using the `CANARY` release channel are not subject to any SLAs.
-     * 
- * - * CANARY = 1; - */ - CANARY(1), - /** - * - * - *
-     * The `STABLE` release channel contains features that are considered stable
-     * and have been validated for production use.
-     * 
- * - * STABLE = 2; - */ - STABLE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Release channel is not specified.
-     * 
- * - * RELEASE_CHANNEL_UNSPECIFIED = 0; - */ - public static final int RELEASE_CHANNEL_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The `CANARY` release channel contains the newest features, which may be
-     * unstable and subject to unresolved issues with no known workarounds.
-     * Services using the `CANARY` release channel are not subject to any SLAs.
-     * 
- * - * CANARY = 1; - */ - public static final int CANARY_VALUE = 1; - /** - * - * - *
-     * The `STABLE` release channel contains features that are considered stable
-     * and have been validated for production use.
-     * 
- * - * STABLE = 2; - */ - public static final int STABLE_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ReleaseChannel valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ReleaseChannel forNumber(int value) { - switch (value) { - case 0: - return RELEASE_CHANNEL_UNSPECIFIED; - case 1: - return CANARY; - case 2: - return STABLE; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ReleaseChannel findValueByNumber(int number) { - return ReleaseChannel.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.Service.getDescriptor().getEnumTypes().get(2); - } - - private static final ReleaseChannel[] VALUES = values(); - - public static ReleaseChannel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ReleaseChannel(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Service.ReleaseChannel) - } - - /** - * - * - *
-   * The backend database type for the metastore service.
-   * 
- * - * Protobuf enum {@code google.cloud.metastore.v1beta.Service.DatabaseType} - */ - public enum DatabaseType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The DATABASE_TYPE is not set.
-     * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - DATABASE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * MySQL is used to persist the metastore data.
-     * 
- * - * MYSQL = 1; - */ - MYSQL(1), - /** - * - * - *
-     * Spanner is used to persist the metastore data.
-     * 
- * - * SPANNER = 2; - */ - SPANNER(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The DATABASE_TYPE is not set.
-     * 
- * - * DATABASE_TYPE_UNSPECIFIED = 0; - */ - public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * MySQL is used to persist the metastore data.
-     * 
- * - * MYSQL = 1; - */ - public static final int MYSQL_VALUE = 1; - /** - * - * - *
-     * Spanner is used to persist the metastore data.
-     * 
- * - * SPANNER = 2; - */ - public static final int SPANNER_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DatabaseType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DatabaseType forNumber(int value) { - switch (value) { - case 0: - return DATABASE_TYPE_UNSPECIFIED; - case 1: - return MYSQL; - case 2: - return SPANNER; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DatabaseType findValueByNumber(int number) { - return DatabaseType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.Service.getDescriptor().getEnumTypes().get(3); - } - - private static final DatabaseType[] VALUES = values(); - - public static DatabaseType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DatabaseType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Service.DatabaseType) - } - - private int metastoreConfigCase_ = 0; - private java.lang.Object metastoreConfig_; - - public enum MetastoreConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - HIVE_METASTORE_CONFIG(5), - METASTORECONFIG_NOT_SET(0); - private final int value; - - private MetastoreConfigCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetastoreConfigCase valueOf(int value) { - return forNumber(value); - } - - public static MetastoreConfigCase forNumber(int value) { - switch (value) { - case 5: - return HIVE_METASTORE_CONFIG; - case 0: - return METASTORECONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MetastoreConfigCase getMetastoreConfigCase() { - return MetastoreConfigCase.forNumber(metastoreConfigCase_); - } - - public static final int HIVE_METASTORE_CONFIG_FIELD_NUMBER = 5; - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - @java.lang.Override - public boolean hasHiveMetastoreConfig() { - return metastoreConfigCase_ == 5; - } - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig getHiveMetastoreConfig() { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); - } - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder - getHiveMetastoreConfigOrBuilder() { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the
-   * following format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the
-   * following format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Service_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int NETWORK_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object network_ = ""; - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the
-   * instance can be accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - @java.lang.Override - public java.lang.String getNetwork() { - java.lang.Object ref = network_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - network_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the
-   * instance can be accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNetworkBytes() { - java.lang.Object ref = network_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - network_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENDPOINT_URI_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointUri_ = ""; - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - @java.lang.Override - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PORT_FIELD_NUMBER = 9; - private int port_ = 0; - /** - * - * - *
-   * The TCP port at which the metastore service is reached. Default: 9083.
-   * 
- * - * int32 port = 9; - * - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - - public static final int STATE_FIELD_NUMBER = 10; - private int state_ = 0; - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service.State getState() { - com.google.cloud.metastore.v1beta.Service.State result = - com.google.cloud.metastore.v1beta.Service.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1beta.Service.State.UNRECOGNIZED : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private volatile java.lang.Object stateMessage_ = ""; - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore service, if available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - @java.lang.Override - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore service, if available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARTIFACT_GCS_URI_FIELD_NUMBER = 12; - - @SuppressWarnings("serial") - private volatile java.lang.Object artifactGcsUri_ = ""; - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-   * where artifacts related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - @java.lang.Override - public java.lang.String getArtifactGcsUri() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactGcsUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-   * where artifacts related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getArtifactGcsUriBytes() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - artifactGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TIER_FIELD_NUMBER = 13; - private int tier_ = 0; - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override - public int getTierValue() { - return tier_; - } - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @return The tier. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service.Tier getTier() { - com.google.cloud.metastore.v1beta.Service.Tier result = - com.google.cloud.metastore.v1beta.Service.Tier.forNumber(tier_); - return result == null ? com.google.cloud.metastore.v1beta.Service.Tier.UNRECOGNIZED : result; - } - - public static final int METADATA_INTEGRATION_FIELD_NUMBER = 14; - private com.google.cloud.metastore.v1beta.MetadataIntegration metadataIntegration_; - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - * - * @return Whether the metadataIntegration field is set. - */ - @java.lang.Override - public boolean hasMetadataIntegration() { - return metadataIntegration_ != null; - } - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - * - * @return The metadataIntegration. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataIntegration getMetadataIntegration() { - return metadataIntegration_ == null - ? com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance() - : metadataIntegration_; - } - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder - getMetadataIntegrationOrBuilder() { - return metadataIntegration_ == null - ? com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance() - : metadataIntegration_; - } - - public static final int MAINTENANCE_WINDOW_FIELD_NUMBER = 15; - private com.google.cloud.metastore.v1beta.MaintenanceWindow maintenanceWindow_; - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - @java.lang.Override - public boolean hasMaintenanceWindow() { - return maintenanceWindow_ != null; - } - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MaintenanceWindow getMaintenanceWindow() { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder - getMaintenanceWindowOrBuilder() { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - - public static final int UID_FIELD_NUMBER = 16; - - @SuppressWarnings("serial") - private volatile java.lang.Object uid_ = ""; - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - @java.lang.Override - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER = 17; - private com.google.cloud.metastore.v1beta.MetadataManagementActivity metadataManagementActivity_; - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - @java.lang.Override - public boolean hasMetadataManagementActivity() { - return metadataManagementActivity_ != null; - } - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataManagementActivity - getMetadataManagementActivity() { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder() { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - - public static final int RELEASE_CHANNEL_FIELD_NUMBER = 19; - private int releaseChannel_ = 0; - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - @java.lang.Override - public int getReleaseChannelValue() { - return releaseChannel_; - } - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service.ReleaseChannel getReleaseChannel() { - com.google.cloud.metastore.v1beta.Service.ReleaseChannel result = - com.google.cloud.metastore.v1beta.Service.ReleaseChannel.forNumber(releaseChannel_); - return result == null - ? com.google.cloud.metastore.v1beta.Service.ReleaseChannel.UNRECOGNIZED - : result; - } - - public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 20; - private com.google.cloud.metastore.v1beta.EncryptionConfig encryptionConfig_; - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - @java.lang.Override - public boolean hasEncryptionConfig() { - return encryptionConfig_ != null; - } - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.EncryptionConfig getEncryptionConfig() { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder - getEncryptionConfigOrBuilder() { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - - public static final int NETWORK_CONFIG_FIELD_NUMBER = 21; - private com.google.cloud.metastore.v1beta.NetworkConfig networkConfig_; - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - @java.lang.Override - public boolean hasNetworkConfig() { - return networkConfig_ != null; - } - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - return networkConfig_ == null - ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - - public static final int DATABASE_TYPE_FIELD_NUMBER = 22; - private int databaseType_ = 0; - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service.DatabaseType getDatabaseType() { - com.google.cloud.metastore.v1beta.Service.DatabaseType result = - com.google.cloud.metastore.v1beta.Service.DatabaseType.forNumber(databaseType_); - return result == null - ? com.google.cloud.metastore.v1beta.Service.DatabaseType.UNRECOGNIZED - : result; - } - - public static final int TELEMETRY_CONFIG_FIELD_NUMBER = 23; - private com.google.cloud.metastore.v1beta.TelemetryConfig telemetryConfig_; - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - @java.lang.Override - public boolean hasTelemetryConfig() { - return telemetryConfig_ != null; - } - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.TelemetryConfig getTelemetryConfig() { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (metastoreConfigCase_ == 5) { - output.writeMessage( - 5, (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, network_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpointUri_); - } - if (port_ != 0) { - output.writeInt32(9, port_); - } - if (state_ != com.google.cloud.metastore.v1beta.Service.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(10, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, artifactGcsUri_); - } - if (tier_ != com.google.cloud.metastore.v1beta.Service.Tier.TIER_UNSPECIFIED.getNumber()) { - output.writeEnum(13, tier_); - } - if (metadataIntegration_ != null) { - output.writeMessage(14, getMetadataIntegration()); - } - if (maintenanceWindow_ != null) { - output.writeMessage(15, getMaintenanceWindow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, uid_); - } - if (metadataManagementActivity_ != null) { - output.writeMessage(17, getMetadataManagementActivity()); - } - if (releaseChannel_ - != com.google.cloud.metastore.v1beta.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED - .getNumber()) { - output.writeEnum(19, releaseChannel_); - } - if (encryptionConfig_ != null) { - output.writeMessage(20, getEncryptionConfig()); - } - if (networkConfig_ != null) { - output.writeMessage(21, getNetworkConfig()); - } - if (databaseType_ - != com.google.cloud.metastore.v1beta.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(22, databaseType_); - } - if (telemetryConfig_ != null) { - output.writeMessage(23, getTelemetryConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (metastoreConfigCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, network_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpointUri_); - } - if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, port_); - } - if (state_ != com.google.cloud.metastore.v1beta.Service.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, stateMessage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, artifactGcsUri_); - } - if (tier_ != com.google.cloud.metastore.v1beta.Service.Tier.TIER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, tier_); - } - if (metadataIntegration_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(14, getMetadataIntegration()); - } - if (maintenanceWindow_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getMaintenanceWindow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, uid_); - } - if (metadataManagementActivity_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 17, getMetadataManagementActivity()); - } - if (releaseChannel_ - != com.google.cloud.metastore.v1beta.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, releaseChannel_); - } - if (encryptionConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getEncryptionConfig()); - } - if (networkConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getNetworkConfig()); - } - if (databaseType_ - != com.google.cloud.metastore.v1beta.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, databaseType_); - } - if (telemetryConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getTelemetryConfig()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.Service)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.Service other = - (com.google.cloud.metastore.v1beta.Service) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getNetwork().equals(other.getNetwork())) return false; - if (!getEndpointUri().equals(other.getEndpointUri())) return false; - if (getPort() != other.getPort()) return false; - if (state_ != other.state_) return false; - if (!getStateMessage().equals(other.getStateMessage())) return false; - if (!getArtifactGcsUri().equals(other.getArtifactGcsUri())) return false; - if (tier_ != other.tier_) return false; - if (hasMetadataIntegration() != other.hasMetadataIntegration()) return false; - if (hasMetadataIntegration()) { - if (!getMetadataIntegration().equals(other.getMetadataIntegration())) return false; - } - if (hasMaintenanceWindow() != other.hasMaintenanceWindow()) return false; - if (hasMaintenanceWindow()) { - if (!getMaintenanceWindow().equals(other.getMaintenanceWindow())) return false; - } - if (!getUid().equals(other.getUid())) return false; - if (hasMetadataManagementActivity() != other.hasMetadataManagementActivity()) return false; - if (hasMetadataManagementActivity()) { - if (!getMetadataManagementActivity().equals(other.getMetadataManagementActivity())) - return false; - } - if (releaseChannel_ != other.releaseChannel_) return false; - if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; - if (hasEncryptionConfig()) { - if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; - } - if (hasNetworkConfig() != other.hasNetworkConfig()) return false; - if (hasNetworkConfig()) { - if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; - } - if (databaseType_ != other.databaseType_) return false; - if (hasTelemetryConfig() != other.hasTelemetryConfig()) return false; - if (hasTelemetryConfig()) { - if (!getTelemetryConfig().equals(other.getTelemetryConfig())) return false; - } - if (!getMetastoreConfigCase().equals(other.getMetastoreConfigCase())) return false; - switch (metastoreConfigCase_) { - case 5: - if (!getHiveMetastoreConfig().equals(other.getHiveMetastoreConfig())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getNetwork().hashCode(); - hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUri().hashCode(); - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - hash = (37 * hash) + ARTIFACT_GCS_URI_FIELD_NUMBER; - hash = (53 * hash) + getArtifactGcsUri().hashCode(); - hash = (37 * hash) + TIER_FIELD_NUMBER; - hash = (53 * hash) + tier_; - if (hasMetadataIntegration()) { - hash = (37 * hash) + METADATA_INTEGRATION_FIELD_NUMBER; - hash = (53 * hash) + getMetadataIntegration().hashCode(); - } - if (hasMaintenanceWindow()) { - hash = (37 * hash) + MAINTENANCE_WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getMaintenanceWindow().hashCode(); - } - hash = (37 * hash) + UID_FIELD_NUMBER; - hash = (53 * hash) + getUid().hashCode(); - if (hasMetadataManagementActivity()) { - hash = (37 * hash) + METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER; - hash = (53 * hash) + getMetadataManagementActivity().hashCode(); - } - hash = (37 * hash) + RELEASE_CHANNEL_FIELD_NUMBER; - hash = (53 * hash) + releaseChannel_; - if (hasEncryptionConfig()) { - hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getEncryptionConfig().hashCode(); - } - if (hasNetworkConfig()) { - hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNetworkConfig().hashCode(); - } - hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + databaseType_; - if (hasTelemetryConfig()) { - hash = (37 * hash) + TELEMETRY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getTelemetryConfig().hashCode(); - } - switch (metastoreConfigCase_) { - case 5: - hash = (37 * hash) + HIVE_METASTORE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getHiveMetastoreConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Service parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Service parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.Service parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.Service prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A managed metastore service that serves metadata queries.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.Service} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Service) - com.google.cloud.metastore.v1beta.ServiceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Service_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.Service.class, - com.google.cloud.metastore.v1beta.Service.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.Service.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (hiveMetastoreConfigBuilder_ != null) { - hiveMetastoreConfigBuilder_.clear(); - } - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - network_ = ""; - endpointUri_ = ""; - port_ = 0; - state_ = 0; - stateMessage_ = ""; - artifactGcsUri_ = ""; - tier_ = 0; - metadataIntegration_ = null; - if (metadataIntegrationBuilder_ != null) { - metadataIntegrationBuilder_.dispose(); - metadataIntegrationBuilder_ = null; - } - maintenanceWindow_ = null; - if (maintenanceWindowBuilder_ != null) { - maintenanceWindowBuilder_.dispose(); - maintenanceWindowBuilder_ = null; - } - uid_ = ""; - metadataManagementActivity_ = null; - if (metadataManagementActivityBuilder_ != null) { - metadataManagementActivityBuilder_.dispose(); - metadataManagementActivityBuilder_ = null; - } - releaseChannel_ = 0; - encryptionConfig_ = null; - if (encryptionConfigBuilder_ != null) { - encryptionConfigBuilder_.dispose(); - encryptionConfigBuilder_ = null; - } - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - databaseType_ = 0; - telemetryConfig_ = null; - if (telemetryConfigBuilder_ != null) { - telemetryConfigBuilder_.dispose(); - telemetryConfigBuilder_ = null; - } - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_Service_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.Service.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service build() { - com.google.cloud.metastore.v1beta.Service result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service buildPartial() { - com.google.cloud.metastore.v1beta.Service result = - new com.google.cloud.metastore.v1beta.Service(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.Service result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.network_ = network_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.endpointUri_ = endpointUri_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.port_ = port_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.stateMessage_ = stateMessage_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.artifactGcsUri_ = artifactGcsUri_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.tier_ = tier_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.metadataIntegration_ = - metadataIntegrationBuilder_ == null - ? metadataIntegration_ - : metadataIntegrationBuilder_.build(); - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.maintenanceWindow_ = - maintenanceWindowBuilder_ == null - ? maintenanceWindow_ - : maintenanceWindowBuilder_.build(); - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.uid_ = uid_; - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.metadataManagementActivity_ = - metadataManagementActivityBuilder_ == null - ? metadataManagementActivity_ - : metadataManagementActivityBuilder_.build(); - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.releaseChannel_ = releaseChannel_; - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.encryptionConfig_ = - encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.networkConfig_ = - networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); - } - if (((from_bitField0_ & 0x00080000) != 0)) { - result.databaseType_ = databaseType_; - } - if (((from_bitField0_ & 0x00100000) != 0)) { - result.telemetryConfig_ = - telemetryConfigBuilder_ == null ? telemetryConfig_ : telemetryConfigBuilder_.build(); - } - } - - private void buildPartialOneofs(com.google.cloud.metastore.v1beta.Service result) { - result.metastoreConfigCase_ = metastoreConfigCase_; - result.metastoreConfig_ = this.metastoreConfig_; - if (metastoreConfigCase_ == 5 && hiveMetastoreConfigBuilder_ != null) { - result.metastoreConfig_ = hiveMetastoreConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.Service) { - return mergeFrom((com.google.cloud.metastore.v1beta.Service) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.Service other) { - if (other == com.google.cloud.metastore.v1beta.Service.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000010; - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getEndpointUri().isEmpty()) { - endpointUri_ = other.endpointUri_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.getPort() != 0) { - setPort(other.getPort()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - bitField0_ |= 0x00000200; - onChanged(); - } - if (!other.getArtifactGcsUri().isEmpty()) { - artifactGcsUri_ = other.artifactGcsUri_; - bitField0_ |= 0x00000400; - onChanged(); - } - if (other.tier_ != 0) { - setTierValue(other.getTierValue()); - } - if (other.hasMetadataIntegration()) { - mergeMetadataIntegration(other.getMetadataIntegration()); - } - if (other.hasMaintenanceWindow()) { - mergeMaintenanceWindow(other.getMaintenanceWindow()); - } - if (!other.getUid().isEmpty()) { - uid_ = other.uid_; - bitField0_ |= 0x00004000; - onChanged(); - } - if (other.hasMetadataManagementActivity()) { - mergeMetadataManagementActivity(other.getMetadataManagementActivity()); - } - if (other.releaseChannel_ != 0) { - setReleaseChannelValue(other.getReleaseChannelValue()); - } - if (other.hasEncryptionConfig()) { - mergeEncryptionConfig(other.getEncryptionConfig()); - } - if (other.hasNetworkConfig()) { - mergeNetworkConfig(other.getNetworkConfig()); - } - if (other.databaseType_ != 0) { - setDatabaseTypeValue(other.getDatabaseTypeValue()); - } - if (other.hasTelemetryConfig()) { - mergeTelemetryConfig(other.getTelemetryConfig()); - } - switch (other.getMetastoreConfigCase()) { - case HIVE_METASTORE_CONFIG: - { - mergeHiveMetastoreConfig(other.getHiveMetastoreConfig()); - break; - } - case METASTORECONFIG_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - input.readMessage( - getHiveMetastoreConfigFieldBuilder().getBuilder(), extensionRegistry); - metastoreConfigCase_ = 5; - break; - } // case 42 - case 58: - { - network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 58 - case 66: - { - endpointUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 66 - case 72: - { - port_ = input.readInt32(); - bitField0_ |= 0x00000080; - break; - } // case 72 - case 80: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 80 - case 90: - { - stateMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - break; - } // case 90 - case 98: - { - artifactGcsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - break; - } // case 98 - case 104: - { - tier_ = input.readEnum(); - bitField0_ |= 0x00000800; - break; - } // case 104 - case 114: - { - input.readMessage( - getMetadataIntegrationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 114 - case 122: - { - input.readMessage( - getMaintenanceWindowFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; - break; - } // case 122 - case 130: - { - uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - break; - } // case 130 - case 138: - { - input.readMessage( - getMetadataManagementActivityFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; - break; - } // case 138 - case 152: - { - releaseChannel_ = input.readEnum(); - bitField0_ |= 0x00010000; - break; - } // case 152 - case 162: - { - input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; - break; - } // case 162 - case 170: - { - input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00040000; - break; - } // case 170 - case 176: - { - databaseType_ = input.readEnum(); - bitField0_ |= 0x00080000; - break; - } // case 176 - case 186: - { - input.readMessage(getTelemetryConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00100000; - break; - } // case 186 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int metastoreConfigCase_ = 0; - private java.lang.Object metastoreConfig_; - - public MetastoreConfigCase getMetastoreConfigCase() { - return MetastoreConfigCase.forNumber(metastoreConfigCase_); - } - - public Builder clearMetastoreConfig() { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.HiveMetastoreConfig, - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder> - hiveMetastoreConfigBuilder_; - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - @java.lang.Override - public boolean hasHiveMetastoreConfig() { - return metastoreConfigCase_ == 5; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig getHiveMetastoreConfig() { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); - } else { - if (metastoreConfigCase_ == 5) { - return hiveMetastoreConfigBuilder_.getMessage(); - } - return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder setHiveMetastoreConfig( - com.google.cloud.metastore.v1beta.HiveMetastoreConfig value) { - if (hiveMetastoreConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metastoreConfig_ = value; - onChanged(); - } else { - hiveMetastoreConfigBuilder_.setMessage(value); - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder setHiveMetastoreConfig( - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder builderForValue) { - if (hiveMetastoreConfigBuilder_ == null) { - metastoreConfig_ = builderForValue.build(); - onChanged(); - } else { - hiveMetastoreConfigBuilder_.setMessage(builderForValue.build()); - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder mergeHiveMetastoreConfig( - com.google.cloud.metastore.v1beta.HiveMetastoreConfig value) { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5 - && metastoreConfig_ - != com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance()) { - metastoreConfig_ = - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.newBuilder( - (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - metastoreConfig_ = value; - } - onChanged(); - } else { - if (metastoreConfigCase_ == 5) { - hiveMetastoreConfigBuilder_.mergeFrom(value); - } else { - hiveMetastoreConfigBuilder_.setMessage(value); - } - } - metastoreConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - public Builder clearHiveMetastoreConfig() { - if (hiveMetastoreConfigBuilder_ == null) { - if (metastoreConfigCase_ == 5) { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - onChanged(); - } - } else { - if (metastoreConfigCase_ == 5) { - metastoreConfigCase_ = 0; - metastoreConfig_ = null; - } - hiveMetastoreConfigBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - public com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder - getHiveMetastoreConfigBuilder() { - return getHiveMetastoreConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder - getHiveMetastoreConfigOrBuilder() { - if ((metastoreConfigCase_ == 5) && (hiveMetastoreConfigBuilder_ != null)) { - return hiveMetastoreConfigBuilder_.getMessageOrBuilder(); - } else { - if (metastoreConfigCase_ == 5) { - return (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_; - } - return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Configuration information specific to running Hive metastore
-     * software as the metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.HiveMetastoreConfig, - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder> - getHiveMetastoreConfigFieldBuilder() { - if (hiveMetastoreConfigBuilder_ == null) { - if (!(metastoreConfigCase_ == 5)) { - metastoreConfig_ = - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); - } - hiveMetastoreConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.HiveMetastoreConfig, - com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder, - com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder>( - (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_, - getParentForChildren(), - isClean()); - metastoreConfig_ = null; - } - metastoreConfigCase_ = 5; - onChanged(); - return hiveMetastoreConfigBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the metastore service, in the
-     * following format:
-     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000008); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the metastore service was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000010; - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; - } - /** - * - * - *
-     * User-defined labels for the metastore service.
-     * 
- * - * map<string, string> labels = 4; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; - return this; - } - - private java.lang.Object network_ = ""; - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - public java.lang.String getNetwork() { - java.lang.Object ref = network_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - network_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - public com.google.protobuf.ByteString getNetworkBytes() { - java.lang.Object ref = network_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - network_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The network to set. - * @return This builder for chaining. - */ - public Builder setNetwork(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - network_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearNetwork() { - network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The relative resource name of the VPC network on which the
-     * instance can be accessed. It is specified in the following form:
-     * `projects/{project_number}/global/networks/{network_id}`.
-     * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for network to set. - * @return This builder for chaining. - */ - public Builder setNetworkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - network_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object endpointUri_ = ""; - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - public java.lang.String getEndpointUri() { - java.lang.Object ref = endpointUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - public com.google.protobuf.ByteString getEndpointUriBytes() { - java.lang.Object ref = endpointUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointUri() { - endpointUri_ = getDefaultInstance().getEndpointUri(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The URI of the endpoint used to access the metastore service.
-     * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for endpointUri to set. - * @return This builder for chaining. - */ - public Builder setEndpointUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointUri_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private int port_; - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @param value The port to set. - * @return This builder for chaining. - */ - public Builder setPort(int value) { - - port_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * - * - *
-     * The TCP port at which the metastore service is reached. Default: 9083.
-     * 
- * - * int32 port = 9; - * - * @return This builder for chaining. - */ - public Builder clearPort() { - bitField0_ = (bitField0_ & ~0x00000080); - port_ = 0; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service.State getState() { - com.google.cloud.metastore.v1beta.Service.State result = - com.google.cloud.metastore.v1beta.Service.State.forNumber(state_); - return result == null ? com.google.cloud.metastore.v1beta.Service.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.metastore.v1beta.Service.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000100); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object stateMessage_ = ""; - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - public java.lang.String getStateMessage() { - java.lang.Object ref = stateMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - public com.google.protobuf.ByteString getStateMessageBytes() { - java.lang.Object ref = stateMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - stateMessage_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - stateMessage_ = getDefaultInstance().getStateMessage(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional information about the current state of the
-     * metastore service, if available.
-     * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for stateMessage to set. - * @return This builder for chaining. - */ - public Builder setStateMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - stateMessage_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - private java.lang.Object artifactGcsUri_ = ""; - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - public java.lang.String getArtifactGcsUri() { - java.lang.Object ref = artifactGcsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - artifactGcsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - public com.google.protobuf.ByteString getArtifactGcsUriBytes() { - java.lang.Object ref = artifactGcsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - artifactGcsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The artifactGcsUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactGcsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - artifactGcsUri_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearArtifactGcsUri() { - artifactGcsUri_ = getDefaultInstance().getArtifactGcsUri(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-     * where artifacts related to the metastore service are stored.
-     * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for artifactGcsUri to set. - * @return This builder for chaining. - */ - public Builder setArtifactGcsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - artifactGcsUri_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - private int tier_ = 0; - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - @java.lang.Override - public int getTierValue() { - return tier_; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @param value The enum numeric value on the wire for tier to set. - * @return This builder for chaining. - */ - public Builder setTierValue(int value) { - tier_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @return The tier. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service.Tier getTier() { - com.google.cloud.metastore.v1beta.Service.Tier result = - com.google.cloud.metastore.v1beta.Service.Tier.forNumber(tier_); - return result == null ? com.google.cloud.metastore.v1beta.Service.Tier.UNRECOGNIZED : result; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @param value The tier to set. - * @return This builder for chaining. - */ - public Builder setTier(com.google.cloud.metastore.v1beta.Service.Tier value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - tier_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The tier of the service.
-     * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @return This builder for chaining. - */ - public Builder clearTier() { - bitField0_ = (bitField0_ & ~0x00000800); - tier_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.MetadataIntegration metadataIntegration_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataIntegration, - com.google.cloud.metastore.v1beta.MetadataIntegration.Builder, - com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder> - metadataIntegrationBuilder_; - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - * - * @return Whether the metadataIntegration field is set. - */ - public boolean hasMetadataIntegration() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - * - * @return The metadataIntegration. - */ - public com.google.cloud.metastore.v1beta.MetadataIntegration getMetadataIntegration() { - if (metadataIntegrationBuilder_ == null) { - return metadataIntegration_ == null - ? com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance() - : metadataIntegration_; - } else { - return metadataIntegrationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - public Builder setMetadataIntegration( - com.google.cloud.metastore.v1beta.MetadataIntegration value) { - if (metadataIntegrationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataIntegration_ = value; - } else { - metadataIntegrationBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - public Builder setMetadataIntegration( - com.google.cloud.metastore.v1beta.MetadataIntegration.Builder builderForValue) { - if (metadataIntegrationBuilder_ == null) { - metadataIntegration_ = builderForValue.build(); - } else { - metadataIntegrationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - public Builder mergeMetadataIntegration( - com.google.cloud.metastore.v1beta.MetadataIntegration value) { - if (metadataIntegrationBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) - && metadataIntegration_ != null - && metadataIntegration_ - != com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance()) { - getMetadataIntegrationBuilder().mergeFrom(value); - } else { - metadataIntegration_ = value; - } - } else { - metadataIntegrationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - public Builder clearMetadataIntegration() { - bitField0_ = (bitField0_ & ~0x00001000); - metadataIntegration_ = null; - if (metadataIntegrationBuilder_ != null) { - metadataIntegrationBuilder_.dispose(); - metadataIntegrationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - public com.google.cloud.metastore.v1beta.MetadataIntegration.Builder - getMetadataIntegrationBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getMetadataIntegrationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - public com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder - getMetadataIntegrationOrBuilder() { - if (metadataIntegrationBuilder_ != null) { - return metadataIntegrationBuilder_.getMessageOrBuilder(); - } else { - return metadataIntegration_ == null - ? com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance() - : metadataIntegration_; - } - } - /** - * - * - *
-     * The setting that defines how metastore metadata should be integrated with
-     * external services and systems.
-     * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataIntegration, - com.google.cloud.metastore.v1beta.MetadataIntegration.Builder, - com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder> - getMetadataIntegrationFieldBuilder() { - if (metadataIntegrationBuilder_ == null) { - metadataIntegrationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataIntegration, - com.google.cloud.metastore.v1beta.MetadataIntegration.Builder, - com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder>( - getMetadataIntegration(), getParentForChildren(), isClean()); - metadataIntegration_ = null; - } - return metadataIntegrationBuilder_; - } - - private com.google.cloud.metastore.v1beta.MaintenanceWindow maintenanceWindow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MaintenanceWindow, - com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder> - maintenanceWindowBuilder_; - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - public boolean hasMaintenanceWindow() { - return ((bitField0_ & 0x00002000) != 0); - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - public com.google.cloud.metastore.v1beta.MaintenanceWindow getMaintenanceWindow() { - if (maintenanceWindowBuilder_ == null) { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } else { - return maintenanceWindowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - public Builder setMaintenanceWindow(com.google.cloud.metastore.v1beta.MaintenanceWindow value) { - if (maintenanceWindowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maintenanceWindow_ = value; - } else { - maintenanceWindowBuilder_.setMessage(value); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - public Builder setMaintenanceWindow( - com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder builderForValue) { - if (maintenanceWindowBuilder_ == null) { - maintenanceWindow_ = builderForValue.build(); - } else { - maintenanceWindowBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - public Builder mergeMaintenanceWindow( - com.google.cloud.metastore.v1beta.MaintenanceWindow value) { - if (maintenanceWindowBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) - && maintenanceWindow_ != null - && maintenanceWindow_ - != com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance()) { - getMaintenanceWindowBuilder().mergeFrom(value); - } else { - maintenanceWindow_ = value; - } - } else { - maintenanceWindowBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - public Builder clearMaintenanceWindow() { - bitField0_ = (bitField0_ & ~0x00002000); - maintenanceWindow_ = null; - if (maintenanceWindowBuilder_ != null) { - maintenanceWindowBuilder_.dispose(); - maintenanceWindowBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - public com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder - getMaintenanceWindowBuilder() { - bitField0_ |= 0x00002000; - onChanged(); - return getMaintenanceWindowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - public com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder - getMaintenanceWindowOrBuilder() { - if (maintenanceWindowBuilder_ != null) { - return maintenanceWindowBuilder_.getMessageOrBuilder(); - } else { - return maintenanceWindow_ == null - ? com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance() - : maintenanceWindow_; - } - } - /** - * - * - *
-     * The one hour maintenance window of the metastore service. This specifies
-     * when the service can be restarted for maintenance purposes in UTC time.
-     * Maintenance window is not needed for services with the SPANNER
-     * database type.
-     * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MaintenanceWindow, - com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder> - getMaintenanceWindowFieldBuilder() { - if (maintenanceWindowBuilder_ == null) { - maintenanceWindowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MaintenanceWindow, - com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder, - com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder>( - getMaintenanceWindow(), getParentForChildren(), isClean()); - maintenanceWindow_ = null; - } - return maintenanceWindowBuilder_; - } - - private java.lang.Object uid_ = ""; - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - public java.lang.String getUid() { - java.lang.Object ref = uid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - public com.google.protobuf.ByteString getUidBytes() { - java.lang.Object ref = uid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uid to set. - * @return This builder for chaining. - */ - public Builder setUid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uid_ = value; - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearUid() { - uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00004000); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The globally unique resource identifier of the metastore
-     * service.
-     * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uid to set. - * @return This builder for chaining. - */ - public Builder setUidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uid_ = value; - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.MetadataManagementActivity - metadataManagementActivity_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataManagementActivity, - com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder> - metadataManagementActivityBuilder_; - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - public boolean hasMetadataManagementActivity() { - return ((bitField0_ & 0x00008000) != 0); - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - public com.google.cloud.metastore.v1beta.MetadataManagementActivity - getMetadataManagementActivity() { - if (metadataManagementActivityBuilder_ == null) { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } else { - return metadataManagementActivityBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataManagementActivity( - com.google.cloud.metastore.v1beta.MetadataManagementActivity value) { - if (metadataManagementActivityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataManagementActivity_ = value; - } else { - metadataManagementActivityBuilder_.setMessage(value); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadataManagementActivity( - com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder builderForValue) { - if (metadataManagementActivityBuilder_ == null) { - metadataManagementActivity_ = builderForValue.build(); - } else { - metadataManagementActivityBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeMetadataManagementActivity( - com.google.cloud.metastore.v1beta.MetadataManagementActivity value) { - if (metadataManagementActivityBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) - && metadataManagementActivity_ != null - && metadataManagementActivity_ - != com.google.cloud.metastore.v1beta.MetadataManagementActivity - .getDefaultInstance()) { - getMetadataManagementActivityBuilder().mergeFrom(value); - } else { - metadataManagementActivity_ = value; - } - } else { - metadataManagementActivityBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMetadataManagementActivity() { - bitField0_ = (bitField0_ & ~0x00008000); - metadataManagementActivity_ = null; - if (metadataManagementActivityBuilder_ != null) { - metadataManagementActivityBuilder_.dispose(); - metadataManagementActivityBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder - getMetadataManagementActivityBuilder() { - bitField0_ |= 0x00008000; - onChanged(); - return getMetadataManagementActivityFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder() { - if (metadataManagementActivityBuilder_ != null) { - return metadataManagementActivityBuilder_.getMessageOrBuilder(); - } else { - return metadataManagementActivity_ == null - ? com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance() - : metadataManagementActivity_; - } - } - /** - * - * - *
-     * Output only. The metadata management activities of the metastore service.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataManagementActivity, - com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder> - getMetadataManagementActivityFieldBuilder() { - if (metadataManagementActivityBuilder_ == null) { - metadataManagementActivityBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataManagementActivity, - com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder, - com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder>( - getMetadataManagementActivity(), getParentForChildren(), isClean()); - metadataManagementActivity_ = null; - } - return metadataManagementActivityBuilder_; - } - - private int releaseChannel_ = 0; - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - @java.lang.Override - public int getReleaseChannelValue() { - return releaseChannel_; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The enum numeric value on the wire for releaseChannel to set. - * @return This builder for chaining. - */ - public Builder setReleaseChannelValue(int value) { - releaseChannel_ = value; - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service.ReleaseChannel getReleaseChannel() { - com.google.cloud.metastore.v1beta.Service.ReleaseChannel result = - com.google.cloud.metastore.v1beta.Service.ReleaseChannel.forNumber(releaseChannel_); - return result == null - ? com.google.cloud.metastore.v1beta.Service.ReleaseChannel.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The releaseChannel to set. - * @return This builder for chaining. - */ - public Builder setReleaseChannel( - com.google.cloud.metastore.v1beta.Service.ReleaseChannel value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00010000; - releaseChannel_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The release channel of the service.
-     * If unspecified, defaults to `STABLE`.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearReleaseChannel() { - bitField0_ = (bitField0_ & ~0x00010000); - releaseChannel_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.EncryptionConfig, - com.google.cloud.metastore.v1beta.EncryptionConfig.Builder, - com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder> - encryptionConfigBuilder_; - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - public boolean hasEncryptionConfig() { - return ((bitField0_ & 0x00020000) != 0); - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - public com.google.cloud.metastore.v1beta.EncryptionConfig getEncryptionConfig() { - if (encryptionConfigBuilder_ == null) { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } else { - return encryptionConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setEncryptionConfig(com.google.cloud.metastore.v1beta.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encryptionConfig_ = value; - } else { - encryptionConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setEncryptionConfig( - com.google.cloud.metastore.v1beta.EncryptionConfig.Builder builderForValue) { - if (encryptionConfigBuilder_ == null) { - encryptionConfig_ = builderForValue.build(); - } else { - encryptionConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeEncryptionConfig(com.google.cloud.metastore.v1beta.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) - && encryptionConfig_ != null - && encryptionConfig_ - != com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance()) { - getEncryptionConfigBuilder().mergeFrom(value); - } else { - encryptionConfig_ = value; - } - } else { - encryptionConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearEncryptionConfig() { - bitField0_ = (bitField0_ & ~0x00020000); - encryptionConfig_ = null; - if (encryptionConfigBuilder_ != null) { - encryptionConfigBuilder_.dispose(); - encryptionConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1beta.EncryptionConfig.Builder getEncryptionConfigBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder - getEncryptionConfigOrBuilder() { - if (encryptionConfigBuilder_ != null) { - return encryptionConfigBuilder_.getMessageOrBuilder(); - } else { - return encryptionConfig_ == null - ? com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - } - /** - * - * - *
-     * Immutable. Information used to configure the Dataproc Metastore service to
-     * encrypt customer data at rest. Cannot be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.EncryptionConfig, - com.google.cloud.metastore.v1beta.EncryptionConfig.Builder, - com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { - if (encryptionConfigBuilder_ == null) { - encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.EncryptionConfig, - com.google.cloud.metastore.v1beta.EncryptionConfig.Builder, - com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder>( - getEncryptionConfig(), getParentForChildren(), isClean()); - encryptionConfig_ = null; - } - return encryptionConfigBuilder_; - } - - private com.google.cloud.metastore.v1beta.NetworkConfig networkConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig, - com.google.cloud.metastore.v1beta.NetworkConfig.Builder, - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder> - networkConfigBuilder_; - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - public boolean hasNetworkConfig() { - return ((bitField0_ & 0x00040000) != 0); - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - public com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig() { - if (networkConfigBuilder_ == null) { - return networkConfig_ == null - ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() - : networkConfig_; - } else { - return networkConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - public Builder setNetworkConfig(com.google.cloud.metastore.v1beta.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - networkConfig_ = value; - } else { - networkConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - public Builder setNetworkConfig( - com.google.cloud.metastore.v1beta.NetworkConfig.Builder builderForValue) { - if (networkConfigBuilder_ == null) { - networkConfig_ = builderForValue.build(); - } else { - networkConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - public Builder mergeNetworkConfig(com.google.cloud.metastore.v1beta.NetworkConfig value) { - if (networkConfigBuilder_ == null) { - if (((bitField0_ & 0x00040000) != 0) - && networkConfig_ != null - && networkConfig_ - != com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance()) { - getNetworkConfigBuilder().mergeFrom(value); - } else { - networkConfig_ = value; - } - } else { - networkConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - public Builder clearNetworkConfig() { - bitField0_ = (bitField0_ & ~0x00040000); - networkConfig_ = null; - if (networkConfigBuilder_ != null) { - networkConfigBuilder_.dispose(); - networkConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - public com.google.cloud.metastore.v1beta.NetworkConfig.Builder getNetworkConfigBuilder() { - bitField0_ |= 0x00040000; - onChanged(); - return getNetworkConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - public com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { - if (networkConfigBuilder_ != null) { - return networkConfigBuilder_.getMessageOrBuilder(); - } else { - return networkConfig_ == null - ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() - : networkConfig_; - } - } - /** - * - * - *
-     * The configuration specifying the network settings for the
-     * Dataproc Metastore service.
-     * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig, - com.google.cloud.metastore.v1beta.NetworkConfig.Builder, - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder> - getNetworkConfigFieldBuilder() { - if (networkConfigBuilder_ == null) { - networkConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.NetworkConfig, - com.google.cloud.metastore.v1beta.NetworkConfig.Builder, - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder>( - getNetworkConfig(), getParentForChildren(), isClean()); - networkConfig_ = null; - } - return networkConfigBuilder_; - } - - private int databaseType_ = 0; - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - @java.lang.Override - public int getDatabaseTypeValue() { - return databaseType_; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The enum numeric value on the wire for databaseType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseTypeValue(int value) { - databaseType_ = value; - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service.DatabaseType getDatabaseType() { - com.google.cloud.metastore.v1beta.Service.DatabaseType result = - com.google.cloud.metastore.v1beta.Service.DatabaseType.forNumber(databaseType_); - return result == null - ? com.google.cloud.metastore.v1beta.Service.DatabaseType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The databaseType to set. - * @return This builder for chaining. - */ - public Builder setDatabaseType(com.google.cloud.metastore.v1beta.Service.DatabaseType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00080000; - databaseType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. The database type that the Metastore service stores its data.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearDatabaseType() { - bitField0_ = (bitField0_ & ~0x00080000); - databaseType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.metastore.v1beta.TelemetryConfig telemetryConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.TelemetryConfig, - com.google.cloud.metastore.v1beta.TelemetryConfig.Builder, - com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder> - telemetryConfigBuilder_; - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - public boolean hasTelemetryConfig() { - return ((bitField0_ & 0x00100000) != 0); - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - public com.google.cloud.metastore.v1beta.TelemetryConfig getTelemetryConfig() { - if (telemetryConfigBuilder_ == null) { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } else { - return telemetryConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - public Builder setTelemetryConfig(com.google.cloud.metastore.v1beta.TelemetryConfig value) { - if (telemetryConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - telemetryConfig_ = value; - } else { - telemetryConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - public Builder setTelemetryConfig( - com.google.cloud.metastore.v1beta.TelemetryConfig.Builder builderForValue) { - if (telemetryConfigBuilder_ == null) { - telemetryConfig_ = builderForValue.build(); - } else { - telemetryConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - public Builder mergeTelemetryConfig(com.google.cloud.metastore.v1beta.TelemetryConfig value) { - if (telemetryConfigBuilder_ == null) { - if (((bitField0_ & 0x00100000) != 0) - && telemetryConfig_ != null - && telemetryConfig_ - != com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance()) { - getTelemetryConfigBuilder().mergeFrom(value); - } else { - telemetryConfig_ = value; - } - } else { - telemetryConfigBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - public Builder clearTelemetryConfig() { - bitField0_ = (bitField0_ & ~0x00100000); - telemetryConfig_ = null; - if (telemetryConfigBuilder_ != null) { - telemetryConfigBuilder_.dispose(); - telemetryConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - public com.google.cloud.metastore.v1beta.TelemetryConfig.Builder getTelemetryConfigBuilder() { - bitField0_ |= 0x00100000; - onChanged(); - return getTelemetryConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - public com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder - getTelemetryConfigOrBuilder() { - if (telemetryConfigBuilder_ != null) { - return telemetryConfigBuilder_.getMessageOrBuilder(); - } else { - return telemetryConfig_ == null - ? com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance() - : telemetryConfig_; - } - } - /** - * - * - *
-     * The configuration specifying telemetry settings for the Dataproc Metastore
-     * service. If unspecified defaults to `JSON`.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.TelemetryConfig, - com.google.cloud.metastore.v1beta.TelemetryConfig.Builder, - com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder> - getTelemetryConfigFieldBuilder() { - if (telemetryConfigBuilder_ == null) { - telemetryConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.TelemetryConfig, - com.google.cloud.metastore.v1beta.TelemetryConfig.Builder, - com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder>( - getTelemetryConfig(), getParentForChildren(), isClean()); - telemetryConfig_ = null; - } - return telemetryConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Service) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Service) - private static final com.google.cloud.metastore.v1beta.Service DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Service(); - } - - public static com.google.cloud.metastore.v1beta.Service getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Service parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceOrBuilder.java deleted file mode 100644 index 207459e09e2b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceOrBuilder.java +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface ServiceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Service) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return Whether the hiveMetastoreConfig field is set. - */ - boolean hasHiveMetastoreConfig(); - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - * - * @return The hiveMetastoreConfig. - */ - com.google.cloud.metastore.v1beta.HiveMetastoreConfig getHiveMetastoreConfig(); - /** - * - * - *
-   * Configuration information specific to running Hive metastore
-   * software as the metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; - */ - com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder(); - - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the
-   * following format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Immutable. The relative resource name of the metastore service, in the
-   * following format:
-   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time when the metastore service was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - int getLabelsCount(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * User-defined labels for the metastore service.
-   * 
- * - * map<string, string> labels = 4; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the
-   * instance can be accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - java.lang.String getNetwork(); - /** - * - * - *
-   * Immutable. The relative resource name of the VPC network on which the
-   * instance can be accessed. It is specified in the following form:
-   * `projects/{project_number}/global/networks/{network_id}`.
-   * 
- * - * - * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - com.google.protobuf.ByteString getNetworkBytes(); - - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endpointUri. - */ - java.lang.String getEndpointUri(); - /** - * - * - *
-   * Output only. The URI of the endpoint used to access the metastore service.
-   * 
- * - * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for endpointUri. - */ - com.google.protobuf.ByteString getEndpointUriBytes(); - - /** - * - * - *
-   * The TCP port at which the metastore service is reached. Default: 9083.
-   * 
- * - * int32 port = 9; - * - * @return The port. - */ - int getPort(); - - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The current state of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.metastore.v1beta.Service.State getState(); - - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore service, if available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - * - * - *
-   * Output only. Additional information about the current state of the
-   * metastore service, if available.
-   * 
- * - * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString getStateMessageBytes(); - - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-   * where artifacts related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The artifactGcsUri. - */ - java.lang.String getArtifactGcsUri(); - /** - * - * - *
-   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
-   * where artifacts related to the metastore service are stored.
-   * 
- * - * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for artifactGcsUri. - */ - com.google.protobuf.ByteString getArtifactGcsUriBytes(); - - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @return The enum numeric value on the wire for tier. - */ - int getTierValue(); - /** - * - * - *
-   * The tier of the service.
-   * 
- * - * .google.cloud.metastore.v1beta.Service.Tier tier = 13; - * - * @return The tier. - */ - com.google.cloud.metastore.v1beta.Service.Tier getTier(); - - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - * - * @return Whether the metadataIntegration field is set. - */ - boolean hasMetadataIntegration(); - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - * - * @return The metadataIntegration. - */ - com.google.cloud.metastore.v1beta.MetadataIntegration getMetadataIntegration(); - /** - * - * - *
-   * The setting that defines how metastore metadata should be integrated with
-   * external services and systems.
-   * 
- * - * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; - */ - com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder getMetadataIntegrationOrBuilder(); - - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - * - * @return Whether the maintenanceWindow field is set. - */ - boolean hasMaintenanceWindow(); - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - * - * @return The maintenanceWindow. - */ - com.google.cloud.metastore.v1beta.MaintenanceWindow getMaintenanceWindow(); - /** - * - * - *
-   * The one hour maintenance window of the metastore service. This specifies
-   * when the service can be restarted for maintenance purposes in UTC time.
-   * Maintenance window is not needed for services with the SPANNER
-   * database type.
-   * 
- * - * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; - */ - com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder(); - - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uid. - */ - java.lang.String getUid(); - /** - * - * - *
-   * Output only. The globally unique resource identifier of the metastore
-   * service.
-   * 
- * - * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uid. - */ - com.google.protobuf.ByteString getUidBytes(); - - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadataManagementActivity field is set. - */ - boolean hasMetadataManagementActivity(); - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadataManagementActivity. - */ - com.google.cloud.metastore.v1beta.MetadataManagementActivity getMetadataManagementActivity(); - /** - * - * - *
-   * Output only. The metadata management activities of the metastore service.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder - getMetadataManagementActivityOrBuilder(); - - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for releaseChannel. - */ - int getReleaseChannelValue(); - /** - * - * - *
-   * Immutable. The release channel of the service.
-   * If unspecified, defaults to `STABLE`.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The releaseChannel. - */ - com.google.cloud.metastore.v1beta.Service.ReleaseChannel getReleaseChannel(); - - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionConfig field is set. - */ - boolean hasEncryptionConfig(); - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionConfig. - */ - com.google.cloud.metastore.v1beta.EncryptionConfig getEncryptionConfig(); - /** - * - * - *
-   * Immutable. Information used to configure the Dataproc Metastore service to
-   * encrypt customer data at rest. Cannot be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); - - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - * - * @return Whether the networkConfig field is set. - */ - boolean hasNetworkConfig(); - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - * - * @return The networkConfig. - */ - com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig(); - /** - * - * - *
-   * The configuration specifying the network settings for the
-   * Dataproc Metastore service.
-   * 
- * - * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; - */ - com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); - - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for databaseType. - */ - int getDatabaseTypeValue(); - /** - * - * - *
-   * Immutable. The database type that the Metastore service stores its data.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The databaseType. - */ - com.google.cloud.metastore.v1beta.Service.DatabaseType getDatabaseType(); - - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - * - * @return Whether the telemetryConfig field is set. - */ - boolean hasTelemetryConfig(); - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - * - * @return The telemetryConfig. - */ - com.google.cloud.metastore.v1beta.TelemetryConfig getTelemetryConfig(); - /** - * - * - *
-   * The configuration specifying telemetry settings for the Dataproc Metastore
-   * service. If unspecified defaults to `JSON`.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; - */ - com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder(); - - public com.google.cloud.metastore.v1beta.Service.MetastoreConfigCase getMetastoreConfigCase(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfig.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfig.java deleted file mode 100644 index d390bed3215c..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfig.java +++ /dev/null @@ -1,754 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Telemetry Configuration for the Dataproc Metastore service.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.TelemetryConfig} - */ -public final class TelemetryConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.TelemetryConfig) - TelemetryConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use TelemetryConfig.newBuilder() to construct. - private TelemetryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TelemetryConfig() { - logFormat_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TelemetryConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_TelemetryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_TelemetryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.TelemetryConfig.class, - com.google.cloud.metastore.v1beta.TelemetryConfig.Builder.class); - } - - /** Protobuf enum {@code google.cloud.metastore.v1beta.TelemetryConfig.LogFormat} */ - public enum LogFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The LOG_FORMAT is not set.
-     * 
- * - * LOG_FORMAT_UNSPECIFIED = 0; - */ - LOG_FORMAT_UNSPECIFIED(0), - /** - * - * - *
-     * Logging output uses the legacy `textPayload` format.
-     * 
- * - * LEGACY = 1; - */ - LEGACY(1), - /** - * - * - *
-     * Logging output uses the `jsonPayload` format.
-     * 
- * - * JSON = 2; - */ - JSON(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The LOG_FORMAT is not set.
-     * 
- * - * LOG_FORMAT_UNSPECIFIED = 0; - */ - public static final int LOG_FORMAT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Logging output uses the legacy `textPayload` format.
-     * 
- * - * LEGACY = 1; - */ - public static final int LEGACY_VALUE = 1; - /** - * - * - *
-     * Logging output uses the `jsonPayload` format.
-     * 
- * - * JSON = 2; - */ - public static final int JSON_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LogFormat valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static LogFormat forNumber(int value) { - switch (value) { - case 0: - return LOG_FORMAT_UNSPECIFIED; - case 1: - return LEGACY; - case 2: - return JSON; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LogFormat findValueByNumber(int number) { - return LogFormat.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.TelemetryConfig.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final LogFormat[] VALUES = values(); - - public static LogFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private LogFormat(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.TelemetryConfig.LogFormat) - } - - public static final int LOG_FORMAT_FIELD_NUMBER = 1; - private int logFormat_ = 0; - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - @java.lang.Override - public int getLogFormatValue() { - return logFormat_; - } - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat getLogFormat() { - com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat result = - com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.forNumber(logFormat_); - return result == null - ? com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.UNRECOGNIZED - : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (logFormat_ - != com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, logFormat_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (logFormat_ - != com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, logFormat_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.TelemetryConfig)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.TelemetryConfig other = - (com.google.cloud.metastore.v1beta.TelemetryConfig) obj; - - if (logFormat_ != other.logFormat_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOG_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + logFormat_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.metastore.v1beta.TelemetryConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Telemetry Configuration for the Dataproc Metastore service.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.TelemetryConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.TelemetryConfig) - com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_TelemetryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_TelemetryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.TelemetryConfig.class, - com.google.cloud.metastore.v1beta.TelemetryConfig.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.TelemetryConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - logFormat_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_TelemetryConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.TelemetryConfig getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.TelemetryConfig build() { - com.google.cloud.metastore.v1beta.TelemetryConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.TelemetryConfig buildPartial() { - com.google.cloud.metastore.v1beta.TelemetryConfig result = - new com.google.cloud.metastore.v1beta.TelemetryConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.TelemetryConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.logFormat_ = logFormat_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.TelemetryConfig) { - return mergeFrom((com.google.cloud.metastore.v1beta.TelemetryConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.TelemetryConfig other) { - if (other == com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance()) - return this; - if (other.logFormat_ != 0) { - setLogFormatValue(other.getLogFormatValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - logFormat_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int logFormat_ = 0; - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - @java.lang.Override - public int getLogFormatValue() { - return logFormat_; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @param value The enum numeric value on the wire for logFormat to set. - * @return This builder for chaining. - */ - public Builder setLogFormatValue(int value) { - logFormat_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat getLogFormat() { - com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat result = - com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.forNumber(logFormat_); - return result == null - ? com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @param value The logFormat to set. - * @return This builder for chaining. - */ - public Builder setLogFormat(com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - logFormat_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The output format of the Dataproc Metastore service's logs.
-     * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @return This builder for chaining. - */ - public Builder clearLogFormat() { - bitField0_ = (bitField0_ & ~0x00000001); - logFormat_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.TelemetryConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.TelemetryConfig) - private static final com.google.cloud.metastore.v1beta.TelemetryConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.TelemetryConfig(); - } - - public static com.google.cloud.metastore.v1beta.TelemetryConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TelemetryConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.TelemetryConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfigOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfigOrBuilder.java deleted file mode 100644 index e798c8a50ce0..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfigOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface TelemetryConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.TelemetryConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @return The enum numeric value on the wire for logFormat. - */ - int getLogFormatValue(); - /** - * - * - *
-   * The output format of the Dataproc Metastore service's logs.
-   * 
- * - * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; - * - * @return The logFormat. - */ - com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat getLogFormat(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequest.java deleted file mode 100644 index a0163d669ea7..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequest.java +++ /dev/null @@ -1,1326 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for UpdateFederation.
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.UpdateFederationRequest} - */ -public final class UpdateFederationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.UpdateFederationRequest) - UpdateFederationRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateFederationRequest.newBuilder() to construct. - private UpdateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateFederationRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateFederationRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.UpdateFederationRequest.class, - com.google.cloud.metastore.v1beta.UpdateFederationRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int FEDERATION_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1beta.Federation federation_; - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - @java.lang.Override - public boolean hasFederation() { - return federation_ != null; - } - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Federation getFederation() { - return federation_ == null - ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() - : federation_; - } - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder() { - return federation_ == null - ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() - : federation_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (federation_ != null) { - output.writeMessage(2, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (federation_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFederation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.UpdateFederationRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.UpdateFederationRequest other = - (com.google.cloud.metastore.v1beta.UpdateFederationRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasFederation() != other.hasFederation()) return false; - if (hasFederation()) { - if (!getFederation().equals(other.getFederation())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasFederation()) { - hash = (37 * hash) + FEDERATION_FIELD_NUMBER; - hash = (53 * hash) + getFederation().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.UpdateFederationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for UpdateFederation.
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.UpdateFederationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.UpdateFederationRequest) - com.google.cloud.metastore.v1beta.UpdateFederationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.UpdateFederationRequest.class, - com.google.cloud.metastore.v1beta.UpdateFederationRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.UpdateFederationRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreFederationProto - .internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateFederationRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.UpdateFederationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateFederationRequest build() { - com.google.cloud.metastore.v1beta.UpdateFederationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateFederationRequest buildPartial() { - com.google.cloud.metastore.v1beta.UpdateFederationRequest result = - new com.google.cloud.metastore.v1beta.UpdateFederationRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.UpdateFederationRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.federation_ = federationBuilder_ == null ? federation_ : federationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.UpdateFederationRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.UpdateFederationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.UpdateFederationRequest other) { - if (other == com.google.cloud.metastore.v1beta.UpdateFederationRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasFederation()) { - mergeFederation(other.getFederation()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getFederationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1beta.Federation federation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder> - federationBuilder_; - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - public boolean hasFederation() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - public com.google.cloud.metastore.v1beta.Federation getFederation() { - if (federationBuilder_ == null) { - return federation_ == null - ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() - : federation_; - } else { - return federationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation(com.google.cloud.metastore.v1beta.Federation value) { - if (federationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - federation_ = value; - } else { - federationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setFederation( - com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { - if (federationBuilder_ == null) { - federation_ = builderForValue.build(); - } else { - federationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeFederation(com.google.cloud.metastore.v1beta.Federation value) { - if (federationBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && federation_ != null - && federation_ != com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()) { - getFederationBuilder().mergeFrom(value); - } else { - federation_ = value; - } - } else { - federationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearFederation() { - bitField0_ = (bitField0_ & ~0x00000002); - federation_ = null; - if (federationBuilder_ != null) { - federationBuilder_.dispose(); - federationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.Federation.Builder getFederationBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getFederationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder() { - if (federationBuilder_ != null) { - return federationBuilder_.getMessageOrBuilder(); - } else { - return federation_ == null - ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() - : federation_; - } - } - /** - * - * - *
-     * Required. The metastore federation to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore federation's `name` field is used to identify the
-     * metastore service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder> - getFederationFieldBuilder() { - if (federationBuilder_ == null) { - federationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Federation, - com.google.cloud.metastore.v1beta.Federation.Builder, - com.google.cloud.metastore.v1beta.FederationOrBuilder>( - getFederation(), getParentForChildren(), isClean()); - federation_ = null; - } - return federationBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.UpdateFederationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.UpdateFederationRequest) - private static final com.google.cloud.metastore.v1beta.UpdateFederationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.UpdateFederationRequest(); - } - - public static com.google.cloud.metastore.v1beta.UpdateFederationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateFederationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateFederationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequestOrBuilder.java deleted file mode 100644 index 630bee0ee08a..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore_federation.proto - -package com.google.cloud.metastore.v1beta; - -public interface UpdateFederationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.UpdateFederationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the federation field is set. - */ - boolean hasFederation(); - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The federation. - */ - com.google.cloud.metastore.v1beta.Federation getFederation(); - /** - * - * - *
-   * Required. The metastore federation to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore federation's `name` field is used to identify the
-   * metastore service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequest.java deleted file mode 100644 index ec96201eaf3b..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequest.java +++ /dev/null @@ -1,1334 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImport].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.UpdateMetadataImportRequest} - */ -public final class UpdateMetadataImportRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) - UpdateMetadataImportRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateMetadataImportRequest.newBuilder() to construct. - private UpdateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateMetadataImportRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateMetadataImportRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.class, - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int METADATA_IMPORT_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1beta.MetadataImport metadataImport_; - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - @java.lang.Override - public boolean hasMetadataImport() { - return metadataImport_ != null; - } - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() - : metadataImport_; - } - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder() { - return metadataImport_ == null - ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() - : metadataImport_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (metadataImport_ != null) { - output.writeMessage(2, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (metadataImport_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadataImport()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest other = - (com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasMetadataImport() != other.hasMetadataImport()) return false; - if (hasMetadataImport()) { - if (!getMetadataImport().equals(other.getMetadataImport())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasMetadataImport()) { - hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; - hash = (53 * hash) + getMetadataImport().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImport].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.UpdateMetadataImportRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.class, - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest - getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest build() { - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest buildPartial() { - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest result = - new com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadataImport_ = - metadataImportBuilder_ == null ? metadataImport_ : metadataImportBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest other) { - if (other - == com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasMetadataImport()) { - mergeMetadataImport(other.getMetadataImport()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getMetadataImportFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1beta.MetadataImport metadataImport_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> - metadataImportBuilder_; - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - public boolean hasMetadataImport() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport() { - if (metadataImportBuilder_ == null) { - return metadataImport_ == null - ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() - : metadataImport_; - } else { - return metadataImportBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport(com.google.cloud.metastore.v1beta.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadataImport_ = value; - } else { - metadataImportBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setMetadataImport( - com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { - if (metadataImportBuilder_ == null) { - metadataImport_ = builderForValue.build(); - } else { - metadataImportBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeMetadataImport(com.google.cloud.metastore.v1beta.MetadataImport value) { - if (metadataImportBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && metadataImport_ != null - && metadataImport_ - != com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()) { - getMetadataImportBuilder().mergeFrom(value); - } else { - metadataImport_ = value; - } - } else { - metadataImportBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearMetadataImport() { - bitField0_ = (bitField0_ & ~0x00000002); - metadataImport_ = null; - if (metadataImportBuilder_ != null) { - metadataImportBuilder_.dispose(); - metadataImportBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataImport.Builder getMetadataImportBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataImportFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder() { - if (metadataImportBuilder_ != null) { - return metadataImportBuilder_.getMessageOrBuilder(); - } else { - return metadataImport_ == null - ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() - : metadataImport_; - } - } - /** - * - * - *
-     * Required. The metadata import to update. The server only merges fields
-     * in the import if they are specified in `update_mask`.
-     * The metadata import's `name` field is used to identify the metastore
-     * import to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> - getMetadataImportFieldBuilder() { - if (metadataImportBuilder_ == null) { - metadataImportBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.MetadataImport, - com.google.cloud.metastore.v1beta.MetadataImport.Builder, - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder>( - getMetadataImport(), getParentForChildren(), isClean()); - metadataImport_ = null; - } - return metadataImportBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) - private static final com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest(); - } - - public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateMetadataImportRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequestOrBuilder.java deleted file mode 100644 index f57c3c8ddab5..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface UpdateMetadataImportRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the metadataImport field is set. - */ - boolean hasMetadataImport(); - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The metadataImport. - */ - com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport(); - /** - * - * - *
-   * Required. The metadata import to update. The server only merges fields
-   * in the import if they are specified in `update_mask`.
-   * The metadata import's `name` field is used to identify the metastore
-   * import to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequest.java deleted file mode 100644 index e1ccd3e08f67..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequest.java +++ /dev/null @@ -1,1327 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -/** - * - * - *
- * Request message for
- * [DataprocMetastore.UpdateService][google.cloud.metastore.v1beta.DataprocMetastore.UpdateService].
- * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.UpdateServiceRequest} - */ -public final class UpdateServiceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.UpdateServiceRequest) - UpdateServiceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateServiceRequest.newBuilder() to construct. - private UpdateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateServiceRequest() { - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateServiceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.UpdateServiceRequest.class, - com.google.cloud.metastore.v1beta.UpdateServiceRequest.Builder.class); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 1; - private com.google.protobuf.FieldMask 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - public static final int SERVICE_FIELD_NUMBER = 2; - private com.google.cloud.metastore.v1beta.Service service_; - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - @java.lang.Override - public boolean hasService() { - return service_ != null; - } - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.Service getService() { - return service_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : service_; - } - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder() { - return service_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : service_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object requestId_ = ""; - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (updateMask_ != null) { - output.writeMessage(1, getUpdateMask()); - } - if (service_ != null) { - output.writeMessage(2, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); - } - if (service_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getService()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.metastore.v1beta.UpdateServiceRequest)) { - return super.equals(obj); - } - com.google.cloud.metastore.v1beta.UpdateServiceRequest other = - (com.google.cloud.metastore.v1beta.UpdateServiceRequest) obj; - - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (hasService() != other.hasService()) return false; - if (hasService()) { - if (!getService().equals(other.getService())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - if (hasService()) { - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.metastore.v1beta.UpdateServiceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for
-   * [DataprocMetastore.UpdateService][google.cloud.metastore.v1beta.DataprocMetastore.UpdateService].
-   * 
- * - * Protobuf type {@code google.cloud.metastore.v1beta.UpdateServiceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.UpdateServiceRequest) - com.google.cloud.metastore.v1beta.UpdateServiceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.metastore.v1beta.UpdateServiceRequest.class, - com.google.cloud.metastore.v1beta.UpdateServiceRequest.Builder.class); - } - - // Construct using com.google.cloud.metastore.v1beta.UpdateServiceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - requestId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.metastore.v1beta.MetastoreProto - .internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateServiceRequest getDefaultInstanceForType() { - return com.google.cloud.metastore.v1beta.UpdateServiceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateServiceRequest build() { - com.google.cloud.metastore.v1beta.UpdateServiceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateServiceRequest buildPartial() { - com.google.cloud.metastore.v1beta.UpdateServiceRequest result = - new com.google.cloud.metastore.v1beta.UpdateServiceRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.metastore.v1beta.UpdateServiceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.service_ = serviceBuilder_ == null ? service_ : serviceBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.requestId_ = requestId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.metastore.v1beta.UpdateServiceRequest) { - return mergeFrom((com.google.cloud.metastore.v1beta.UpdateServiceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.metastore.v1beta.UpdateServiceRequest other) { - if (other == com.google.cloud.metastore.v1beta.UpdateServiceRequest.getDefaultInstance()) - return this; - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (other.hasService()) { - mergeService(other.getService()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getServiceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - requestId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : 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.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private com.google.cloud.metastore.v1beta.Service service_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder> - serviceBuilder_; - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - public boolean hasService() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - public com.google.cloud.metastore.v1beta.Service getService() { - if (serviceBuilder_ == null) { - return service_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : service_; - } else { - return serviceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1beta.Service value) { - if (serviceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - service_ = value; - } else { - serviceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setService(com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { - if (serviceBuilder_ == null) { - service_ = builderForValue.build(); - } else { - serviceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeService(com.google.cloud.metastore.v1beta.Service value) { - if (serviceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && service_ != null - && service_ != com.google.cloud.metastore.v1beta.Service.getDefaultInstance()) { - getServiceBuilder().mergeFrom(value); - } else { - service_ = value; - } - } else { - serviceBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearService() { - bitField0_ = (bitField0_ & ~0x00000002); - service_ = null; - if (serviceBuilder_ != null) { - serviceBuilder_.dispose(); - serviceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.Service.Builder getServiceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getServiceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder() { - if (serviceBuilder_ != null) { - return serviceBuilder_.getMessageOrBuilder(); - } else { - return service_ == null - ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() - : service_; - } - } - /** - * - * - *
-     * Required. The metastore service to update. The server only merges fields
-     * in the service if they are specified in `update_mask`.
-     * The metastore service's `name` field is used to identify the metastore
-     * service to be updated.
-     * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder> - getServiceFieldBuilder() { - if (serviceBuilder_ == null) { - serviceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.metastore.v1beta.Service, - com.google.cloud.metastore.v1beta.Service.Builder, - com.google.cloud.metastore.v1beta.ServiceOrBuilder>( - getService(), getParentForChildren(), isClean()); - service_ = null; - } - return serviceBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - requestId_ = getDefaultInstance().getRequestId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A request ID. Specify a unique request ID to allow the server to
-     * ignore the request if it has completed. The server will ignore subsequent
-     * requests that provide a duplicate request ID for at least 60 minutes after
-     * the first request.
-     * For example, if an initial request times out, followed by another request
-     * with the same request ID, the server ignores the second request to prevent
-     * the creation of duplicate commitments.
-     * The request ID must be a valid
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - requestId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.UpdateServiceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.UpdateServiceRequest) - private static final com.google.cloud.metastore.v1beta.UpdateServiceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.UpdateServiceRequest(); - } - - public static com.google.cloud.metastore.v1beta.UpdateServiceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateServiceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.metastore.v1beta.UpdateServiceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequestOrBuilder.java deleted file mode 100644 index 45ea66cf2fc6..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequestOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/metastore/v1beta/metastore.proto - -package com.google.cloud.metastore.v1beta; - -public interface UpdateServiceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.UpdateServiceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * 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.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the service field is set. - */ - boolean hasService(); - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The service. - */ - com.google.cloud.metastore.v1beta.Service getService(); - /** - * - * - *
-   * Required. The metastore service to update. The server only merges fields
-   * in the service if they are specified in `update_mask`.
-   * The metastore service's `name` field is used to identify the metastore
-   * service to be updated.
-   * 
- * - * - * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder(); - - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A request ID. Specify a unique request ID to allow the server to
-   * ignore the request if it has completed. The server will ignore subsequent
-   * requests that provide a duplicate request ID for at least 60 minutes after
-   * the first request.
-   * For example, if an initial request times out, followed by another request
-   * with the same request ID, the server ignores the second request to prevent
-   * the creation of duplicate commitments.
-   * The request ID must be a valid
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
-   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore.proto b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore.proto deleted file mode 100644 index 0cb4edd95bce..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore.proto +++ /dev/null @@ -1,1627 +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 -// -// http://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. - -syntax = "proto3"; - -package google.cloud.metastore.v1beta; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/type/dayofweek.proto"; - -option go_package = "cloud.google.com/go/metastore/apiv1beta/metastorepb;metastorepb"; -option java_multiple_files = true; -option java_outer_classname = "MetastoreProto"; -option java_package = "com.google.cloud.metastore.v1beta"; -option php_namespace = "Google\\Cloud\\Metastore\\V1beta"; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Network" - pattern: "projects/{project}/global/networks/{network}" -}; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Subnetwork" - pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" -}; -option (google.api.resource_definition) = { - type: "dataplex.googleapis.com/Lake" - pattern: "projects/{project}/locations/{location}/lakes/{lake}" -}; - -// 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: -// -// * The service works with a collection of Google Cloud projects, named: -// `/projects/*` -// * Each project has a collection of available locations, named: `/locations/*` -// (a location must refer to a Google Cloud `region`) -// * Each location has a collection of services, named: `/services/*` -// * Dataproc Metastore services are resources with names of the form: -// -// `/projects/{project_number}/locations/{location_id}/services/{service_id}`. -service DataprocMetastore { - option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists services in a project and location. - rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { - option (google.api.http) = { - get: "/v1beta/{parent=projects/*/locations/*}/services" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a single service. - rpc GetService(GetServiceRequest) returns (Service) { - option (google.api.http) = { - get: "/v1beta/{name=projects/*/locations/*/services/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a metastore service in a project and location. - rpc CreateService(CreateServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{parent=projects/*/locations/*}/services" - body: "service" - }; - option (google.api.method_signature) = "parent,service,service_id"; - option (google.longrunning.operation_info) = { - response_type: "Service" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Updates the parameters of a single service. - rpc UpdateService(UpdateServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta/{service.name=projects/*/locations/*/services/*}" - body: "service" - }; - option (google.api.method_signature) = "service,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Service" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Deletes a single service. - rpc DeleteService(DeleteServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta/{name=projects/*/locations/*/services/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Lists imports in a service. - rpc ListMetadataImports(ListMetadataImportsRequest) - returns (ListMetadataImportsResponse) { - option (google.api.http) = { - get: "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single import. - rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) { - option (google.api.http) = { - get: "/v1beta/{name=projects/*/locations/*/services/*/metadataImports/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new MetadataImport in a given project and location. - rpc CreateMetadataImport(CreateMetadataImportRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports" - body: "metadata_import" - }; - option (google.api.method_signature) = - "parent,metadata_import,metadata_import_id"; - option (google.longrunning.operation_info) = { - response_type: "MetadataImport" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Updates a single import. - // Only the description field of MetadataImport is supported to be updated. - rpc UpdateMetadataImport(UpdateMetadataImportRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}" - body: "metadata_import" - }; - option (google.api.method_signature) = "metadata_import,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "MetadataImport" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Exports metadata from a service. - rpc ExportMetadata(ExportMetadataRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{service=projects/*/locations/*/services/*}:exportMetadata" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "MetadataExport" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Restores a service from a backup. - rpc RestoreService(RestoreServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{service=projects/*/locations/*/services/*}:restore" - body: "*" - }; - option (google.api.method_signature) = "service,backup"; - option (google.longrunning.operation_info) = { - response_type: "Restore" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Lists backups in a service. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1beta/{parent=projects/*/locations/*/services/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single backup. - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1beta/{name=projects/*/locations/*/services/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new backup in a given project and location. - rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{parent=projects/*/locations/*/services/*}/backups" - body: "backup" - }; - option (google.api.method_signature) = "parent,backup,backup_id"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Deletes a single backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta/{name=projects/*/locations/*/services/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Removes the attached IAM policies for a resource - rpc RemoveIamPolicy(RemoveIamPolicyRequest) - returns (RemoveIamPolicyResponse) { - option (google.api.http) = { - post: "/v1beta/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy" - body: "*" - }; - } - - // Query DPMS metadata. - rpc QueryMetadata(QueryMetadataRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{service=projects/*/locations/*/services/*}:queryMetadata" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "QueryMetadataResponse" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Move a table to another database. - rpc MoveTableToDatabase(MoveTableToDatabaseRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{service=projects/*/locations/*/services/*}:moveTableToDatabase" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "MoveTableToDatabaseResponse" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Alter metadata resource location. The metadata resource can be a database, - // table, or partition. This functionality only updates the parent directory - // for the respective metadata resource and does not transfer any existing - // data to the new location. - rpc AlterMetadataResourceLocation(AlterMetadataResourceLocationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{service=projects/*/locations/*/services/*}:alterLocation" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "AlterMetadataResourceLocationResponse" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } -} - -// A managed metastore service that serves metadata queries. -message Service { - option (google.api.resource) = { - type: "metastore.googleapis.com/Service" - pattern: "projects/{project}/locations/{location}/services/{service}" - }; - - // The current state of the metastore service. - enum State { - // The state of the metastore service is unknown. - STATE_UNSPECIFIED = 0; - - // The metastore service is in the process of being created. - CREATING = 1; - - // The metastore service is running and ready to serve queries. - ACTIVE = 2; - - // The metastore service is entering suspension. Its query-serving - // availability may cease unexpectedly. - SUSPENDING = 3; - - // The metastore service is suspended and unable to serve queries. - SUSPENDED = 4; - - // The metastore service is being updated. It remains usable but cannot - // accept additional update requests or be deleted at this time. - UPDATING = 5; - - // The metastore service is undergoing deletion. It cannot be used. - DELETING = 6; - - // The metastore service has encountered an error and cannot be used. The - // metastore service should be deleted. - ERROR = 7; - } - - // Available service tiers. - enum Tier { - // The tier is not set. - TIER_UNSPECIFIED = 0; - - // The developer tier provides limited scalability and no fault tolerance. - // Good for low-cost proof-of-concept. - DEVELOPER = 1; - - // The enterprise tier provides multi-zone high availability, and sufficient - // scalability for enterprise-level Dataproc Metastore workloads. - ENTERPRISE = 3; - } - - // Release channels bundle features of varying levels of stability. Newer - // features may be introduced initially into less stable release channels and - // can be automatically promoted into more stable release channels. - enum ReleaseChannel { - // Release channel is not specified. - RELEASE_CHANNEL_UNSPECIFIED = 0; - - // The `CANARY` release channel contains the newest features, which may be - // unstable and subject to unresolved issues with no known workarounds. - // Services using the `CANARY` release channel are not subject to any SLAs. - CANARY = 1; - - // The `STABLE` release channel contains features that are considered stable - // and have been validated for production use. - STABLE = 2; - } - - // The backend database type for the metastore service. - enum DatabaseType { - // The DATABASE_TYPE is not set. - DATABASE_TYPE_UNSPECIFIED = 0; - - // MySQL is used to persist the metastore data. - MYSQL = 1; - - // Spanner is used to persist the metastore data. - SPANNER = 2; - } - - // Configuration properties specific to the underlying metastore service - // technology (the software that serves metastore queries). - oneof metastore_config { - // Configuration information specific to running Hive metastore - // software as the metastore service. - HiveMetastoreConfig hive_metastore_config = 5; - } - - // Immutable. The relative resource name of the metastore service, in the - // following format: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the metastore service was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metastore service was last updated. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // User-defined labels for the metastore service. - map labels = 4; - - // Immutable. The relative resource name of the VPC network on which the - // instance can be accessed. It is specified in the following form: - // - // `projects/{project_number}/global/networks/{network_id}`. - string network = 7 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } - ]; - - // Output only. The URI of the endpoint used to access the metastore service. - string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The TCP port at which the metastore service is reached. Default: 9083. - int32 port = 9; - - // Output only. The current state of the metastore service. - State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the current state of the - // metastore service, if available. - string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A Cloud Storage URI (starting with `gs://`) that specifies - // where artifacts related to the metastore service are stored. - string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The tier of the service. - Tier tier = 13; - - // The setting that defines how metastore metadata should be integrated with - // external services and systems. - MetadataIntegration metadata_integration = 14; - - // The one hour maintenance window of the metastore service. This specifies - // when the service can be restarted for maintenance purposes in UTC time. - // Maintenance window is not needed for services with the SPANNER - // database type. - MaintenanceWindow maintenance_window = 15; - - // Output only. The globally unique resource identifier of the metastore - // service. - string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The metadata management activities of the metastore service. - MetadataManagementActivity metadata_management_activity = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Immutable. The release channel of the service. - // If unspecified, defaults to `STABLE`. - ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. Information used to configure the Dataproc Metastore service to - // encrypt customer data at rest. Cannot be updated. - EncryptionConfig encryption_config = 20 - [(google.api.field_behavior) = IMMUTABLE]; - - // The configuration specifying the network settings for the - // Dataproc Metastore service. - NetworkConfig network_config = 21; - - // Immutable. The database type that the Metastore service stores its data. - DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; - - // The configuration specifying telemetry settings for the Dataproc Metastore - // service. If unspecified defaults to `JSON`. - TelemetryConfig telemetry_config = 23; -} - -// Specifies how metastore metadata should be integrated with external services. -message MetadataIntegration { - // The integration config for the Data Catalog service. - DataCatalogConfig data_catalog_config = 1; - - // The integration config for the Dataplex service. - DataplexConfig dataplex_config = 2; -} - -// Specifies how metastore metadata should be integrated with the Data Catalog -// service. -message DataCatalogConfig { - // Defines whether the metastore metadata should be synced to Data Catalog. - // The default value is to disable syncing metastore metadata to Data Catalog. - bool enabled = 2; -} - -// Specifies how metastore metadata should be integrated with the Dataplex -// service. -message DataplexConfig { - // A reference to the Lake resources that this metastore service is attached - // to. The key is the lake resource name. Example: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - map lake_resources = 1; -} - -// Represents a Lake resource -message Lake { - // The Lake resource name. - // Example: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` - string name = 1 [ - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; -} - -// Maintenance window. This specifies when Dataproc Metastore -// may perform system maintenance operation to the service. -message MaintenanceWindow { - // The hour of day (0-23) when the window starts. - google.protobuf.Int32Value hour_of_day = 1; - - // The day of week, when the window starts. - google.type.DayOfWeek day_of_week = 2; -} - -// Specifies configuration information specific to running Hive metastore -// software as the metastore service. -message HiveMetastoreConfig { - // Protocols available for serving the metastore service endpoint. - enum EndpointProtocol { - // The protocol is not set. - ENDPOINT_PROTOCOL_UNSPECIFIED = 0; - - // Use the legacy Apache Thrift protocol for the metastore service endpoint. - THRIFT = 1; - - // Use the modernized gRPC protocol for the metastore service endpoint. - GRPC = 2; - } - - // Immutable. The Hive metastore schema version. - string version = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // A mapping of Hive metastore configuration key-value pairs to apply to the - // Hive metastore (configured in `hive-site.xml`). The mappings - // override system defaults (some keys cannot be overridden). These - // overrides are also applied to auxiliary versions and can be further - // customized in the auxiliary version's `AuxiliaryVersionConfig`. - map config_overrides = 2; - - // Information used to configure the Hive metastore service as a service - // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService` - // method and specify this field's path - // (`hive_metastore_config.kerberos_config`) in the request's `update_mask` - // while omitting this field from the request's `service`. - KerberosConfig kerberos_config = 3; - - // The protocol to use for the metastore service endpoint. If unspecified, - // defaults to `THRIFT`. - EndpointProtocol endpoint_protocol = 4; - - // A mapping of Hive metastore version to the auxiliary version - // configuration. When specified, a secondary Hive metastore service is - // created along with the primary service. All auxiliary versions must be less - // than the service's primary version. The key is the auxiliary service name - // and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This - // means that the first character must be a lowercase letter, and all the - // following characters must be hyphens, lowercase letters, or digits, except - // the last character, which cannot be a hyphen. - map auxiliary_versions = 5; -} - -// Configuration information for a Kerberos principal. -message KerberosConfig { - // A Kerberos keytab file that can be used to authenticate a service principal - // with a Kerberos Key Distribution Center (KDC). - Secret keytab = 1; - - // A Kerberos principal that exists in the both the keytab the KDC - // to authenticate as. A typical principal is of the form - // `primary/instance@REALM`, but there is no exact format. - string principal = 2; - - // A Cloud Storage URI that specifies the path to a - // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`, - // although the file does not need to be named krb5.conf explicitly. - string krb5_config_gcs_uri = 3; -} - -// A securely stored value. -message Secret { - oneof value { - // The relative resource name of a Secret Manager secret version, in the - // following form: - // - // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`. - string cloud_secret = 2; - } -} - -// Encryption settings for the service. -message EncryptionConfig { - // The fully qualified customer provided Cloud KMS key name to use for - // customer data encryption, in the following form: - // - // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`. - string kms_key = 1; -} - -// Configuration information for the auxiliary service versions. -message AuxiliaryVersionConfig { - // The Hive metastore version of the auxiliary service. It must be less - // than the primary Hive metastore service's version. - string version = 1; - - // A mapping of Hive metastore configuration key-value pairs to apply to the - // auxiliary Hive metastore (configured in `hive-site.xml`) in addition to - // the primary version's overrides. If keys are present in both the auxiliary - // version's overrides and the primary version's overrides, the value from - // the auxiliary version's overrides takes precedence. - map config_overrides = 2; - - // Output only. The network configuration contains the endpoint URI(s) of the - // auxiliary Hive metastore service. - NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Network configuration for the Dataproc Metastore service. -message NetworkConfig { - // Contains information of the customer's network configurations. - message Consumer { - oneof vpc_resource { - // Immutable. The subnetwork of the customer project from which an IP - // address is reserved and used as the Dataproc Metastore service's - // endpoint. It is accessible to hosts in the subnet and to all - // hosts in a subnet in the same region and same network. There must - // be at least one IP address available in the subnet's primary range. The - // subnet is specified in the following form: - // - // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}` - string subnetwork = 1 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "compute.googleapis.com/Subnetwork" - } - ]; - } - - // Output only. The URI of the endpoint used to access the metastore - // service. - string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Immutable. The consumer-side network configuration for the Dataproc - // Metastore instance. - repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; -} - -// Telemetry Configuration for the Dataproc Metastore service. -message TelemetryConfig { - enum LogFormat { - // The LOG_FORMAT is not set. - LOG_FORMAT_UNSPECIFIED = 0; - - // Logging output uses the legacy `textPayload` format. - LEGACY = 1; - - // Logging output uses the `jsonPayload` format. - JSON = 2; - } - - // The output format of the Dataproc Metastore service's logs. - LogFormat log_format = 1; -} - -// The metadata management activities of the metastore service. -message MetadataManagementActivity { - // Output only. The latest metadata exports of the metastore service. - repeated MetadataExport metadata_exports = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The latest restores of the metastore service. - repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A metastore resource that imports metadata. -message MetadataImport { - option (google.api.resource) = { - type: "metastore.googleapis.com/MetadataImport" - pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}" - }; - - // A specification of the location of and metadata about a database dump from - // a relational database management system. - message DatabaseDump { - // The type of the database. - enum DatabaseType { - // The type of the source database is unknown. - DATABASE_TYPE_UNSPECIFIED = 0; - - // The type of the source database is MySQL. - MYSQL = 1; - } - - // The type of the database. - DatabaseType database_type = 1 [deprecated = true]; - - // A Cloud Storage object or folder URI that specifies the source from which - // to import metadata. It must begin with `gs://`. - string gcs_uri = 2; - - // The name of the source database. - string source_database = 3 [deprecated = true]; - - // Optional. The type of the database dump. If unspecified, defaults to - // `MYSQL`. - DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // The current state of the metadata import. - enum State { - // The state of the metadata import is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata import is running. - RUNNING = 1; - - // The metadata import completed successfully. - SUCCEEDED = 2; - - // The metadata import is being updated. - UPDATING = 3; - - // The metadata import failed, and attempted metadata changes were rolled - // back. - FAILED = 4; - } - - // The metadata to be imported. - oneof metadata { - // Immutable. A database dump from a pre-existing metastore's database. - DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE]; - } - - // Immutable. The relative resource name of the metadata import, of the form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // The description of the metadata import. - string description = 2; - - // Output only. The time when the metadata import was started. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metadata import was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metadata import finished. - google.protobuf.Timestamp end_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the metadata import. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a metadata export operation. -message MetadataExport { - // The current state of the metadata export. - enum State { - // The state of the metadata export is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata export is running. - RUNNING = 1; - - // The metadata export completed successfully. - SUCCEEDED = 2; - - // The metadata export failed. - FAILED = 3; - - // The metadata export is cancelled. - CANCELLED = 4; - } - - oneof destination { - // Output only. A Cloud Storage URI of a folder that metadata are exported - // to, in the form of - // `gs:////`, where - // `` is automatically generated. - string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. The time when the export started. - google.protobuf.Timestamp start_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the export ended. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the export. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The type of the database dump. - DatabaseDumpSpec.Type database_dump_type = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a backup resource. -message Backup { - option (google.api.resource) = { - type: "metastore.googleapis.com/Backup" - pattern: "projects/{project}/locations/{location}/services/{service}/backups/{backup}" - }; - - // The current state of the backup. - enum State { - // The state of the backup is unknown. - STATE_UNSPECIFIED = 0; - - // The backup is being created. - CREATING = 1; - - // The backup is being deleted. - DELETING = 2; - - // The backup is active and ready to use. - ACTIVE = 3; - - // The backup failed. - FAILED = 4; - - // The backup is being restored. - RESTORING = 5; - } - - // Immutable. The relative resource name of the backup, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}` - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the backup was started. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the backup finished creating. - google.protobuf.Timestamp end_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the backup. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The revision of the service at the time of backup. - Service service_revision = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The description of the backup. - string description = 6; - - // Output only. Services that are restoring from the backup. - repeated string restoring_services = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The details of a metadata restore operation. -message Restore { - // The current state of the restore. - enum State { - // The state of the metadata restore is unknown. - STATE_UNSPECIFIED = 0; - - // The metadata restore is running. - RUNNING = 1; - - // The metadata restore completed successfully. - SUCCEEDED = 2; - - // The metadata restore failed. - FAILED = 3; - - // The metadata restore is cancelled. - CANCELLED = 4; - } - - // The type of restore. If unspecified, defaults to `METADATA_ONLY`. - enum RestoreType { - // The restore type is unknown. - RESTORE_TYPE_UNSPECIFIED = 0; - - // The service's metadata and configuration are restored. - FULL = 1; - - // Only the service's metadata is restored. - METADATA_ONLY = 2; - } - - // Output only. The time when the restore started. - google.protobuf.Timestamp start_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the restore ended. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the restore. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. 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}`. - string backup = 4 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Output only. The type of restore. - RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The restore details containing the revision of the service to - // be restored to, in format of JSON. - string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]. -message ListServicesRequest { - // Required. The relative resource name of the location of metastore services - // to list, in the following form: - // - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. The maximum number of services to return. The response may - // contain less than the maximum number. If unspecified, no more than 500 - // services are returned. The maximum value is 1000; values above 1000 are - // changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous - // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices] - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]. -message ListServicesResponse { - // The services in the specified location. - repeated Service services = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for -// [DataprocMetastore.GetService][google.cloud.metastore.v1beta.DataprocMetastore.GetService]. -message GetServiceRequest { - // Required. The relative resource name of the metastore service to retrieve, - // in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; -} - -// Request message for -// [DataprocMetastore.CreateService][google.cloud.metastore.v1beta.DataprocMetastore.CreateService]. -message CreateServiceRequest { - // 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}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Service" - } - ]; - - // 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. - string service_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Service service = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.UpdateService][google.cloud.metastore.v1beta.DataprocMetastore.UpdateService]. -message UpdateServiceRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The metastore service to update. The server only merges fields - // in the service if they are specified in `update_mask`. - // - // The metastore service's `name` field is used to identify the metastore - // service to be updated. - Service service = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.DeleteService][google.cloud.metastore.v1beta.DataprocMetastore.DeleteService]. -message DeleteServiceRequest { - // Required. The relative resource name of the metastore service to delete, in - // the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports]. -message ListMetadataImportsRequest { - // Required. The relative resource name of the service whose metadata imports - // to list, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/MetadataImport" - } - ]; - - // Optional. The maximum number of imports to return. The response may contain - // less than the maximum number. If unspecified, no more than 500 imports are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous - // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices] - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports]. -message ListMetadataImportsResponse { - // The imports in the specified service. - repeated MetadataImport metadata_imports = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for -// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImport]. -message GetMetadataImportRequest { - // Required. The relative resource name of the metadata import to retrieve, in - // the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/MetadataImport" - } - ]; -} - -// Request message for -// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImport]. -message CreateMetadataImportRequest { - // Required. The relative resource name of the service in which to create a - // metastore import, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/MetadataImport" - } - ]; - - // 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. - string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImport]. -message UpdateMetadataImportRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The metadata import to update. The server only merges fields - // in the import if they are specified in `update_mask`. - // - // The metadata import's `name` field is used to identify the metastore - // import to be updated. - MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]. -message ListBackupsRequest { - // Required. The relative resource name of the service whose backups to - // list, in the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. The maximum number of backups to return. The response may contain - // less than the maximum number. If unspecified, no more than 500 backups are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous - // [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups] - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups] - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]. -message ListBackupsResponse { - // The backups of the specified service. - repeated Backup backups = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for -// [DataprocMetastore.GetBackup][google.cloud.metastore.v1beta.DataprocMetastore.GetBackup]. -message GetBackupRequest { - // Required. The relative resource name of the backup to retrieve, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; -} - -// Request message for -// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1beta.DataprocMetastore.CreateBackup]. -message CreateBackupRequest { - // Required. The relative resource name of the service in which to create a - // backup of the following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Backup" - } - ]; - - // 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. - string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackup]. -message DeleteBackupRequest { - // Required. The relative resource name of the backup to delete, in the - // following form: - // - // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadata]. -message ExportMetadataRequest { - // Required. Destination that metadata is exported to. - oneof destination { - // A Cloud Storage URI of a folder, in the format - // `gs:///`. A sub-folder - // `` containing exported files will be created below it. - string destination_gcs_folder = 2; - } - - // Required. The relative resource name of the metastore service to run - // export, in the following form: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The type of the database dump. If unspecified, defaults to - // `MYSQL`. - DatabaseDumpSpec.Type database_dump_type = 4 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [DataprocMetastore.Restore][]. -message RestoreServiceRequest { - // Required. The relative resource name of the metastore service to run - // restore, in the following form: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // 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}`. - string backup = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Backup" - } - ]; - - // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. - Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents the metadata of a long-running operation. -message OperationMetadata { - // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined resource path for the target of the operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the verb executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether the caller has requested cancellation - // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. API version used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Metadata about the service in a location. -message LocationMetadata { - // A specification of a supported version of the Hive Metastore software. - message HiveMetastoreVersion { - // The semantic version of the Hive Metastore software. - string version = 1; - - // Whether `version` will be chosen by the server if a metastore service is - // created with a `HiveMetastoreConfig` that omits the `version`. - bool is_default = 2; - } - - // The versions of Hive Metastore that can be used when creating a new - // metastore service in this location. The server guarantees that exactly one - // `HiveMetastoreVersion` in the list will set `is_default`. - repeated HiveMetastoreVersion supported_hive_metastore_versions = 1; -} - -// The specification of database dump to import from or export to. -message DatabaseDumpSpec { - // The type of the database dump. - enum Type { - // The type of the database dump is unknown. - TYPE_UNSPECIFIED = 0; - - // Database dump is a MySQL dump file. - MYSQL = 1; - - // Database dump contains Avro files. - AVRO = 2; - } -} - -// Request message for -// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy]. -message RemoveIamPolicyRequest { - // Required. The relative resource name of the dataplane resource to remove - // IAM policy, in the following form: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}` - // or - // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`. - string resource = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "*" } - ]; - - // Optional. Removes IAM policy attached to database or table asynchronously - // when it is set. The default is false. - bool asynchronous = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy]. -message RemoveIamPolicyResponse { - // True if the policy is successfully removed. - bool success = 1; -} - -// Request message for -// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata]. -message QueryMetadataRequest { - // Required. The relative resource name of the metastore service to query - // metadata, in the following format: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Required. A read-only SQL query to execute against the metadata database. - // The query cannot change or mutate the data. - string query = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata]. -message QueryMetadataResponse { - // The manifest URI is link to a JSON instance in Cloud Storage. - // This instance manifests immediately along with QueryMetadataResponse. The - // content of the URI is not retriable until the long-running operation query - // against the metadata finishes. - string result_manifest_uri = 1; -} - -// Request message for -// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase]. -message MoveTableToDatabaseRequest { - // Required. The relative resource name of the metastore service to mutate - // metadata, in the following format: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Required. The name of the table to be moved. - string table_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the database where the table resides. - string db_name = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the database where the table should be moved. - string destination_db_name = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase]. -message MoveTableToDatabaseResponse {} - -// Request message for -// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation]. -message AlterMetadataResourceLocationRequest { - // Required. The relative resource name of the metastore service to mutate - // metadata, in the following format: - // - // `projects/{project_id}/locations/{location_id}/services/{service_id}`. - string service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; - - // Required. The relative metadata resource name in the following format. - // - // `databases/{database_id}` - // or - // `databases/{database_id}/tables/{table_id}` - // or - // `databases/{database_id}/tables/{table_id}/partitions/{partition_id}` - string resource_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The new location URI for the metadata resource. - string location_uri = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation]. -message AlterMetadataResourceLocationResponse {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore_federation.proto b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore_federation.proto deleted file mode 100644 index 5929dd0b6d32..000000000000 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore_federation.proto +++ /dev/null @@ -1,374 +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 -// -// http://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. - -syntax = "proto3"; - -package google.cloud.metastore.v1beta; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/metastore/apiv1beta/metastorepb;metastorepb"; -option java_multiple_files = true; -option java_outer_classname = "MetastoreFederationProto"; -option java_package = "com.google.cloud.metastore.v1beta"; - -// Configures and manages metastore federation services. -// Dataproc Metastore Federation Service allows federating a collection of -// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc -// Metastores. The Federation Service exposes a gRPC URL through which metadata -// from the backend metastores are served at query time. -// -// The Dataproc Metastore Federation API defines the following resource model: -// * The service works with a collection of Google Cloud projects. -// * Each project has a collection of available locations. -// * Each location has a collection of federations. -// * Dataproc Metastore Federations are resources with names of the -// form: -// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. -service DataprocMetastoreFederation { - option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists federations in a project and location. - rpc ListFederations(ListFederationsRequest) - returns (ListFederationsResponse) { - option (google.api.http) = { - get: "/v1beta/{parent=projects/*/locations/*}/federations" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a single federation. - rpc GetFederation(GetFederationRequest) returns (Federation) { - option (google.api.http) = { - get: "/v1beta/{name=projects/*/locations/*/federations/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a metastore federation in a project and location. - rpc CreateFederation(CreateFederationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{parent=projects/*/locations/*}/federations" - body: "federation" - }; - option (google.api.method_signature) = "parent,federation,federation_id"; - option (google.longrunning.operation_info) = { - response_type: "Federation" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Updates the fields of a federation. - rpc UpdateFederation(UpdateFederationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta/{federation.name=projects/*/locations/*/federations/*}" - body: "federation" - }; - option (google.api.method_signature) = "federation,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Federation" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } - - // Deletes a single federation. - rpc DeleteFederation(DeleteFederationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta/{name=projects/*/locations/*/federations/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" - }; - } -} - -// Represents a federation of multiple backend metastores. -message Federation { - option (google.api.resource) = { - type: "metastore.googleapis.com/Federation" - pattern: "projects/{project}/locations/{location}/federations/{federation}" - }; - - // The current state of the federation. - enum State { - // The state of the metastore federation is unknown. - STATE_UNSPECIFIED = 0; - - // The metastore federation is in the process of being created. - CREATING = 1; - - // The metastore federation is running and ready to serve queries. - ACTIVE = 2; - - // The metastore federation is being updated. It remains usable but cannot - // accept additional update requests or be deleted at this time. - UPDATING = 3; - - // The metastore federation is undergoing deletion. It cannot be used. - DELETING = 4; - - // The metastore federation has encountered an error and cannot be used. The - // metastore federation should be deleted. - ERROR = 5; - } - - // Immutable. The relative resource name of the federation, of the - // form: - // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Output only. The time when the metastore federation was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metastore federation was last updated. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // User-defined labels for the metastore federation. - map labels = 4; - - // Immutable. The Apache Hive metastore version of the federation. All backend - // metastore versions must be compatible with the federation version. - string version = 5 [(google.api.field_behavior) = IMMUTABLE]; - - // A map from `BackendMetastore` rank to `BackendMetastore`s from which the - // federation service serves metadata at query time. The map key represents - // the order in which `BackendMetastore`s should be evaluated to resolve - // database names at query time and should be greater than or equal to zero. A - // `BackendMetastore` with a lower number will be evaluated before a - // `BackendMetastore` with a higher number. - map backend_metastores = 6; - - // Output only. The federation endpoint. - string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the federation. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the current state of the - // metastore federation, if available. - string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The globally unique resource identifier of the metastore - // federation. - string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Represents a backend metastore for the federation. -message BackendMetastore { - // The type of the backend metastore. - enum MetastoreType { - // The metastore type is not set. - METASTORE_TYPE_UNSPECIFIED = 0; - - // The backend metastore is BigQuery. - BIGQUERY = 2; - - // The backend metastore is Dataproc Metastore. - DATAPROC_METASTORE = 3; - } - - // The relative resource name of the metastore that is being federated. - // The formats of the relative resource names for the currently supported - // metastores are listed below: - // - // * Dataplex - // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` - // * BigQuery - // * `projects/{project_id}` - // * Dataproc Metastore - // * `projects/{project_id}/locations/{location}/services/{service_id}` - string name = 1; - - // The type of the backend metastore. - MetastoreType metastore_type = 2; -} - -// Request message for ListFederations. -message ListFederationsRequest { - // Required. The relative resource name of the location of metastore - // federations to list, in the following form: - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Federation" - } - ]; - - // Optional. The maximum number of federations to return. The response may - // contain less than the maximum number. If unspecified, no more than 500 - // services are returned. The maximum value is 1000; values above 1000 are - // changed to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous ListFederationServices - // call. Provide this token to retrieve the subsequent page. - // - // To retrieve the first page, supply an empty page token. - // - // When paginating, other parameters provided to - // ListFederationServices must match the call that provided the - // page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply to list results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specify the ordering of results as described in [Sorting - // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - // If not specified, the results will be sorted in the default order. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for ListFederations -message ListFederationsResponse { - // The services in the specified location. - repeated Federation federations = 1; - - // A token that can be sent as `page_token` to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for GetFederation. -message GetFederationRequest { - // Required. The relative resource name of the metastore federation to - // retrieve, in the following form: - // - // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Federation" - } - ]; -} - -// Request message for CreateFederation. -message CreateFederationRequest { - // Required. The relative resource name of the location in which to create a - // federation service, in the following form: - // - // `projects/{project_number}/locations/{location_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "metastore.googleapis.com/Federation" - } - ]; - - // 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. - string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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. - Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for UpdateFederation. -message UpdateFederationRequest { - // 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. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The metastore federation to update. The server only merges fields - // in the service if they are specified in `update_mask`. - // - // The metastore federation's `name` field is used to identify the - // metastore service to be updated. - Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for DeleteFederation. -message DeleteFederationRequest { - // Required. The relative resource name of the metastore federation to delete, - // in the following form: - // - // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Federation" - } - ]; - - // Optional. A request ID. Specify a unique request ID to allow the server to - // ignore the request if it has completed. The server will ignore subsequent - // requests that provide a duplicate request ID for at least 60 minutes after - // the first request. - // - // For example, if an initial request times out, followed by another request - // with the same request ID, the server ignores the second request to prevent - // the creation of duplicate commitments. - // - // The request ID must be a valid - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) - // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java new file mode 100644 index 000000000000..18727e18c687 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java @@ -0,0 +1,3227 @@ +/* + * 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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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: + * + *

    + *
  • The service works with a collection of Google Cloud projects, named: `/projects/*` + *
  • Each project has a collection of available locations, named: `/locations/*` (a location + * must refer to a Google Cloud `region`) + *
  • Each location has a collection of services, named: `/services/*` + *
  • Dataproc Metastore services are resources with names of the form: + *
+ * + *

`/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: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

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

This class can be customized by passing in a custom instance of 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 future =
+   *       dataprocMetastoreClient.listServicesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Service element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServicesPagedCallable() { + return stub.listServicesPagedCallable(); + } + + // 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();
+   *   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 listServicesCallable() { + return stub.listServicesCallable(); + } + + // 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()) {
+   *   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 future = dataprocMetastoreClient.getServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServiceCallable() { + return stub.getServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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]");
+   *   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 createServiceAsync( + LocationName parent, Service service, String serviceId) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setService(service) + .setServiceId(serviceId) + .build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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();
+   *   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 createServiceAsync( + String parent, Service service, String serviceId) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(parent) + .setService(service) + .setServiceId(serviceId) + .build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   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 createServiceAsync( + CreateServiceRequest request) { + return createServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.createServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createServiceOperationCallable() { + return stub.createServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.createServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createServiceCallable() { + return stub.createServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   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`. + *

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 updateServiceAsync( + Service service, FieldMask updateMask) { + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder().setService(service).setUpdateMask(updateMask).build(); + return updateServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   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 updateServiceAsync( + UpdateServiceRequest request) { + return updateServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.updateServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateServiceOperationCallable() { + return stub.updateServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.updateServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateServiceCallable() { + return stub.updateServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   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: + *

`projects/{project_number}/locations/{location_id}/services/{service_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServiceAsync(ServiceName name) { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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();
+   *   dataprocMetastoreClient.deleteServiceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The relative resource name of the metastore service to delete, 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 OperationFuture deleteServiceAsync(String name) { + DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   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 deleteServiceAsync( + DeleteServiceRequest request) { + return deleteServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.deleteServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteServiceOperationCallable() { + return stub.deleteServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.deleteServiceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteServiceCallable() { + return stub.deleteServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists imports in a 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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   ListMetadataImportsRequest request =
+   *       ListMetadataImportsRequest.newBuilder()
+   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listMetadataImportsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (MetadataImport element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMetadataImportsPagedCallable() { + return stub.listMetadataImportsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists imports in a 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()) {
+   *   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 + listMetadataImportsCallable() { + return stub.listMetadataImportsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single import. + * + *

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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   GetMetadataImportRequest request =
+   *       GetMetadataImportRequest.newBuilder()
+   *           .setName(
+   *               MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.getMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getMetadataImportCallable() { + return stub.getMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

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

`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 createMetadataImportAsync( + ServiceName parent, MetadataImport metadataImport, String metadataImportId) { + CreateMetadataImportRequest request = + CreateMetadataImportRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMetadataImport(metadataImport) + .setMetadataImportId(metadataImportId) + .build(); + return createMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

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

`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 createMetadataImportAsync( + String parent, MetadataImport metadataImport, String metadataImportId) { + CreateMetadataImportRequest request = + CreateMetadataImportRequest.newBuilder() + .setParent(parent) + .setMetadataImport(metadataImport) + .setMetadataImportId(metadataImportId) + .build(); + return createMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 createMetadataImportAsync( + CreateMetadataImportRequest request) { + return createMetadataImportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createMetadataImportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createMetadataImportOperationCallable() { + return stub.createMetadataImportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createMetadataImportCallable() { + return stub.createMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   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`. + *

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 updateMetadataImportAsync( + MetadataImport metadataImport, FieldMask updateMask) { + UpdateMetadataImportRequest request = + UpdateMetadataImportRequest.newBuilder() + .setMetadataImport(metadataImport) + .setUpdateMask(updateMask) + .build(); + return updateMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   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 updateMetadataImportAsync( + UpdateMetadataImportRequest request) { + return updateMetadataImportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   UpdateMetadataImportRequest request =
+   *       UpdateMetadataImportRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMetadataImport(MetadataImport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.updateMetadataImportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateMetadataImportOperationCallable() { + return stub.updateMetadataImportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   UpdateMetadataImportRequest request =
+   *       UpdateMetadataImportRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMetadataImport(MetadataImport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.updateMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateMetadataImportCallable() { + return stub.updateMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   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 exportMetadataAsync( + ExportMetadataRequest request) { + return exportMetadataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   ExportMetadataRequest request =
+   *       ExportMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.exportMetadataOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataExport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportMetadataOperationCallable() { + return stub.exportMetadataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   ExportMetadataRequest request =
+   *       ExportMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.exportMetadataCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportMetadataCallable() { + return stub.exportMetadataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + ServiceName service, BackupName backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service == null ? null : service.toString()) + .setBackup(backup == null ? null : backup.toString()) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + ServiceName service, String backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service == null ? null : service.toString()) + .setBackup(backup) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + String service, BackupName backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service) + .setBackup(backup == null ? null : backup.toString()) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + String service, String backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder().setService(service).setBackup(backup).build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   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 restoreServiceAsync( + RestoreServiceRequest request) { + return restoreServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   RestoreServiceRequest request =
+   *       RestoreServiceRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setBackup(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.restoreServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Restore response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + restoreServiceOperationCallable() { + return stub.restoreServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   RestoreServiceRequest request =
+   *       RestoreServiceRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setBackup(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.restoreServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable restoreServiceCallable() { + return stub.restoreServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists backups in a 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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listBackupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Backup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupsPagedCallable() { + return stub.listBackupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists backups in a 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()) {
+   *   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 listBackupsCallable() { + return stub.listBackupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single backup. + * + *

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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   GetBackupRequest request =
+   *       GetBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.getBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupCallable() { + return stub.getBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

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

`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 createBackupAsync( + ServiceName parent, Backup backup, String backupId) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackup(backup) + .setBackupId(backupId) + .build(); + return createBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

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

`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 createBackupAsync( + String parent, Backup backup, String backupId) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(parent) + .setBackup(backup) + .setBackupId(backupId) + .build(); + return createBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 createBackupAsync( + CreateBackupRequest request) { + return createBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBackupOperationCallable() { + return stub.createBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBackupCallable() { + return stub.createBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   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: + *

`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 deleteBackupAsync(BackupName name) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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 = 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: + *

`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 deleteBackupAsync(String name) { + DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   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 deleteBackupAsync( + DeleteBackupRequest request) { + return deleteBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.deleteBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupOperationCallable() { + return stub.deleteBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.deleteBackupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupCallable() { + return stub.deleteBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : dataprocMetastoreClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataprocMetastoreClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataprocMetastoreClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = dataprocMetastoreClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListServicesPagedResponse + extends AbstractPagedListResponse< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListServicesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListServicesPagedResponse(ListServicesPage page) { + super(page, ListServicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServicesPage + extends AbstractPage { + + private ListServicesPage( + PageContext context, + ListServicesResponse response) { + super(context, response); + } + + private static ListServicesPage createEmptyPage() { + return new ListServicesPage(null, null); + } + + @Override + protected ListServicesPage createPage( + PageContext context, + ListServicesResponse response) { + return new ListServicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + private ListServicesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServicesFixedSizeCollection createEmptyCollection() { + return new ListServicesFixedSizeCollection(null, 0); + } + + @Override + protected ListServicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListServicesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListMetadataImportsPagedResponse + extends AbstractPagedListResponse< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage, + ListMetadataImportsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMetadataImportsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMetadataImportsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMetadataImportsPagedResponse(ListMetadataImportsPage page) { + super(page, ListMetadataImportsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMetadataImportsPage + extends AbstractPage< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage> { + + private ListMetadataImportsPage( + PageContext + context, + ListMetadataImportsResponse response) { + super(context, response); + } + + private static ListMetadataImportsPage createEmptyPage() { + return new ListMetadataImportsPage(null, null); + } + + @Override + protected ListMetadataImportsPage createPage( + PageContext + context, + ListMetadataImportsResponse response) { + return new ListMetadataImportsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMetadataImportsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage, + ListMetadataImportsFixedSizeCollection> { + + private ListMetadataImportsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMetadataImportsFixedSizeCollection createEmptyCollection() { + return new ListMetadataImportsFixedSizeCollection(null, 0); + } + + @Override + protected ListMetadataImportsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMetadataImportsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBackupsPagedResponse + extends AbstractPagedListResponse< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListBackupsPagedResponse(ListBackupsPage page) { + super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupsPage + extends AbstractPage { + + private ListBackupsPage( + PageContext context, + ListBackupsResponse response) { + super(context, response); + } + + private static ListBackupsPage createEmptyPage() { + return new ListBackupsPage(null, null); + } + + @Override + protected ListBackupsPage createPage( + PageContext context, + ListBackupsResponse response) { + return new ListBackupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + private ListBackupsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupsFixedSizeCollection createEmptyCollection() { + return new ListBackupsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBackupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClient.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClient.java new file mode 100644 index 000000000000..4e628388c3d8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClient.java @@ -0,0 +1,1562 @@ +/* + * 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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.stub.DataprocMetastoreFederationStub; +import com.google.cloud.metastore.v1.stub.DataprocMetastoreFederationStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 federation services. Dataproc Metastore + * Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex + * Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which + * metadata from the backend metastores are served at query time. + * + *

The Dataproc Metastore Federation API defines the following resource model: + * + *

    + *
  • The service works with a collection of Google Cloud projects. + *
  • Each project has a collection of available locations. + *
  • Each location has a collection of federations. + *
  • Dataproc Metastore Federations are resources with names of the form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create()) {
+ *   FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
+ *   Federation response = dataprocMetastoreFederationClient.getFederation(name);
+ * }
+ * }
+ * + *

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: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

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

This class can be customized by passing in a custom instance of + * DataprocMetastoreFederationSettings 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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newHttpJsonBuilder().build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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 (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. + * + *

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 (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. + * + *

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 (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 future =
+   *       dataprocMetastoreFederationClient.listFederationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Federation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFederationsPagedCallable() { + return stub.listFederationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists federations 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 (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 + listFederationsCallable() { + return stub.listFederationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single federation. + * + *

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 (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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetFederationRequest request =
+   *       GetFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getFederationCallable() { + return stub.getFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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: + *

`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 createFederationAsync( + LocationName parent, Federation federation, String federationId) { + CreateFederationRequest request = + CreateFederationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFederation(federation) + .setFederationId(federationId) + .build(); + return createFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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: + *

`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 createFederationAsync( + String parent, Federation federation, String federationId) { + CreateFederationRequest request = + CreateFederationRequest.newBuilder() + .setParent(parent) + .setFederation(federation) + .setFederationId(federationId) + .build(); + return createFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 createFederationAsync( + CreateFederationRequest request) { + return createFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 future =
+   *       dataprocMetastoreFederationClient.createFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createFederationOperationCallable() { + return stub.createFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 future =
+   *       dataprocMetastoreFederationClient.createFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createFederationCallable() { + return stub.createFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (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`. + *

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 updateFederationAsync( + Federation federation, FieldMask updateMask) { + UpdateFederationRequest request = + UpdateFederationRequest.newBuilder() + .setFederation(federation) + .setUpdateMask(updateMask) + .build(); + return updateFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (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 updateFederationAsync( + UpdateFederationRequest request) { + return updateFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   UpdateFederationRequest request =
+   *       UpdateFederationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setFederation(Federation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreFederationClient.updateFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateFederationOperationCallable() { + return stub.updateFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   UpdateFederationRequest request =
+   *       UpdateFederationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setFederation(Federation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.updateFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateFederationCallable() { + return stub.updateFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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: + *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFederationAsync( + FederationName name) { + DeleteFederationRequest request = + DeleteFederationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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: + *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFederationAsync(String name) { + DeleteFederationRequest request = DeleteFederationRequest.newBuilder().setName(name).build(); + return deleteFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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 deleteFederationAsync( + DeleteFederationRequest request) { + return deleteFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   DeleteFederationRequest request =
+   *       DeleteFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreFederationClient.deleteFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteFederationOperationCallable() { + return stub.deleteFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   DeleteFederationRequest request =
+   *       DeleteFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.deleteFederationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFederationCallable() { + return stub.deleteFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element :
+   *       dataprocMetastoreFederationClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataprocMetastoreFederationClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataprocMetastoreFederationClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreFederationClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreFederationClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       dataprocMetastoreFederationClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListFederationsPagedResponse + extends AbstractPagedListResponse< + ListFederationsRequest, + ListFederationsResponse, + Federation, + ListFederationsPage, + ListFederationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFederationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFederationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFederationsPagedResponse(ListFederationsPage page) { + super(page, ListFederationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFederationsPage + extends AbstractPage< + ListFederationsRequest, ListFederationsResponse, Federation, ListFederationsPage> { + + private ListFederationsPage( + PageContext context, + ListFederationsResponse response) { + super(context, response); + } + + private static ListFederationsPage createEmptyPage() { + return new ListFederationsPage(null, null); + } + + @Override + protected ListFederationsPage createPage( + PageContext context, + ListFederationsResponse response) { + return new ListFederationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFederationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFederationsRequest, + ListFederationsResponse, + Federation, + ListFederationsPage, + ListFederationsFixedSizeCollection> { + + private ListFederationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFederationsFixedSizeCollection createEmptyCollection() { + return new ListFederationsFixedSizeCollection(null, 0); + } + + @Override + protected ListFederationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFederationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationSettings.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationSettings.java new file mode 100644 index 000000000000..9525cc278b48 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationSettings.java @@ -0,0 +1,367 @@ +/* + * 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 static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.stub.DataprocMetastoreFederationStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreFederationClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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 { + + /** Returns the object with the settings used for calls to listFederations. */ + public PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listFederationsSettings(); + } + + /** Returns the object with the settings used for calls to getFederation. */ + public UnaryCallSettings getFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getFederationSettings(); + } + + /** Returns the object with the settings used for calls to createFederation. */ + public UnaryCallSettings createFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).createFederationSettings(); + } + + /** Returns the object with the settings used for calls to createFederation. */ + public OperationCallSettings + createFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .createFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public UnaryCallSettings updateFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).updateFederationSettings(); + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public OperationCallSettings + updateFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .updateFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public UnaryCallSettings deleteFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).deleteFederationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public OperationCallSettings + deleteFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .deleteFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .testIamPermissionsSettings(); + } + + public static final DataprocMetastoreFederationSettings create( + DataprocMetastoreFederationStubSettings stub) throws IOException { + return new DataprocMetastoreFederationSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataprocMetastoreFederationStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataprocMetastoreFederationStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataprocMetastoreFederationStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreFederationSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataprocMetastoreFederationSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataprocMetastoreFederationStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataprocMetastoreFederationSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataprocMetastoreFederationStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataprocMetastoreFederationStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DataprocMetastoreFederationStubSettings.newHttpJsonBuilder()); + } + + public DataprocMetastoreFederationStubSettings.Builder getStubSettingsBuilder() { + return ((DataprocMetastoreFederationStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listFederations. */ + public PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return getStubSettingsBuilder().listFederationsSettings(); + } + + /** Returns the builder for the settings used for calls to getFederation. */ + public UnaryCallSettings.Builder getFederationSettings() { + return getStubSettingsBuilder().getFederationSettings(); + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public UnaryCallSettings.Builder + createFederationSettings() { + return getStubSettingsBuilder().createFederationSettings(); + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public OperationCallSettings.Builder + createFederationOperationSettings() { + return getStubSettingsBuilder().createFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public UnaryCallSettings.Builder + updateFederationSettings() { + return getStubSettingsBuilder().updateFederationSettings(); + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public OperationCallSettings.Builder + updateFederationOperationSettings() { + return getStubSettingsBuilder().updateFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public UnaryCallSettings.Builder + deleteFederationSettings() { + return getStubSettingsBuilder().deleteFederationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public OperationCallSettings.Builder + deleteFederationOperationSettings() { + return getStubSettingsBuilder().deleteFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public DataprocMetastoreFederationSettings build() throws IOException { + return new DataprocMetastoreFederationSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreSettings.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreSettings.java new file mode 100644 index 000000000000..95517e99a592 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreSettings.java @@ -0,0 +1,546 @@ +/* + * 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 static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.stub.DataprocMetastoreStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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 { + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listServicesSettings(); + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listMetadataImports. */ + public PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listMetadataImportsSettings(); + } + + /** Returns the object with the settings used for calls to getMetadataImport. */ + public UnaryCallSettings getMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public UnaryCallSettings createMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public OperationCallSettings + createMetadataImportOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .createMetadataImportOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings updateMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public OperationCallSettings + updateMetadataImportOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .updateMetadataImportOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public UnaryCallSettings exportMetadataSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataSettings(); + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public OperationCallSettings + exportMetadataOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataOperationSettings(); + } + + /** Returns the object with the settings used for calls to restoreService. */ + public UnaryCallSettings restoreServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceSettings(); + } + + /** Returns the object with the settings used for calls to restoreService. */ + public OperationCallSettings + restoreServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listBackupsSettings(); + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getBackupSettings(); + } + + /** Returns the object with the settings used for calls to createBackup. */ + public UnaryCallSettings createBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupSettings(); + } + + /** Returns the object with the settings used for calls to createBackup. */ + public OperationCallSettings + createBackupOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final DataprocMetastoreSettings create(DataprocMetastoreStubSettings stub) + throws IOException { + return new DataprocMetastoreSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataprocMetastoreStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataprocMetastoreStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataprocMetastoreStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataprocMetastoreStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataprocMetastoreStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataprocMetastoreStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataprocMetastoreStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataprocMetastoreSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataprocMetastoreStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataprocMetastoreSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataprocMetastoreStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataprocMetastoreStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DataprocMetastoreStubSettings.newHttpJsonBuilder()); + } + + public DataprocMetastoreStubSettings.Builder getStubSettingsBuilder() { + return ((DataprocMetastoreStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return getStubSettingsBuilder().listServicesSettings(); + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getStubSettingsBuilder().getServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return getStubSettingsBuilder().createServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public OperationCallSettings.Builder + createServiceOperationSettings() { + return getStubSettingsBuilder().createServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return getStubSettingsBuilder().updateServiceSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return getStubSettingsBuilder().updateServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return getStubSettingsBuilder().deleteServiceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return getStubSettingsBuilder().deleteServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listMetadataImports. */ + public PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return getStubSettingsBuilder().listMetadataImportsSettings(); + } + + /** Returns the builder for the settings used for calls to getMetadataImport. */ + public UnaryCallSettings.Builder + getMetadataImportSettings() { + return getStubSettingsBuilder().getMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public UnaryCallSettings.Builder + createMetadataImportSettings() { + return getStubSettingsBuilder().createMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings() { + return getStubSettingsBuilder().createMetadataImportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings.Builder + updateMetadataImportSettings() { + return getStubSettingsBuilder().updateMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings() { + return getStubSettingsBuilder().updateMetadataImportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public UnaryCallSettings.Builder exportMetadataSettings() { + return getStubSettingsBuilder().exportMetadataSettings(); + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public OperationCallSettings.Builder + exportMetadataOperationSettings() { + return getStubSettingsBuilder().exportMetadataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public UnaryCallSettings.Builder restoreServiceSettings() { + return getStubSettingsBuilder().restoreServiceSettings(); + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public OperationCallSettings.Builder + restoreServiceOperationSettings() { + return getStubSettingsBuilder().restoreServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listBackups. */ + public PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings() { + return getStubSettingsBuilder().listBackupsSettings(); + } + + /** Returns the builder for the settings used for calls to getBackup. */ + public UnaryCallSettings.Builder getBackupSettings() { + return getStubSettingsBuilder().getBackupSettings(); + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public UnaryCallSettings.Builder createBackupSettings() { + return getStubSettingsBuilder().createBackupSettings(); + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public OperationCallSettings.Builder + createBackupOperationSettings() { + return getStubSettingsBuilder().createBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public UnaryCallSettings.Builder deleteBackupSettings() { + return getStubSettingsBuilder().deleteBackupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return getStubSettingsBuilder().deleteBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public DataprocMetastoreSettings build() throws IOException { + return new DataprocMetastoreSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/gapic_metadata.json b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/gapic_metadata.json new file mode 100644 index 000000000000..232670c2f065 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/gapic_metadata.json @@ -0,0 +1,117 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.metastore.v1", + "libraryPackage": "com.google.cloud.metastore.v1", + "services": { + "DataprocMetastore": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreClient", + "rpcs": { + "CreateBackup": { + "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] + }, + "CreateMetadataImport": { + "methods": ["createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportOperationCallable", "createMetadataImportCallable"] + }, + "CreateService": { + "methods": ["createServiceAsync", "createServiceAsync", "createServiceAsync", "createServiceOperationCallable", "createServiceCallable"] + }, + "DeleteBackup": { + "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] + }, + "DeleteService": { + "methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] + }, + "ExportMetadata": { + "methods": ["exportMetadataAsync", "exportMetadataOperationCallable", "exportMetadataCallable"] + }, + "GetBackup": { + "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetMetadataImport": { + "methods": ["getMetadataImport", "getMetadataImport", "getMetadataImport", "getMetadataImportCallable"] + }, + "GetService": { + "methods": ["getService", "getService", "getService", "getServiceCallable"] + }, + "ListBackups": { + "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListMetadataImports": { + "methods": ["listMetadataImports", "listMetadataImports", "listMetadataImports", "listMetadataImportsPagedCallable", "listMetadataImportsCallable"] + }, + "ListServices": { + "methods": ["listServices", "listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] + }, + "RestoreService": { + "methods": ["restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceOperationCallable", "restoreServiceCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateMetadataImport": { + "methods": ["updateMetadataImportAsync", "updateMetadataImportAsync", "updateMetadataImportOperationCallable", "updateMetadataImportCallable"] + }, + "UpdateService": { + "methods": ["updateServiceAsync", "updateServiceAsync", "updateServiceOperationCallable", "updateServiceCallable"] + } + } + } + } + }, + "DataprocMetastoreFederation": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "CreateFederation": { + "methods": ["createFederationAsync", "createFederationAsync", "createFederationAsync", "createFederationOperationCallable", "createFederationCallable"] + }, + "DeleteFederation": { + "methods": ["deleteFederationAsync", "deleteFederationAsync", "deleteFederationAsync", "deleteFederationOperationCallable", "deleteFederationCallable"] + }, + "GetFederation": { + "methods": ["getFederation", "getFederation", "getFederation", "getFederationCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListFederations": { + "methods": ["listFederations", "listFederations", "listFederations", "listFederationsPagedCallable", "listFederationsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateFederation": { + "methods": ["updateFederationAsync", "updateFederationAsync", "updateFederationOperationCallable", "updateFederationCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/package-info.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/package-info.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/package-info.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/package-info.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..9d55e205380b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStub.java @@ -0,0 +1,132 @@ +/* + * 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.stub; + +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.CreateFederationRequest; +import com.google.cloud.metastore.v1.DeleteFederationRequest; +import com.google.cloud.metastore.v1.Federation; +import com.google.cloud.metastore.v1.GetFederationRequest; +import com.google.cloud.metastore.v1.ListFederationsRequest; +import com.google.cloud.metastore.v1.ListFederationsResponse; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.UpdateFederationRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataprocMetastoreFederation service API. + * + *

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 + listFederationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFederationsPagedCallable()"); + } + + public UnaryCallable listFederationsCallable() { + throw new UnsupportedOperationException("Not implemented: listFederationsCallable()"); + } + + public UnaryCallable getFederationCallable() { + throw new UnsupportedOperationException("Not implemented: getFederationCallable()"); + } + + public OperationCallable + createFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createFederationOperationCallable()"); + } + + public UnaryCallable createFederationCallable() { + throw new UnsupportedOperationException("Not implemented: createFederationCallable()"); + } + + public OperationCallable + updateFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateFederationOperationCallable()"); + } + + public UnaryCallable updateFederationCallable() { + throw new UnsupportedOperationException("Not implemented: updateFederationCallable()"); + } + + public OperationCallable + deleteFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFederationOperationCallable()"); + } + + public UnaryCallable deleteFederationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFederationCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStubSettings.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStubSettings.java new file mode 100644 index 000000000000..c39bb9971c42 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreFederationStubSettings.java @@ -0,0 +1,819 @@ +/* + * 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.stub; + +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.CreateFederationRequest; +import com.google.cloud.metastore.v1.DeleteFederationRequest; +import com.google.cloud.metastore.v1.Federation; +import com.google.cloud.metastore.v1.GetFederationRequest; +import com.google.cloud.metastore.v1.ListFederationsRequest; +import com.google.cloud.metastore.v1.ListFederationsResponse; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.UpdateFederationRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreFederationStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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 { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings; + private final UnaryCallSettings getFederationSettings; + private final UnaryCallSettings createFederationSettings; + private final OperationCallSettings + createFederationOperationSettings; + private final UnaryCallSettings updateFederationSettings; + private final OperationCallSettings + updateFederationOperationSettings; + private final UnaryCallSettings deleteFederationSettings; + private final OperationCallSettings + deleteFederationOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListFederationsRequest, ListFederationsResponse, Federation> + LIST_FEDERATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFederationsRequest injectToken( + ListFederationsRequest payload, String token) { + return ListFederationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFederationsRequest injectPageSize( + ListFederationsRequest payload, int pageSize) { + return ListFederationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFederationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFederationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFederationsResponse payload) { + return payload.getFederationsList() == null + ? ImmutableList.of() + : payload.getFederationsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + LIST_FEDERATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFederationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_FEDERATIONS_PAGE_STR_DESC, request, context); + return ListFederationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listFederations. */ + public PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return listFederationsSettings; + } + + /** Returns the object with the settings used for calls to getFederation. */ + public UnaryCallSettings getFederationSettings() { + return getFederationSettings; + } + + /** Returns the object with the settings used for calls to createFederation. */ + public UnaryCallSettings createFederationSettings() { + return createFederationSettings; + } + + /** Returns the object with the settings used for calls to createFederation. */ + public OperationCallSettings + createFederationOperationSettings() { + return createFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public UnaryCallSettings updateFederationSettings() { + return updateFederationSettings; + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public OperationCallSettings + updateFederationOperationSettings() { + return updateFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public UnaryCallSettings deleteFederationSettings() { + return deleteFederationSettings; + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public OperationCallSettings + deleteFederationOperationSettings() { + return deleteFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public DataprocMetastoreFederationStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataprocMetastoreFederationStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataprocMetastoreFederationStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "metastore.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "metastore.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreFederationStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listFederationsSettings = settingsBuilder.listFederationsSettings().build(); + getFederationSettings = settingsBuilder.getFederationSettings().build(); + createFederationSettings = settingsBuilder.createFederationSettings().build(); + createFederationOperationSettings = settingsBuilder.createFederationOperationSettings().build(); + updateFederationSettings = settingsBuilder.updateFederationSettings().build(); + updateFederationOperationSettings = settingsBuilder.updateFederationOperationSettings().build(); + deleteFederationSettings = settingsBuilder.deleteFederationSettings().build(); + deleteFederationOperationSettings = settingsBuilder.deleteFederationOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for DataprocMetastoreFederationStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings; + private final UnaryCallSettings.Builder getFederationSettings; + private final UnaryCallSettings.Builder + createFederationSettings; + private final OperationCallSettings.Builder< + CreateFederationRequest, Federation, OperationMetadata> + createFederationOperationSettings; + private final UnaryCallSettings.Builder + updateFederationSettings; + private final OperationCallSettings.Builder< + UpdateFederationRequest, Federation, OperationMetadata> + updateFederationOperationSettings; + private final UnaryCallSettings.Builder + deleteFederationSettings; + private final OperationCallSettings.Builder + deleteFederationOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listFederationsSettings = PagedCallSettings.newBuilder(LIST_FEDERATIONS_PAGE_STR_FACT); + getFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFederationOperationSettings = OperationCallSettings.newBuilder(); + updateFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFederationOperationSettings = OperationCallSettings.newBuilder(); + deleteFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFederationOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listFederationsSettings, + getFederationSettings, + createFederationSettings, + updateFederationSettings, + deleteFederationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(DataprocMetastoreFederationStubSettings settings) { + super(settings); + + listFederationsSettings = settings.listFederationsSettings.toBuilder(); + getFederationSettings = settings.getFederationSettings.toBuilder(); + createFederationSettings = settings.createFederationSettings.toBuilder(); + createFederationOperationSettings = settings.createFederationOperationSettings.toBuilder(); + updateFederationSettings = settings.updateFederationSettings.toBuilder(); + updateFederationOperationSettings = settings.updateFederationOperationSettings.toBuilder(); + deleteFederationSettings = settings.deleteFederationSettings.toBuilder(); + deleteFederationOperationSettings = settings.deleteFederationOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listFederationsSettings, + getFederationSettings, + createFederationSettings, + updateFederationSettings, + deleteFederationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listFederationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listFederations. */ + public PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return listFederationsSettings; + } + + /** Returns the builder for the settings used for calls to getFederation. */ + public UnaryCallSettings.Builder getFederationSettings() { + return getFederationSettings; + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public UnaryCallSettings.Builder + createFederationSettings() { + return createFederationSettings; + } + + /** Returns the builder for the settings used for calls to createFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createFederationOperationSettings() { + return createFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public UnaryCallSettings.Builder + updateFederationSettings() { + return updateFederationSettings; + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateFederationOperationSettings() { + return updateFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public UnaryCallSettings.Builder + deleteFederationSettings() { + return deleteFederationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteFederationOperationSettings() { + return deleteFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public DataprocMetastoreFederationStubSettings build() throws IOException { + return new DataprocMetastoreFederationStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java new file mode 100644 index 000000000000..9cb891437341 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStub.java @@ -0,0 +1,231 @@ +/* + * 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.stub; + +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.Backup; +import com.google.cloud.metastore.v1.CreateBackupRequest; +import com.google.cloud.metastore.v1.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1.CreateServiceRequest; +import com.google.cloud.metastore.v1.DeleteBackupRequest; +import com.google.cloud.metastore.v1.DeleteServiceRequest; +import com.google.cloud.metastore.v1.ExportMetadataRequest; +import com.google.cloud.metastore.v1.GetBackupRequest; +import com.google.cloud.metastore.v1.GetMetadataImportRequest; +import com.google.cloud.metastore.v1.GetServiceRequest; +import com.google.cloud.metastore.v1.ListBackupsRequest; +import com.google.cloud.metastore.v1.ListBackupsResponse; +import com.google.cloud.metastore.v1.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1.ListServicesRequest; +import com.google.cloud.metastore.v1.ListServicesResponse; +import com.google.cloud.metastore.v1.MetadataExport; +import com.google.cloud.metastore.v1.MetadataImport; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.Restore; +import com.google.cloud.metastore.v1.RestoreServiceRequest; +import com.google.cloud.metastore.v1.Service; +import com.google.cloud.metastore.v1.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1.UpdateServiceRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DataprocMetastoreStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listServicesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); + } + + public UnaryCallable listServicesCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); + } + + public UnaryCallable getServiceCallable() { + throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); + } + + public OperationCallable + createServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceOperationCallable()"); + } + + public UnaryCallable createServiceCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceCallable()"); + } + + public OperationCallable + updateServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceOperationCallable()"); + } + + public UnaryCallable updateServiceCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceCallable()"); + } + + public OperationCallable + deleteServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); + } + + public UnaryCallable deleteServiceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); + } + + public UnaryCallable + listMetadataImportsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMetadataImportsPagedCallable()"); + } + + public UnaryCallable + listMetadataImportsCallable() { + throw new UnsupportedOperationException("Not implemented: listMetadataImportsCallable()"); + } + + public UnaryCallable getMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: getMetadataImportCallable()"); + } + + public OperationCallable + createMetadataImportOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createMetadataImportOperationCallable()"); + } + + public UnaryCallable createMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: createMetadataImportCallable()"); + } + + public OperationCallable + updateMetadataImportOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateMetadataImportOperationCallable()"); + } + + public UnaryCallable updateMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: updateMetadataImportCallable()"); + } + + public OperationCallable + exportMetadataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportMetadataOperationCallable()"); + } + + public UnaryCallable exportMetadataCallable() { + throw new UnsupportedOperationException("Not implemented: exportMetadataCallable()"); + } + + public OperationCallable + restoreServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: restoreServiceOperationCallable()"); + } + + public UnaryCallable restoreServiceCallable() { + throw new UnsupportedOperationException("Not implemented: restoreServiceCallable()"); + } + + public UnaryCallable listBackupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); + } + + public UnaryCallable listBackupsCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); + } + + public UnaryCallable getBackupCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); + } + + public OperationCallable + createBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); + } + + public UnaryCallable createBackupCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); + } + + public OperationCallable + deleteBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); + } + + public UnaryCallable deleteBackupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStubSettings.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStubSettings.java new file mode 100644 index 000000000000..d67939d684e1 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStubSettings.java @@ -0,0 +1,1489 @@ +/* + * 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.stub; + +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.Backup; +import com.google.cloud.metastore.v1.CreateBackupRequest; +import com.google.cloud.metastore.v1.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1.CreateServiceRequest; +import com.google.cloud.metastore.v1.DeleteBackupRequest; +import com.google.cloud.metastore.v1.DeleteServiceRequest; +import com.google.cloud.metastore.v1.ExportMetadataRequest; +import com.google.cloud.metastore.v1.GetBackupRequest; +import com.google.cloud.metastore.v1.GetMetadataImportRequest; +import com.google.cloud.metastore.v1.GetServiceRequest; +import com.google.cloud.metastore.v1.ListBackupsRequest; +import com.google.cloud.metastore.v1.ListBackupsResponse; +import com.google.cloud.metastore.v1.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1.ListServicesRequest; +import com.google.cloud.metastore.v1.ListServicesResponse; +import com.google.cloud.metastore.v1.MetadataExport; +import com.google.cloud.metastore.v1.MetadataImport; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.Restore; +import com.google.cloud.metastore.v1.RestoreServiceRequest; +import com.google.cloud.metastore.v1.Service; +import com.google.cloud.metastore.v1.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1.UpdateServiceRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataprocMetastoreStubSettings.Builder dataprocMetastoreSettingsBuilder =
+ *     DataprocMetastoreStubSettings.newBuilder();
+ * dataprocMetastoreSettingsBuilder
+ *     .getServiceSettings()
+ *     .setRetrySettings(
+ *         dataprocMetastoreSettingsBuilder
+ *             .getServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataprocMetastoreStubSettings dataprocMetastoreSettings =
+ *     dataprocMetastoreSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataprocMetastoreStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings getServiceSettings; + private final UnaryCallSettings createServiceSettings; + private final OperationCallSettings + createServiceOperationSettings; + private final UnaryCallSettings updateServiceSettings; + private final OperationCallSettings + updateServiceOperationSettings; + private final UnaryCallSettings deleteServiceSettings; + private final OperationCallSettings + deleteServiceOperationSettings; + private final PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings; + private final UnaryCallSettings + getMetadataImportSettings; + private final UnaryCallSettings + createMetadataImportSettings; + private final OperationCallSettings< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings; + private final UnaryCallSettings + updateMetadataImportSettings; + private final OperationCallSettings< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings; + private final UnaryCallSettings exportMetadataSettings; + private final OperationCallSettings + exportMetadataOperationSettings; + private final UnaryCallSettings restoreServiceSettings; + private final OperationCallSettings + restoreServiceOperationSettings; + private final PagedCallSettings + listBackupsSettings; + private final UnaryCallSettings getBackupSettings; + private final UnaryCallSettings createBackupSettings; + private final OperationCallSettings + createBackupOperationSettings; + private final UnaryCallSettings deleteBackupSettings; + private final OperationCallSettings + deleteBackupOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_SERVICES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServicesRequest injectToken(ListServicesRequest payload, String token) { + return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { + return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServicesResponse payload) { + return payload.getServicesList() == null + ? ImmutableList.of() + : payload.getServicesList(); + } + }; + + private static final PagedListDescriptor< + ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport> + LIST_METADATA_IMPORTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMetadataImportsRequest injectToken( + ListMetadataImportsRequest payload, String token) { + return ListMetadataImportsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMetadataImportsRequest injectPageSize( + ListMetadataImportsRequest payload, int pageSize) { + return ListMetadataImportsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMetadataImportsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMetadataImportsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMetadataImportsResponse payload) { + return payload.getMetadataImportsList() == null + ? ImmutableList.of() + : payload.getMetadataImportsList(); + } + }; + + private static final PagedListDescriptor + LIST_BACKUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { + return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { + return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBackupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBackupsResponse payload) { + return payload.getBackupsList() == null + ? ImmutableList.of() + : payload.getBackupsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + LIST_SERVICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); + return ListServicesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + LIST_METADATA_IMPORTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMetadataImportsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_METADATA_IMPORTS_PAGE_STR_DESC, request, context); + return ListMetadataImportsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + LIST_BACKUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBackupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); + return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return getServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return createServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listMetadataImports. */ + public PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return listMetadataImportsSettings; + } + + /** Returns the object with the settings used for calls to getMetadataImport. */ + public UnaryCallSettings getMetadataImportSettings() { + return getMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public UnaryCallSettings createMetadataImportSettings() { + return createMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public OperationCallSettings + createMetadataImportOperationSettings() { + return createMetadataImportOperationSettings; + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings updateMetadataImportSettings() { + return updateMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public OperationCallSettings + updateMetadataImportOperationSettings() { + return updateMetadataImportOperationSettings; + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public UnaryCallSettings exportMetadataSettings() { + return exportMetadataSettings; + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public OperationCallSettings + exportMetadataOperationSettings() { + return exportMetadataOperationSettings; + } + + /** Returns the object with the settings used for calls to restoreService. */ + public UnaryCallSettings restoreServiceSettings() { + return restoreServiceSettings; + } + + /** Returns the object with the settings used for calls to restoreService. */ + public OperationCallSettings + restoreServiceOperationSettings() { + return restoreServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return listBackupsSettings; + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return getBackupSettings; + } + + /** Returns the object with the settings used for calls to createBackup. */ + public UnaryCallSettings createBackupSettings() { + return createBackupSettings; + } + + /** Returns the object with the settings used for calls to createBackup. */ + public OperationCallSettings + createBackupOperationSettings() { + return createBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return deleteBackupSettings; + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public DataprocMetastoreStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataprocMetastoreStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataprocMetastoreStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "metastore.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "metastore.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listServicesSettings = settingsBuilder.listServicesSettings().build(); + getServiceSettings = settingsBuilder.getServiceSettings().build(); + createServiceSettings = settingsBuilder.createServiceSettings().build(); + createServiceOperationSettings = settingsBuilder.createServiceOperationSettings().build(); + updateServiceSettings = settingsBuilder.updateServiceSettings().build(); + updateServiceOperationSettings = settingsBuilder.updateServiceOperationSettings().build(); + deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); + deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); + listMetadataImportsSettings = settingsBuilder.listMetadataImportsSettings().build(); + getMetadataImportSettings = settingsBuilder.getMetadataImportSettings().build(); + createMetadataImportSettings = settingsBuilder.createMetadataImportSettings().build(); + createMetadataImportOperationSettings = + settingsBuilder.createMetadataImportOperationSettings().build(); + updateMetadataImportSettings = settingsBuilder.updateMetadataImportSettings().build(); + updateMetadataImportOperationSettings = + settingsBuilder.updateMetadataImportOperationSettings().build(); + exportMetadataSettings = settingsBuilder.exportMetadataSettings().build(); + exportMetadataOperationSettings = settingsBuilder.exportMetadataOperationSettings().build(); + restoreServiceSettings = settingsBuilder.restoreServiceSettings().build(); + restoreServiceOperationSettings = settingsBuilder.restoreServiceOperationSettings().build(); + listBackupsSettings = settingsBuilder.listBackupsSettings().build(); + getBackupSettings = settingsBuilder.getBackupSettings().build(); + createBackupSettings = settingsBuilder.createBackupSettings().build(); + createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); + deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); + deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for DataprocMetastoreStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings.Builder getServiceSettings; + private final UnaryCallSettings.Builder createServiceSettings; + private final OperationCallSettings.Builder + createServiceOperationSettings; + private final UnaryCallSettings.Builder updateServiceSettings; + private final OperationCallSettings.Builder + updateServiceOperationSettings; + private final UnaryCallSettings.Builder deleteServiceSettings; + private final OperationCallSettings.Builder + deleteServiceOperationSettings; + private final PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings; + private final UnaryCallSettings.Builder + getMetadataImportSettings; + private final UnaryCallSettings.Builder + createMetadataImportSettings; + private final OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings; + private final UnaryCallSettings.Builder + updateMetadataImportSettings; + private final OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings; + private final UnaryCallSettings.Builder + exportMetadataSettings; + private final OperationCallSettings.Builder< + ExportMetadataRequest, MetadataExport, OperationMetadata> + exportMetadataOperationSettings; + private final UnaryCallSettings.Builder + restoreServiceSettings; + private final OperationCallSettings.Builder + restoreServiceOperationSettings; + private final PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings; + private final UnaryCallSettings.Builder getBackupSettings; + private final UnaryCallSettings.Builder createBackupSettings; + private final OperationCallSettings.Builder + createBackupOperationSettings; + private final UnaryCallSettings.Builder deleteBackupSettings; + private final OperationCallSettings.Builder + deleteBackupOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); + getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceOperationSettings = OperationCallSettings.newBuilder(); + updateServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateServiceOperationSettings = OperationCallSettings.newBuilder(); + deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteServiceOperationSettings = OperationCallSettings.newBuilder(); + listMetadataImportsSettings = + PagedCallSettings.newBuilder(LIST_METADATA_IMPORTS_PAGE_STR_FACT); + getMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMetadataImportOperationSettings = OperationCallSettings.newBuilder(); + updateMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMetadataImportOperationSettings = OperationCallSettings.newBuilder(); + exportMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportMetadataOperationSettings = OperationCallSettings.newBuilder(); + restoreServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restoreServiceOperationSettings = OperationCallSettings.newBuilder(); + listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); + getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupOperationSettings = OperationCallSettings.newBuilder(); + deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + createServiceSettings, + updateServiceSettings, + deleteServiceSettings, + listMetadataImportsSettings, + getMetadataImportSettings, + createMetadataImportSettings, + updateMetadataImportSettings, + exportMetadataSettings, + restoreServiceSettings, + listBackupsSettings, + getBackupSettings, + createBackupSettings, + deleteBackupSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(DataprocMetastoreStubSettings settings) { + super(settings); + + listServicesSettings = settings.listServicesSettings.toBuilder(); + getServiceSettings = settings.getServiceSettings.toBuilder(); + createServiceSettings = settings.createServiceSettings.toBuilder(); + createServiceOperationSettings = settings.createServiceOperationSettings.toBuilder(); + updateServiceSettings = settings.updateServiceSettings.toBuilder(); + updateServiceOperationSettings = settings.updateServiceOperationSettings.toBuilder(); + deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); + deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); + listMetadataImportsSettings = settings.listMetadataImportsSettings.toBuilder(); + getMetadataImportSettings = settings.getMetadataImportSettings.toBuilder(); + createMetadataImportSettings = settings.createMetadataImportSettings.toBuilder(); + createMetadataImportOperationSettings = + settings.createMetadataImportOperationSettings.toBuilder(); + updateMetadataImportSettings = settings.updateMetadataImportSettings.toBuilder(); + updateMetadataImportOperationSettings = + settings.updateMetadataImportOperationSettings.toBuilder(); + exportMetadataSettings = settings.exportMetadataSettings.toBuilder(); + exportMetadataOperationSettings = settings.exportMetadataOperationSettings.toBuilder(); + restoreServiceSettings = settings.restoreServiceSettings.toBuilder(); + restoreServiceOperationSettings = settings.restoreServiceOperationSettings.toBuilder(); + listBackupsSettings = settings.listBackupsSettings.toBuilder(); + getBackupSettings = settings.getBackupSettings.toBuilder(); + createBackupSettings = settings.createBackupSettings.toBuilder(); + createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); + deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); + deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + createServiceSettings, + updateServiceSettings, + deleteServiceSettings, + listMetadataImportsSettings, + getMetadataImportSettings, + createMetadataImportSettings, + updateMetadataImportSettings, + exportMetadataSettings, + restoreServiceSettings, + listBackupsSettings, + getBackupSettings, + createBackupSettings, + deleteBackupSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listServicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listMetadataImportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .exportMetadataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .restoreServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listBackupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .updateServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(3000000L)) + .build())); + + builder + .deleteServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1500000L)) + .build())); + + builder + .createMetadataImportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .updateMetadataImportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1200000L)) + .build())); + + builder + .exportMetadataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataExport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .restoreServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Restore.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .createBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .deleteBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1500000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return createServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listMetadataImports. */ + public PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return listMetadataImportsSettings; + } + + /** Returns the builder for the settings used for calls to getMetadataImport. */ + public UnaryCallSettings.Builder + getMetadataImportSettings() { + return getMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public UnaryCallSettings.Builder + createMetadataImportSettings() { + return createMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings() { + return createMetadataImportOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings.Builder + updateMetadataImportSettings() { + return updateMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings() { + return updateMetadataImportOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public UnaryCallSettings.Builder exportMetadataSettings() { + return exportMetadataSettings; + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + exportMetadataOperationSettings() { + return exportMetadataOperationSettings; + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public UnaryCallSettings.Builder restoreServiceSettings() { + return restoreServiceSettings; + } + + /** Returns the builder for the settings used for calls to restoreService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + restoreServiceOperationSettings() { + return restoreServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listBackups. */ + public PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings() { + return listBackupsSettings; + } + + /** Returns the builder for the settings used for calls to getBackup. */ + public UnaryCallSettings.Builder getBackupSettings() { + return getBackupSettings; + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public UnaryCallSettings.Builder createBackupSettings() { + return createBackupSettings; + } + + /** Returns the builder for the settings used for calls to createBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createBackupOperationSettings() { + return createBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public UnaryCallSettings.Builder deleteBackupSettings() { + return deleteBackupSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public DataprocMetastoreStubSettings build() throws IOException { + return new DataprocMetastoreStubSettings(this); + } + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreCallableFactory.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationCallableFactory.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..2346becaf6d9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreFederationStub.java @@ -0,0 +1,521 @@ +/* + * 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.stub; + +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.CreateFederationRequest; +import com.google.cloud.metastore.v1.DeleteFederationRequest; +import com.google.cloud.metastore.v1.Federation; +import com.google.cloud.metastore.v1.GetFederationRequest; +import com.google.cloud.metastore.v1.ListFederationsRequest; +import com.google.cloud.metastore.v1.ListFederationsResponse; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.UpdateFederationRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataprocMetastoreFederation service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { + private static final MethodDescriptor + listFederationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/ListFederations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFederationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFederationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/GetFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Federation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/CreateFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/UpdateFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/DeleteFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + listFederationsCallable; + private final UnaryCallable + listFederationsPagedCallable; + private final UnaryCallable getFederationCallable; + private final UnaryCallable createFederationCallable; + private final OperationCallable + createFederationOperationCallable; + private final UnaryCallable updateFederationCallable; + private final OperationCallable + updateFederationOperationCallable; + private final UnaryCallable deleteFederationCallable; + private final OperationCallable + deleteFederationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataprocMetastoreFederationStub create( + DataprocMetastoreFederationStubSettings settings) throws IOException { + return new GrpcDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataprocMetastoreFederationStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataprocMetastoreFederationStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDataprocMetastoreFederationCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listFederationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFederationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("federation.name", String.valueOf(request.getFederation().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.listFederationsCallable = + callableFactory.createUnaryCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.listFederationsPagedCallable = + callableFactory.createPagedCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.getFederationCallable = + callableFactory.createUnaryCallable( + getFederationTransportSettings, settings.getFederationSettings(), clientContext); + this.createFederationCallable = + callableFactory.createUnaryCallable( + createFederationTransportSettings, settings.createFederationSettings(), clientContext); + this.createFederationOperationCallable = + callableFactory.createOperationCallable( + createFederationTransportSettings, + settings.createFederationOperationSettings(), + clientContext, + operationsStub); + this.updateFederationCallable = + callableFactory.createUnaryCallable( + updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); + this.updateFederationOperationCallable = + callableFactory.createOperationCallable( + updateFederationTransportSettings, + settings.updateFederationOperationSettings(), + clientContext, + operationsStub); + this.deleteFederationCallable = + callableFactory.createUnaryCallable( + deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); + this.deleteFederationOperationCallable = + callableFactory.createOperationCallable( + deleteFederationTransportSettings, + settings.deleteFederationOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listFederationsCallable() { + return listFederationsCallable; + } + + @Override + public UnaryCallable + listFederationsPagedCallable() { + return listFederationsPagedCallable; + } + + @Override + public UnaryCallable getFederationCallable() { + return getFederationCallable; + } + + @Override + public UnaryCallable createFederationCallable() { + return createFederationCallable; + } + + @Override + public OperationCallable + createFederationOperationCallable() { + return createFederationOperationCallable; + } + + @Override + public UnaryCallable updateFederationCallable() { + return updateFederationCallable; + } + + @Override + public OperationCallable + updateFederationOperationCallable() { + return updateFederationOperationCallable; + } + + @Override + public UnaryCallable deleteFederationCallable() { + return deleteFederationCallable; + } + + @Override + public OperationCallable + deleteFederationOperationCallable() { + return deleteFederationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreStub.java new file mode 100644 index 000000000000..583afa1a2724 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreStub.java @@ -0,0 +1,932 @@ +/* + * 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.stub; + +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.Backup; +import com.google.cloud.metastore.v1.CreateBackupRequest; +import com.google.cloud.metastore.v1.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1.CreateServiceRequest; +import com.google.cloud.metastore.v1.DeleteBackupRequest; +import com.google.cloud.metastore.v1.DeleteServiceRequest; +import com.google.cloud.metastore.v1.ExportMetadataRequest; +import com.google.cloud.metastore.v1.GetBackupRequest; +import com.google.cloud.metastore.v1.GetMetadataImportRequest; +import com.google.cloud.metastore.v1.GetServiceRequest; +import com.google.cloud.metastore.v1.ListBackupsRequest; +import com.google.cloud.metastore.v1.ListBackupsResponse; +import com.google.cloud.metastore.v1.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1.ListServicesRequest; +import com.google.cloud.metastore.v1.ListServicesResponse; +import com.google.cloud.metastore.v1.MetadataExport; +import com.google.cloud.metastore.v1.MetadataImport; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.Restore; +import com.google.cloud.metastore.v1.RestoreServiceRequest; +import com.google.cloud.metastore.v1.Service; +import com.google.cloud.metastore.v1.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1.UpdateServiceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDataprocMetastoreStub extends DataprocMetastoreStub { + private static final MethodDescriptor + listServicesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListServices") + .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetService") + .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateService") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/UpdateService") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/DeleteService") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listMetadataImportsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListMetadataImports") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMetadataImportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMetadataImportsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MetadataImport.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/UpdateMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportMetadataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ExportMetadata") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + restoreServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/RestoreService") + .setRequestMarshaller( + ProtoUtils.marshaller(RestoreServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listBackupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListBackups") + .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetBackup") + .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateBackup") + .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/DeleteBackup") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable + listMetadataImportsCallable; + private final UnaryCallable + listMetadataImportsPagedCallable; + private final UnaryCallable getMetadataImportCallable; + private final UnaryCallable createMetadataImportCallable; + private final OperationCallable + createMetadataImportOperationCallable; + private final UnaryCallable updateMetadataImportCallable; + private final OperationCallable + updateMetadataImportOperationCallable; + private final UnaryCallable exportMetadataCallable; + private final OperationCallable + exportMetadataOperationCallable; + private final UnaryCallable restoreServiceCallable; + private final OperationCallable + restoreServiceOperationCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable createBackupCallable; + private final OperationCallable + createBackupOperationCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) + throws IOException { + return new GrpcDataprocMetastoreStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataprocMetastoreStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataprocMetastoreStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataprocMetastoreCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listServicesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service.name", String.valueOf(request.getService().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listMetadataImportsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMetadataImportsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "metadata_import.name", + String.valueOf(request.getMetadataImport().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings exportMetadataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportMetadataMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings restoreServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restoreServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings listBackupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBackupsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + operationsStub); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + operationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + operationsStub); + this.listMetadataImportsCallable = + callableFactory.createUnaryCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.listMetadataImportsPagedCallable = + callableFactory.createPagedCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.getMetadataImportCallable = + callableFactory.createUnaryCallable( + getMetadataImportTransportSettings, + settings.getMetadataImportSettings(), + clientContext); + this.createMetadataImportCallable = + callableFactory.createUnaryCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportSettings(), + clientContext); + this.createMetadataImportOperationCallable = + callableFactory.createOperationCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportOperationSettings(), + clientContext, + operationsStub); + this.updateMetadataImportCallable = + callableFactory.createUnaryCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportSettings(), + clientContext); + this.updateMetadataImportOperationCallable = + callableFactory.createOperationCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportOperationSettings(), + clientContext, + operationsStub); + this.exportMetadataCallable = + callableFactory.createUnaryCallable( + exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); + this.exportMetadataOperationCallable = + callableFactory.createOperationCallable( + exportMetadataTransportSettings, + settings.exportMetadataOperationSettings(), + clientContext, + operationsStub); + this.restoreServiceCallable = + callableFactory.createUnaryCallable( + restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); + this.restoreServiceOperationCallable = + callableFactory.createOperationCallable( + restoreServiceTransportSettings, + settings.restoreServiceOperationSettings(), + clientContext, + operationsStub); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.createBackupCallable = + callableFactory.createUnaryCallable( + createBackupTransportSettings, settings.createBackupSettings(), clientContext); + this.createBackupOperationCallable = + callableFactory.createOperationCallable( + createBackupTransportSettings, + settings.createBackupOperationSettings(), + clientContext, + operationsStub); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable + listMetadataImportsCallable() { + return listMetadataImportsCallable; + } + + @Override + public UnaryCallable + listMetadataImportsPagedCallable() { + return listMetadataImportsPagedCallable; + } + + @Override + public UnaryCallable getMetadataImportCallable() { + return getMetadataImportCallable; + } + + @Override + public UnaryCallable createMetadataImportCallable() { + return createMetadataImportCallable; + } + + @Override + public OperationCallable + createMetadataImportOperationCallable() { + return createMetadataImportOperationCallable; + } + + @Override + public UnaryCallable updateMetadataImportCallable() { + return updateMetadataImportCallable; + } + + @Override + public OperationCallable + updateMetadataImportOperationCallable() { + return updateMetadataImportOperationCallable; + } + + @Override + public UnaryCallable exportMetadataCallable() { + return exportMetadataCallable; + } + + @Override + public OperationCallable + exportMetadataOperationCallable() { + return exportMetadataOperationCallable; + } + + @Override + public UnaryCallable restoreServiceCallable() { + return restoreServiceCallable; + } + + @Override + public OperationCallable + restoreServiceOperationCallable() { + return restoreServiceOperationCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable createBackupCallable() { + return createBackupCallable; + } + + @Override + public OperationCallable + createBackupOperationCallable() { + return createBackupOperationCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreCallableFactory.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..0a78a9ea74f8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreFederationStub.java @@ -0,0 +1,816 @@ +/* + * 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.stub; + +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.CreateFederationRequest; +import com.google.cloud.metastore.v1.DeleteFederationRequest; +import com.google.cloud.metastore.v1.Federation; +import com.google.cloud.metastore.v1.GetFederationRequest; +import com.google.cloud.metastore.v1.ListFederationsRequest; +import com.google.cloud.metastore.v1.ListFederationsResponse; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.UpdateFederationRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataprocMetastoreFederation service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Federation.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listFederationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/ListFederations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/federations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListFederationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/GetFederation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Federation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/CreateFederation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/federations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "federationId", request.getFederationId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("federation", request.getFederation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/UpdateFederation") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{federation.name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "federation.name", request.getFederation().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("federation", request.getFederation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1.DataprocMetastoreFederation/DeleteFederation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/services/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/federations/*}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/services/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/federations/*}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/services/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/federations/*}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + listFederationsCallable; + private final UnaryCallable + listFederationsPagedCallable; + private final UnaryCallable getFederationCallable; + private final UnaryCallable createFederationCallable; + private final OperationCallable + createFederationOperationCallable; + private final UnaryCallable updateFederationCallable; + private final OperationCallable + updateFederationOperationCallable; + private final UnaryCallable deleteFederationCallable; + private final OperationCallable + deleteFederationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataprocMetastoreFederationStub create( + DataprocMetastoreFederationStubSettings settings) throws IOException { + return new HttpJsonDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataprocMetastoreFederationStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataprocMetastoreFederationStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonDataprocMetastoreFederationCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listFederationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listFederationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listFederationsCallable = + callableFactory.createUnaryCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.listFederationsPagedCallable = + callableFactory.createPagedCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.getFederationCallable = + callableFactory.createUnaryCallable( + getFederationTransportSettings, settings.getFederationSettings(), clientContext); + this.createFederationCallable = + callableFactory.createUnaryCallable( + createFederationTransportSettings, settings.createFederationSettings(), clientContext); + this.createFederationOperationCallable = + callableFactory.createOperationCallable( + createFederationTransportSettings, + settings.createFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateFederationCallable = + callableFactory.createUnaryCallable( + updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); + this.updateFederationOperationCallable = + callableFactory.createOperationCallable( + updateFederationTransportSettings, + settings.updateFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteFederationCallable = + callableFactory.createUnaryCallable( + deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); + this.deleteFederationOperationCallable = + callableFactory.createOperationCallable( + deleteFederationTransportSettings, + settings.deleteFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listFederationsMethodDescriptor); + methodDescriptors.add(getFederationMethodDescriptor); + methodDescriptors.add(createFederationMethodDescriptor); + methodDescriptors.add(updateFederationMethodDescriptor); + methodDescriptors.add(deleteFederationMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listFederationsCallable() { + return listFederationsCallable; + } + + @Override + public UnaryCallable + listFederationsPagedCallable() { + return listFederationsPagedCallable; + } + + @Override + public UnaryCallable getFederationCallable() { + return getFederationCallable; + } + + @Override + public UnaryCallable createFederationCallable() { + return createFederationCallable; + } + + @Override + public OperationCallable + createFederationOperationCallable() { + return createFederationOperationCallable; + } + + @Override + public UnaryCallable updateFederationCallable() { + return updateFederationCallable; + } + + @Override + public OperationCallable + updateFederationOperationCallable() { + return updateFederationOperationCallable; + } + + @Override + public UnaryCallable deleteFederationCallable() { + return deleteFederationCallable; + } + + @Override + public OperationCallable + deleteFederationOperationCallable() { + return deleteFederationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreStub.java new file mode 100644 index 000000000000..7320a0b6c4bb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/HttpJsonDataprocMetastoreStub.java @@ -0,0 +1,1488 @@ +/* + * 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.stub; + +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.Backup; +import com.google.cloud.metastore.v1.CreateBackupRequest; +import com.google.cloud.metastore.v1.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1.CreateServiceRequest; +import com.google.cloud.metastore.v1.DeleteBackupRequest; +import com.google.cloud.metastore.v1.DeleteServiceRequest; +import com.google.cloud.metastore.v1.ExportMetadataRequest; +import com.google.cloud.metastore.v1.GetBackupRequest; +import com.google.cloud.metastore.v1.GetMetadataImportRequest; +import com.google.cloud.metastore.v1.GetServiceRequest; +import com.google.cloud.metastore.v1.ListBackupsRequest; +import com.google.cloud.metastore.v1.ListBackupsResponse; +import com.google.cloud.metastore.v1.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1.ListServicesRequest; +import com.google.cloud.metastore.v1.ListServicesResponse; +import com.google.cloud.metastore.v1.MetadataExport; +import com.google.cloud.metastore.v1.MetadataImport; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.Restore; +import com.google.cloud.metastore.v1.RestoreServiceRequest; +import com.google.cloud.metastore.v1.Service; +import com.google.cloud.metastore.v1.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1.UpdateServiceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(MetadataImport.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Service.getDescriptor()) + .add(MetadataExport.getDescriptor()) + .add(Backup.getDescriptor()) + .add(Restore.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listServicesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListServices") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/services", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListServicesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetService") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Service.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/services", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "serviceId", request.getServiceId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("service", request.getService(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/UpdateService") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{service.name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "service.name", request.getService().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("service", request.getService(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/DeleteService") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listMetadataImportsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListMetadataImports") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/services/*}/metadataImports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListMetadataImportsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetMetadataImport") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/services/*/metadataImports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MetadataImport.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateMetadataImport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/services/*}/metadataImports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "metadataImportId", request.getMetadataImportId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("metadataImport", request.getMetadataImport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateMetadataImportRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/UpdateMetadataImport") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{metadataImport.name=projects/*/locations/*/services/*/metadataImports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "metadataImport.name", + request.getMetadataImport().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("metadataImport", request.getMetadataImport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateMetadataImportRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + exportMetadataMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ExportMetadata") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{service=projects/*/locations/*/services/*}:exportMetadata", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportMetadataRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + restoreServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/RestoreService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{service=projects/*/locations/*/services/*}:restore", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RestoreServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listBackupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/ListBackups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/services/*}/backups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/GetBackup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/services/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Backup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/CreateBackup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/services/*}/backups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "backupId", request.getBackupId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backup", request.getBackup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/DeleteBackup") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/services/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/services/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/federations/*}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/services/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/federations/*}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/services/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/federations/*}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable + listMetadataImportsCallable; + private final UnaryCallable + listMetadataImportsPagedCallable; + private final UnaryCallable getMetadataImportCallable; + private final UnaryCallable createMetadataImportCallable; + private final OperationCallable + createMetadataImportOperationCallable; + private final UnaryCallable updateMetadataImportCallable; + private final OperationCallable + updateMetadataImportOperationCallable; + private final UnaryCallable exportMetadataCallable; + private final OperationCallable + exportMetadataOperationCallable; + private final UnaryCallable restoreServiceCallable; + private final OperationCallable + restoreServiceOperationCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable createBackupCallable; + private final OperationCallable + createBackupOperationCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) + throws IOException { + return new HttpJsonDataprocMetastoreStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataprocMetastoreStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataprocMetastoreStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDataprocMetastoreCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listServicesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listMetadataImportsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listMetadataImportsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings exportMetadataTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportMetadataMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings restoreServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(restoreServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listBackupsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBackupsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listMetadataImportsCallable = + callableFactory.createUnaryCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.listMetadataImportsPagedCallable = + callableFactory.createPagedCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.getMetadataImportCallable = + callableFactory.createUnaryCallable( + getMetadataImportTransportSettings, + settings.getMetadataImportSettings(), + clientContext); + this.createMetadataImportCallable = + callableFactory.createUnaryCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportSettings(), + clientContext); + this.createMetadataImportOperationCallable = + callableFactory.createOperationCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateMetadataImportCallable = + callableFactory.createUnaryCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportSettings(), + clientContext); + this.updateMetadataImportOperationCallable = + callableFactory.createOperationCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.exportMetadataCallable = + callableFactory.createUnaryCallable( + exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); + this.exportMetadataOperationCallable = + callableFactory.createOperationCallable( + exportMetadataTransportSettings, + settings.exportMetadataOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.restoreServiceCallable = + callableFactory.createUnaryCallable( + restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); + this.restoreServiceOperationCallable = + callableFactory.createOperationCallable( + restoreServiceTransportSettings, + settings.restoreServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.createBackupCallable = + callableFactory.createUnaryCallable( + createBackupTransportSettings, settings.createBackupSettings(), clientContext); + this.createBackupOperationCallable = + callableFactory.createOperationCallable( + createBackupTransportSettings, + settings.createBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listServicesMethodDescriptor); + methodDescriptors.add(getServiceMethodDescriptor); + methodDescriptors.add(createServiceMethodDescriptor); + methodDescriptors.add(updateServiceMethodDescriptor); + methodDescriptors.add(deleteServiceMethodDescriptor); + methodDescriptors.add(listMetadataImportsMethodDescriptor); + methodDescriptors.add(getMetadataImportMethodDescriptor); + methodDescriptors.add(createMetadataImportMethodDescriptor); + methodDescriptors.add(updateMetadataImportMethodDescriptor); + methodDescriptors.add(exportMetadataMethodDescriptor); + methodDescriptors.add(restoreServiceMethodDescriptor); + methodDescriptors.add(listBackupsMethodDescriptor); + methodDescriptors.add(getBackupMethodDescriptor); + methodDescriptors.add(createBackupMethodDescriptor); + methodDescriptors.add(deleteBackupMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable + listMetadataImportsCallable() { + return listMetadataImportsCallable; + } + + @Override + public UnaryCallable + listMetadataImportsPagedCallable() { + return listMetadataImportsPagedCallable; + } + + @Override + public UnaryCallable getMetadataImportCallable() { + return getMetadataImportCallable; + } + + @Override + public UnaryCallable createMetadataImportCallable() { + return createMetadataImportCallable; + } + + @Override + public OperationCallable + createMetadataImportOperationCallable() { + return createMetadataImportOperationCallable; + } + + @Override + public UnaryCallable updateMetadataImportCallable() { + return updateMetadataImportCallable; + } + + @Override + public OperationCallable + updateMetadataImportOperationCallable() { + return updateMetadataImportOperationCallable; + } + + @Override + public UnaryCallable exportMetadataCallable() { + return exportMetadataCallable; + } + + @Override + public OperationCallable + exportMetadataOperationCallable() { + return exportMetadataOperationCallable; + } + + @Override + public UnaryCallable restoreServiceCallable() { + return restoreServiceCallable; + } + + @Override + public OperationCallable + restoreServiceOperationCallable() { + return restoreServiceOperationCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable createBackupCallable() { + return createBackupCallable; + } + + @Override + public OperationCallable + createBackupOperationCallable() { + return createBackupOperationCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientHttpJsonTest.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientHttpJsonTest.java new file mode 100644 index 000000000000..2915c7feaca2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientHttpJsonTest.java @@ -0,0 +1,2011 @@ +/* + * 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 static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.stub.HttpJsonDataprocMetastoreStub; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreClientHttpJsonTest { + private static MockHttpService mockService; + private static DataprocMetastoreClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataprocMetastoreStub.getMethodDescriptors(), + DataprocMetastoreSettings.getDefaultEndpoint()); + DataprocMetastoreSettings settings = + DataprocMetastoreSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataprocMetastoreSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listServicesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest2() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listServicesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Service service = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Service actualResponse = client.updateServiceAsync(service, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Service service = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServiceAsync(service, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listMetadataImportsTest() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMetadataImportsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMetadataImportsTest2() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMetadataImportsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMetadataImportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMetadataImportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + MetadataImport metadataImport = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MetadataImport actualResponse = + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MetadataImport metadataImport = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void exportMetadataTest() throws Exception { + MetadataExport expectedResponse = + MetadataExport.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + + MetadataExport actualResponse = client.exportMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportMetadataExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + client.exportMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest2() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest3() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest4() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientTest.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientTest.java new file mode 100644 index 000000000000..dc0cb20bc0fc --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientTest.java @@ -0,0 +1,1832 @@ +/* + * 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 static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreClientTest { + private static MockDataprocMetastore mockDataprocMetastore; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataprocMetastoreClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataprocMetastore = new MockDataprocMetastore(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockDataprocMetastore, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataprocMetastoreSettings settings = + DataprocMetastoreSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest2() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(serviceId, actualRequest.getServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(serviceId, actualRequest.getServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Service actualResponse = client.updateServiceAsync(service, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateServiceRequest actualRequest = ((UpdateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServiceAsync(service, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listMetadataImportsTest() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMetadataImportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMetadataImportsTest2() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMetadataImportsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMetadataImportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMetadataImportRequest actualRequest = + ((CreateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMetadataImportRequest actualRequest = + ((CreateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMetadataImportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MetadataImport actualResponse = + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateMetadataImportRequest actualRequest = + ((UpdateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportMetadataTest() throws Exception { + MetadataExport expectedResponse = + MetadataExport.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + + MetadataExport actualResponse = client.exportMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportMetadataRequest actualRequest = ((ExportMetadataRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getDestinationGcsFolder(), actualRequest.getDestinationGcsFolder()); + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertEquals(request.getDatabaseDumpType(), actualRequest.getDatabaseDumpType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportMetadataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + client.exportMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service.toString(), actualRequest.getService()); + Assert.assertEquals(backup.toString(), actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest2() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service.toString(), actualRequest.getService()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest3() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String service = "service1984153269"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(backup.toString(), actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String service = "service1984153269"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest4() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String service = "service1984153269"; + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String service = "service1984153269"; + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientHttpJsonTest.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientHttpJsonTest.java new file mode 100644 index 000000000000..26fcb874e044 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientHttpJsonTest.java @@ -0,0 +1,880 @@ +/* + * 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 static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.stub.HttpJsonDataprocMetastoreFederationStub; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationClientHttpJsonTest { + private static MockHttpService mockService; + private static DataprocMetastoreFederationClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataprocMetastoreFederationStub.getMethodDescriptors(), + DataprocMetastoreFederationSettings.getDefaultEndpoint()); + DataprocMetastoreFederationSettings settings = + DataprocMetastoreFederationSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataprocMetastoreFederationSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreFederationClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listFederationsTest() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFederationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFederationsTest2() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFederationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockService.addResponse(expectedResponse); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Federation federation = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Federation federation = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFederationAsync(federation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteFederationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteFederationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientTest.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientTest.java new file mode 100644 index 000000000000..86dac15ceddf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationClientTest.java @@ -0,0 +1,805 @@ +/* + * 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 static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationClientTest { + private static MockDataprocMetastoreFederation mockDataprocMetastoreFederation; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataprocMetastoreFederationClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataprocMetastoreFederation = new MockDataprocMetastoreFederation(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockDataprocMetastoreFederation, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataprocMetastoreFederationSettings settings = + DataprocMetastoreFederationSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreFederationClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listFederationsTest() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFederationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFederationsTest2() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFederationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + String name = "name3373707"; + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String name = "name3373707"; + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(federationId, actualRequest.getFederationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + String parent = "parent-995424086"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(federationId, actualRequest.getFederationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String parent = "parent-995424086"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + Federation federation = Federation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFederationRequest actualRequest = ((UpdateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + Federation federation = Federation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFederationAsync(federation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteFederationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteFederationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String name = "name3373707"; + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastore.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastore.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastore.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastore.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreFederation.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreFederation.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreFederationImpl.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreFederationImpl.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreFederationImpl.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreFederationImpl.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreImpl.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreImpl.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreImpl.java rename to owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreImpl.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockIAMPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockIAMPolicy.java new file mode 100644 index 000000000000..8c9d5b5553cf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * 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.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockIAMPolicyImpl.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..7c4ace42ba2c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * 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.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockLocations.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockLocations.java new file mode 100644 index 000000000000..a9eee2d3f668 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * 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.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockLocationsImpl.java b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..dccc01892eba --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * 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.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationGrpc.java b/owl-bot-staging/java-dataproc-metastore/v1/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationGrpc.java new file mode 100644 index 000000000000..0a1d7ccbfd98 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreFederationGrpc.java @@ -0,0 +1,733 @@ +package com.google.cloud.metastore.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Configures and manages metastore federation services.
+ * Dataproc Metastore Federation Service allows federating a collection of
+ * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+ * Metastores. The Federation Service exposes a gRPC URL through which metadata
+ * from the backend metastores are served at query time.
+ * The Dataproc Metastore Federation API defines the following resource model:
+ * * The service works with a collection of Google Cloud projects.
+ * * Each project has a collection of available locations.
+ * * Each location has a collection of federations.
+ * * Dataproc Metastore Federations are resources with names of the
+ * form:
+ * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/metastore/v1/metastore_federation.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DataprocMetastoreFederationGrpc { + + private DataprocMetastoreFederationGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.metastore.v1.DataprocMetastoreFederation"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListFederationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFederations", + requestType = com.google.cloud.metastore.v1.ListFederationsRequest.class, + responseType = com.google.cloud.metastore.v1.ListFederationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListFederationsMethod() { + io.grpc.MethodDescriptor getListFederationsMethod; + if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) == null) { + DataprocMetastoreFederationGrpc.getListFederationsMethod = getListFederationsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFederations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ListFederationsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ListFederationsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("ListFederations")) + .build(); + } + } + } + return getListFederationsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFederation", + requestType = com.google.cloud.metastore.v1.GetFederationRequest.class, + responseType = com.google.cloud.metastore.v1.Federation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetFederationMethod() { + io.grpc.MethodDescriptor getGetFederationMethod; + if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getGetFederationMethod = getGetFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.GetFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.Federation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("GetFederation")) + .build(); + } + } + } + return getGetFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFederation", + requestType = com.google.cloud.metastore.v1.CreateFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateFederationMethod() { + io.grpc.MethodDescriptor getCreateFederationMethod; + if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getCreateFederationMethod = getCreateFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.CreateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("CreateFederation")) + .build(); + } + } + } + return getCreateFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFederation", + requestType = com.google.cloud.metastore.v1.UpdateFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateFederationMethod() { + io.grpc.MethodDescriptor getUpdateFederationMethod; + if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getUpdateFederationMethod = getUpdateFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.UpdateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("UpdateFederation")) + .build(); + } + } + } + return getUpdateFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFederation", + requestType = com.google.cloud.metastore.v1.DeleteFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteFederationMethod() { + io.grpc.MethodDescriptor getDeleteFederationMethod; + if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getDeleteFederationMethod = getDeleteFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.DeleteFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("DeleteFederation")) + .build(); + } + } + } + return getDeleteFederationMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DataprocMetastoreFederationStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataprocMetastoreFederationBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationBlockingStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DataprocMetastoreFederationFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationFutureStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationFutureStub.newStub(factory, channel); + } + + /** + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + default void listFederations(com.google.cloud.metastore.v1.ListFederationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFederationsMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + default void getFederation(com.google.cloud.metastore.v1.GetFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFederationMethod(), responseObserver); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + default void createFederation(com.google.cloud.metastore.v1.CreateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFederationMethod(), responseObserver); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + default void updateFederation(com.google.cloud.metastore.v1.UpdateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFederationMethod(), responseObserver); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + default void deleteFederation(com.google.cloud.metastore.v1.DeleteFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFederationMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static abstract class DataprocMetastoreFederationImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return DataprocMetastoreFederationGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationStub + extends io.grpc.stub.AbstractAsyncStub { + private DataprocMetastoreFederationStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public void listFederations(com.google.cloud.metastore.v1.ListFederationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFederationsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public void getFederation(com.google.cloud.metastore.v1.GetFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public void createFederation(com.google.cloud.metastore.v1.CreateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public void updateFederation(com.google.cloud.metastore.v1.UpdateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public void deleteFederation(com.google.cloud.metastore.v1.DeleteFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataprocMetastoreFederationBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public com.google.cloud.metastore.v1.ListFederationsResponse listFederations(com.google.cloud.metastore.v1.ListFederationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFederationsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public com.google.cloud.metastore.v1.Federation getFederation(com.google.cloud.metastore.v1.GetFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public com.google.longrunning.Operation createFederation(com.google.cloud.metastore.v1.CreateFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public com.google.longrunning.Operation updateFederation(com.google.cloud.metastore.v1.UpdateFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public com.google.longrunning.Operation deleteFederation(com.google.cloud.metastore.v1.DeleteFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFederationMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataprocMetastoreFederationFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationFutureStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listFederations( + com.google.cloud.metastore.v1.ListFederationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFederationsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getFederation( + com.google.cloud.metastore.v1.GetFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createFederation( + com.google.cloud.metastore.v1.CreateFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateFederation( + com.google.cloud.metastore.v1.UpdateFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteFederation( + com.google.cloud.metastore.v1.DeleteFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_FEDERATIONS = 0; + private static final int METHODID_GET_FEDERATION = 1; + private static final int METHODID_CREATE_FEDERATION = 2; + private static final int METHODID_UPDATE_FEDERATION = 3; + private static final int METHODID_DELETE_FEDERATION = 4; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_FEDERATIONS: + serviceImpl.listFederations((com.google.cloud.metastore.v1.ListFederationsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FEDERATION: + serviceImpl.getFederation((com.google.cloud.metastore.v1.GetFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_FEDERATION: + serviceImpl.createFederation((com.google.cloud.metastore.v1.CreateFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_FEDERATION: + serviceImpl.updateFederation((com.google.cloud.metastore.v1.UpdateFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FEDERATION: + serviceImpl.deleteFederation((com.google.cloud.metastore.v1.DeleteFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListFederationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.ListFederationsRequest, + com.google.cloud.metastore.v1.ListFederationsResponse>( + service, METHODID_LIST_FEDERATIONS))) + .addMethod( + getGetFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.GetFederationRequest, + com.google.cloud.metastore.v1.Federation>( + service, METHODID_GET_FEDERATION))) + .addMethod( + getCreateFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.CreateFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_FEDERATION))) + .addMethod( + getUpdateFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.UpdateFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_FEDERATION))) + .addMethod( + getDeleteFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.DeleteFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_FEDERATION))) + .build(); + } + + private static abstract class DataprocMetastoreFederationBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataprocMetastoreFederationBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataprocMetastoreFederation"); + } + } + + private static final class DataprocMetastoreFederationFileDescriptorSupplier + extends DataprocMetastoreFederationBaseDescriptorSupplier { + DataprocMetastoreFederationFileDescriptorSupplier() {} + } + + private static final class DataprocMetastoreFederationMethodDescriptorSupplier + extends DataprocMetastoreFederationBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataprocMetastoreFederationMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataprocMetastoreFederationFileDescriptorSupplier()) + .addMethod(getListFederationsMethod()) + .addMethod(getGetFederationMethod()) + .addMethod(getCreateFederationMethod()) + .addMethod(getUpdateFederationMethod()) + .addMethod(getDeleteFederationMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreGrpc.java b/owl-bot-staging/java-dataproc-metastore/v1/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreGrpc.java new file mode 100644 index 000000000000..5c762318e0fe --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/grpc-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreGrpc.java @@ -0,0 +1,1609 @@ +package com.google.cloud.metastore.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * 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:
+ * * The service works with a collection of Google Cloud projects, named:
+ * `/projects/*`
+ * * Each project has a collection of available locations, named: `/locations/*`
+ *   (a location must refer to a Google Cloud `region`)
+ * * Each location has a collection of services, named: `/services/*`
+ * * Dataproc Metastore services are resources with names of the form:
+ *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/metastore/v1/metastore.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DataprocMetastoreGrpc { + + private DataprocMetastoreGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.metastore.v1.DataprocMetastore"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListServicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListServices", + requestType = com.google.cloud.metastore.v1.ListServicesRequest.class, + responseType = com.google.cloud.metastore.v1.ListServicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListServicesMethod() { + io.grpc.MethodDescriptor getListServicesMethod; + if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { + DataprocMetastoreGrpc.getListServicesMethod = getListServicesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ListServicesResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListServices")) + .build(); + } + } + } + return getListServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetService", + requestType = com.google.cloud.metastore.v1.GetServiceRequest.class, + responseType = com.google.cloud.metastore.v1.Service.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetServiceMethod() { + io.grpc.MethodDescriptor getGetServiceMethod; + if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { + DataprocMetastoreGrpc.getGetServiceMethod = getGetServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.Service.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetService")) + .build(); + } + } + } + return getGetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateService", + requestType = com.google.cloud.metastore.v1.CreateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateServiceMethod() { + io.grpc.MethodDescriptor getCreateServiceMethod; + if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { + DataprocMetastoreGrpc.getCreateServiceMethod = getCreateServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.CreateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateService")) + .build(); + } + } + } + return getCreateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateService", + requestType = com.google.cloud.metastore.v1.UpdateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateServiceMethod() { + io.grpc.MethodDescriptor getUpdateServiceMethod; + if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { + DataprocMetastoreGrpc.getUpdateServiceMethod = getUpdateServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("UpdateService")) + .build(); + } + } + } + return getUpdateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteService", + requestType = com.google.cloud.metastore.v1.DeleteServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteServiceMethod() { + io.grpc.MethodDescriptor getDeleteServiceMethod; + if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { + DataprocMetastoreGrpc.getDeleteServiceMethod = getDeleteServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("DeleteService")) + .build(); + } + } + } + return getDeleteServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListMetadataImportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMetadataImports", + requestType = com.google.cloud.metastore.v1.ListMetadataImportsRequest.class, + responseType = com.google.cloud.metastore.v1.ListMetadataImportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListMetadataImportsMethod() { + io.grpc.MethodDescriptor getListMetadataImportsMethod; + if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) == null) { + DataprocMetastoreGrpc.getListMetadataImportsMethod = getListMetadataImportsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMetadataImports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ListMetadataImportsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ListMetadataImportsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListMetadataImports")) + .build(); + } + } + } + return getListMetadataImportsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMetadataImport", + requestType = com.google.cloud.metastore.v1.GetMetadataImportRequest.class, + responseType = com.google.cloud.metastore.v1.MetadataImport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetMetadataImportMethod() { + io.grpc.MethodDescriptor getGetMetadataImportMethod; + if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getGetMetadataImportMethod = getGetMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.GetMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetMetadataImport")) + .build(); + } + } + } + return getGetMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMetadataImport", + requestType = com.google.cloud.metastore.v1.CreateMetadataImportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateMetadataImportMethod() { + io.grpc.MethodDescriptor getCreateMetadataImportMethod; + if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getCreateMetadataImportMethod = getCreateMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.CreateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateMetadataImport")) + .build(); + } + } + } + return getCreateMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMetadataImport", + requestType = com.google.cloud.metastore.v1.UpdateMetadataImportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateMetadataImportMethod() { + io.grpc.MethodDescriptor getUpdateMetadataImportMethod; + if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getUpdateMetadataImportMethod = getUpdateMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.UpdateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("UpdateMetadataImport")) + .build(); + } + } + } + return getUpdateMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getExportMetadataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportMetadata", + requestType = com.google.cloud.metastore.v1.ExportMetadataRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExportMetadataMethod() { + io.grpc.MethodDescriptor getExportMetadataMethod; + if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { + DataprocMetastoreGrpc.getExportMetadataMethod = getExportMetadataMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportMetadata")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ExportMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ExportMetadata")) + .build(); + } + } + } + return getExportMetadataMethod; + } + + private static volatile io.grpc.MethodDescriptor getRestoreServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestoreService", + requestType = com.google.cloud.metastore.v1.RestoreServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRestoreServiceMethod() { + io.grpc.MethodDescriptor getRestoreServiceMethod; + if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { + DataprocMetastoreGrpc.getRestoreServiceMethod = getRestoreServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.RestoreServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("RestoreService")) + .build(); + } + } + } + return getRestoreServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListBackupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackups", + requestType = com.google.cloud.metastore.v1.ListBackupsRequest.class, + responseType = com.google.cloud.metastore.v1.ListBackupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListBackupsMethod() { + io.grpc.MethodDescriptor getListBackupsMethod; + if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { + DataprocMetastoreGrpc.getListBackupsMethod = getListBackupsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.ListBackupsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListBackups")) + .build(); + } + } + } + return getListBackupsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackup", + requestType = com.google.cloud.metastore.v1.GetBackupRequest.class, + responseType = com.google.cloud.metastore.v1.Backup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBackupMethod() { + io.grpc.MethodDescriptor getGetBackupMethod; + if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { + DataprocMetastoreGrpc.getGetBackupMethod = getGetBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.Backup.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetBackup")) + .build(); + } + } + } + return getGetBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackup", + requestType = com.google.cloud.metastore.v1.CreateBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateBackupMethod() { + io.grpc.MethodDescriptor getCreateBackupMethod; + if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { + DataprocMetastoreGrpc.getCreateBackupMethod = getCreateBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.CreateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateBackup")) + .build(); + } + } + } + return getCreateBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", + requestType = com.google.cloud.metastore.v1.DeleteBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteBackupMethod() { + io.grpc.MethodDescriptor getDeleteBackupMethod; + if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { + DataprocMetastoreGrpc.getDeleteBackupMethod = getDeleteBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1.DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("DeleteBackup")) + .build(); + } + } + } + return getDeleteBackupMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DataprocMetastoreStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreStub(channel, callOptions); + } + }; + return DataprocMetastoreStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataprocMetastoreBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreBlockingStub(channel, callOptions); + } + }; + return DataprocMetastoreBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DataprocMetastoreFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFutureStub(channel, callOptions); + } + }; + return DataprocMetastoreFutureStub.newStub(factory, channel); + } + + /** + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + default void listServices(com.google.cloud.metastore.v1.ListServicesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + default void getService(com.google.cloud.metastore.v1.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + default void createService(com.google.cloud.metastore.v1.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateServiceMethod(), responseObserver); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + default void updateService(com.google.cloud.metastore.v1.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateServiceMethod(), responseObserver); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + default void deleteService(com.google.cloud.metastore.v1.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteServiceMethod(), responseObserver); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + default void listMetadataImports(com.google.cloud.metastore.v1.ListMetadataImportsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMetadataImportsMethod(), responseObserver); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + default void getMetadataImport(com.google.cloud.metastore.v1.GetMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + default void createMetadataImport(com.google.cloud.metastore.v1.CreateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + default void updateMetadataImport(com.google.cloud.metastore.v1.UpdateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + default void exportMetadata(com.google.cloud.metastore.v1.ExportMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportMetadataMethod(), responseObserver); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + default void restoreService(com.google.cloud.metastore.v1.RestoreServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRestoreServiceMethod(), responseObserver); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + default void listBackups(com.google.cloud.metastore.v1.ListBackupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListBackupsMethod(), responseObserver); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + default void getBackup(com.google.cloud.metastore.v1.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + default void createBackup(com.google.cloud.metastore.v1.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateBackupMethod(), responseObserver); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + default void deleteBackup(com.google.cloud.metastore.v1.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteBackupMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static abstract class DataprocMetastoreImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return DataprocMetastoreGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreStub + extends io.grpc.stub.AbstractAsyncStub { + private DataprocMetastoreStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public void listServices(com.google.cloud.metastore.v1.ListServicesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public void getService(com.google.cloud.metastore.v1.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public void createService(com.google.cloud.metastore.v1.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public void updateService(com.google.cloud.metastore.v1.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public void deleteService(com.google.cloud.metastore.v1.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public void listMetadataImports(com.google.cloud.metastore.v1.ListMetadataImportsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public void getMetadataImport(com.google.cloud.metastore.v1.GetMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public void createMetadataImport(com.google.cloud.metastore.v1.CreateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public void updateMetadataImport(com.google.cloud.metastore.v1.UpdateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public void exportMetadata(com.google.cloud.metastore.v1.ExportMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public void restoreService(com.google.cloud.metastore.v1.RestoreServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public void listBackups(com.google.cloud.metastore.v1.ListBackupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public void getBackup(com.google.cloud.metastore.v1.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public void createBackup(com.google.cloud.metastore.v1.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public void deleteBackup(com.google.cloud.metastore.v1.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataprocMetastoreBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public com.google.cloud.metastore.v1.ListServicesResponse listServices(com.google.cloud.metastore.v1.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public com.google.cloud.metastore.v1.Service getService(com.google.cloud.metastore.v1.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public com.google.longrunning.Operation createService(com.google.cloud.metastore.v1.CreateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public com.google.longrunning.Operation updateService(com.google.cloud.metastore.v1.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public com.google.longrunning.Operation deleteService(com.google.cloud.metastore.v1.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public com.google.cloud.metastore.v1.ListMetadataImportsResponse listMetadataImports(com.google.cloud.metastore.v1.ListMetadataImportsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMetadataImportsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public com.google.cloud.metastore.v1.MetadataImport getMetadataImport(com.google.cloud.metastore.v1.GetMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createMetadataImport(com.google.cloud.metastore.v1.CreateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public com.google.longrunning.Operation updateMetadataImport(com.google.cloud.metastore.v1.UpdateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public com.google.longrunning.Operation exportMetadata(com.google.cloud.metastore.v1.ExportMetadataRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportMetadataMethod(), getCallOptions(), request); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public com.google.longrunning.Operation restoreService(com.google.cloud.metastore.v1.RestoreServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestoreServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public com.google.cloud.metastore.v1.ListBackupsResponse listBackups(com.google.cloud.metastore.v1.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public com.google.cloud.metastore.v1.Backup getBackup(com.google.cloud.metastore.v1.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createBackup(com.google.cloud.metastore.v1.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackup(com.google.cloud.metastore.v1.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataprocMetastoreFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFutureStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listServices( + com.google.cloud.metastore.v1.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getService( + com.google.cloud.metastore.v1.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createService( + com.google.cloud.metastore.v1.CreateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateService( + com.google.cloud.metastore.v1.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteService( + com.google.cloud.metastore.v1.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listMetadataImports( + com.google.cloud.metastore.v1.ListMetadataImportsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getMetadataImport( + com.google.cloud.metastore.v1.GetMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createMetadataImport( + com.google.cloud.metastore.v1.CreateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateMetadataImport( + com.google.cloud.metastore.v1.UpdateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture exportMetadata( + com.google.cloud.metastore.v1.ExportMetadataRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture restoreService( + com.google.cloud.metastore.v1.RestoreServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listBackups( + com.google.cloud.metastore.v1.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBackup( + com.google.cloud.metastore.v1.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createBackup( + com.google.cloud.metastore.v1.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteBackup( + com.google.cloud.metastore.v1.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_SERVICES = 0; + private static final int METHODID_GET_SERVICE = 1; + private static final int METHODID_CREATE_SERVICE = 2; + private static final int METHODID_UPDATE_SERVICE = 3; + private static final int METHODID_DELETE_SERVICE = 4; + private static final int METHODID_LIST_METADATA_IMPORTS = 5; + private static final int METHODID_GET_METADATA_IMPORT = 6; + private static final int METHODID_CREATE_METADATA_IMPORT = 7; + private static final int METHODID_UPDATE_METADATA_IMPORT = 8; + private static final int METHODID_EXPORT_METADATA = 9; + private static final int METHODID_RESTORE_SERVICE = 10; + private static final int METHODID_LIST_BACKUPS = 11; + private static final int METHODID_GET_BACKUP = 12; + private static final int METHODID_CREATE_BACKUP = 13; + private static final int METHODID_DELETE_BACKUP = 14; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_SERVICES: + serviceImpl.listServices((com.google.cloud.metastore.v1.ListServicesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SERVICE: + serviceImpl.getService((com.google.cloud.metastore.v1.GetServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SERVICE: + serviceImpl.createService((com.google.cloud.metastore.v1.CreateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SERVICE: + serviceImpl.updateService((com.google.cloud.metastore.v1.UpdateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SERVICE: + serviceImpl.deleteService((com.google.cloud.metastore.v1.DeleteServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_METADATA_IMPORTS: + serviceImpl.listMetadataImports((com.google.cloud.metastore.v1.ListMetadataImportsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_METADATA_IMPORT: + serviceImpl.getMetadataImport((com.google.cloud.metastore.v1.GetMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_METADATA_IMPORT: + serviceImpl.createMetadataImport((com.google.cloud.metastore.v1.CreateMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_METADATA_IMPORT: + serviceImpl.updateMetadataImport((com.google.cloud.metastore.v1.UpdateMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_METADATA: + serviceImpl.exportMetadata((com.google.cloud.metastore.v1.ExportMetadataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTORE_SERVICE: + serviceImpl.restoreService((com.google.cloud.metastore.v1.RestoreServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_BACKUPS: + serviceImpl.listBackups((com.google.cloud.metastore.v1.ListBackupsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP: + serviceImpl.getBackup((com.google.cloud.metastore.v1.GetBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BACKUP: + serviceImpl.createBackup((com.google.cloud.metastore.v1.CreateBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_BACKUP: + serviceImpl.deleteBackup((com.google.cloud.metastore.v1.DeleteBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListServicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.ListServicesRequest, + com.google.cloud.metastore.v1.ListServicesResponse>( + service, METHODID_LIST_SERVICES))) + .addMethod( + getGetServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.GetServiceRequest, + com.google.cloud.metastore.v1.Service>( + service, METHODID_GET_SERVICE))) + .addMethod( + getCreateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.CreateServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_SERVICE))) + .addMethod( + getUpdateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.UpdateServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_SERVICE))) + .addMethod( + getDeleteServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.DeleteServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_SERVICE))) + .addMethod( + getListMetadataImportsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.ListMetadataImportsRequest, + com.google.cloud.metastore.v1.ListMetadataImportsResponse>( + service, METHODID_LIST_METADATA_IMPORTS))) + .addMethod( + getGetMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.GetMetadataImportRequest, + com.google.cloud.metastore.v1.MetadataImport>( + service, METHODID_GET_METADATA_IMPORT))) + .addMethod( + getCreateMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.CreateMetadataImportRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_METADATA_IMPORT))) + .addMethod( + getUpdateMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.UpdateMetadataImportRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_METADATA_IMPORT))) + .addMethod( + getExportMetadataMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.ExportMetadataRequest, + com.google.longrunning.Operation>( + service, METHODID_EXPORT_METADATA))) + .addMethod( + getRestoreServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.RestoreServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_RESTORE_SERVICE))) + .addMethod( + getListBackupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.ListBackupsRequest, + com.google.cloud.metastore.v1.ListBackupsResponse>( + service, METHODID_LIST_BACKUPS))) + .addMethod( + getGetBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.GetBackupRequest, + com.google.cloud.metastore.v1.Backup>( + service, METHODID_GET_BACKUP))) + .addMethod( + getCreateBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.CreateBackupRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_BACKUP))) + .addMethod( + getDeleteBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.DeleteBackupRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_BACKUP))) + .build(); + } + + private static abstract class DataprocMetastoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataprocMetastoreBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataprocMetastore"); + } + } + + private static final class DataprocMetastoreFileDescriptorSupplier + extends DataprocMetastoreBaseDescriptorSupplier { + DataprocMetastoreFileDescriptorSupplier() {} + } + + private static final class DataprocMetastoreMethodDescriptorSupplier + extends DataprocMetastoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataprocMetastoreMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataprocMetastoreGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataprocMetastoreFileDescriptorSupplier()) + .addMethod(getListServicesMethod()) + .addMethod(getGetServiceMethod()) + .addMethod(getCreateServiceMethod()) + .addMethod(getUpdateServiceMethod()) + .addMethod(getDeleteServiceMethod()) + .addMethod(getListMetadataImportsMethod()) + .addMethod(getGetMetadataImportMethod()) + .addMethod(getCreateMetadataImportMethod()) + .addMethod(getUpdateMetadataImportMethod()) + .addMethod(getExportMetadataMethod()) + .addMethod(getRestoreServiceMethod()) + .addMethod(getListBackupsMethod()) + .addMethod(getGetBackupMethod()) + .addMethod(getCreateBackupMethod()) + .addMethod(getDeleteBackupMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AuxiliaryVersionConfig.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AuxiliaryVersionConfig.java new file mode 100644 index 000000000000..0d8cbca4e753 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AuxiliaryVersionConfig.java @@ -0,0 +1,1195 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Configuration information for the auxiliary service versions.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.AuxiliaryVersionConfig} + */ +public final class AuxiliaryVersionConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.AuxiliaryVersionConfig) + AuxiliaryVersionConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use AuxiliaryVersionConfig.newBuilder() to construct. + private AuxiliaryVersionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuxiliaryVersionConfig() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuxiliaryVersionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.AuxiliaryVersionConfig.class, com.google.cloud.metastore.v1.AuxiliaryVersionConfig.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; + private static final class ConfigOverridesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1.NetworkConfig networkConfig_; + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig() { + return networkConfig_ == null ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() : networkConfig_; + } + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return networkConfig_ == null ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() : networkConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetConfigOverrides(), + ConfigOverridesDefaultEntryHolder.defaultEntry, + 2); + if (networkConfig_ != null) { + output.writeMessage(3, getNetworkConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + for (java.util.Map.Entry entry + : internalGetConfigOverrides().getMap().entrySet()) { + com.google.protobuf.MapEntry + configOverrides__ = ConfigOverridesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, configOverrides__); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNetworkConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.AuxiliaryVersionConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.AuxiliaryVersionConfig other = (com.google.cloud.metastore.v1.AuxiliaryVersionConfig) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetConfigOverrides().equals( + other.internalGetConfigOverrides())) return false; + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig() + .equals(other.getNetworkConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetConfigOverrides().getMap().isEmpty()) { + hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + internalGetConfigOverrides().hashCode(); + } + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.AuxiliaryVersionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration information for the auxiliary service versions.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.AuxiliaryVersionConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.AuxiliaryVersionConfig) + com.google.cloud.metastore.v1.AuxiliaryVersionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.AuxiliaryVersionConfig.class, com.google.cloud.metastore.v1.AuxiliaryVersionConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.AuxiliaryVersionConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + internalGetMutableConfigOverrides().clear(); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AuxiliaryVersionConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.AuxiliaryVersionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AuxiliaryVersionConfig build() { + com.google.cloud.metastore.v1.AuxiliaryVersionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AuxiliaryVersionConfig buildPartial() { + com.google.cloud.metastore.v1.AuxiliaryVersionConfig result = new com.google.cloud.metastore.v1.AuxiliaryVersionConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.AuxiliaryVersionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configOverrides_ = internalGetConfigOverrides(); + result.configOverrides_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.networkConfig_ = networkConfigBuilder_ == null + ? networkConfig_ + : networkConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.AuxiliaryVersionConfig) { + return mergeFrom((com.google.cloud.metastore.v1.AuxiliaryVersionConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.AuxiliaryVersionConfig other) { + if (other == com.google.cloud.metastore.v1.AuxiliaryVersionConfig.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableConfigOverrides().mergeFrom( + other.internalGetConfigOverrides()); + bitField0_ |= 0x00000002; + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + configOverrides__ = input.readMessage( + ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableConfigOverrides().getMutableMap().put( + configOverrides__.getKey(), configOverrides__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getNetworkConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + private com.google.protobuf.MapField + internalGetMutableConfigOverrides() { + if (configOverrides_ == null) { + configOverrides_ = com.google.protobuf.MapField.newMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + if (!configOverrides_.isMutable()) { + configOverrides_ = configOverrides_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearConfigOverrides() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableConfigOverrides().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder removeConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableConfigOverrides().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableConfigOverrides() { + bitField0_ |= 0x00000002; + return internalGetMutableConfigOverrides().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putConfigOverrides( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableConfigOverrides().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putAllConfigOverrides( + java.util.Map values) { + internalGetMutableConfigOverrides().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.cloud.metastore.v1.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig, com.google.cloud.metastore.v1.NetworkConfig.Builder, com.google.cloud.metastore.v1.NetworkConfigOrBuilder> networkConfigBuilder_; + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + public com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setNetworkConfig(com.google.cloud.metastore.v1.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + } else { + networkConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setNetworkConfig( + com.google.cloud.metastore.v1.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeNetworkConfig(com.google.cloud.metastore.v1.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + networkConfig_ != null && + networkConfig_ != com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance()) { + getNetworkConfigBuilder().mergeFrom(value); + } else { + networkConfig_ = value; + } + } else { + networkConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.NetworkConfig.Builder getNetworkConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null ? + com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() : networkConfig_; + } + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig, com.google.cloud.metastore.v1.NetworkConfig.Builder, com.google.cloud.metastore.v1.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig, com.google.cloud.metastore.v1.NetworkConfig.Builder, com.google.cloud.metastore.v1.NetworkConfigOrBuilder>( + getNetworkConfig(), + getParentForChildren(), + isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.AuxiliaryVersionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.AuxiliaryVersionConfig) + private static final com.google.cloud.metastore.v1.AuxiliaryVersionConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.AuxiliaryVersionConfig(); + } + + public static com.google.cloud.metastore.v1.AuxiliaryVersionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuxiliaryVersionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AuxiliaryVersionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AuxiliaryVersionConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AuxiliaryVersionConfigOrBuilder.java new file mode 100644 index 000000000000..85a70cde2298 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AuxiliaryVersionConfigOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface AuxiliaryVersionConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.AuxiliaryVersionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + int getConfigOverridesCount(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + boolean containsConfigOverrides( + java.lang.String key); + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getConfigOverrides(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.util.Map + getConfigOverridesMap(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.lang.String getConfigOverridesOrThrow( + java.lang.String key); + + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig(); + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastore.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastore.java new file mode 100644 index 000000000000..7269ae04323c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastore.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Represents a backend metastore for the federation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.BackendMetastore} + */ +public final class BackendMetastore extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.BackendMetastore) + BackendMetastoreOrBuilder { +private static final long serialVersionUID = 0L; + // Use BackendMetastore.newBuilder() to construct. + private BackendMetastore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BackendMetastore() { + name_ = ""; + metastoreType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BackendMetastore(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_BackendMetastore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.BackendMetastore.class, com.google.cloud.metastore.v1.BackendMetastore.Builder.class); + } + + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.BackendMetastore.MetastoreType} + */ + public enum MetastoreType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The metastore type is not set.
+     * 
+ * + * METASTORE_TYPE_UNSPECIFIED = 0; + */ + METASTORE_TYPE_UNSPECIFIED(0), + /** + *
+     * The backend metastore is Dataproc Metastore.
+     * 
+ * + * DATAPROC_METASTORE = 3; + */ + DATAPROC_METASTORE(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The metastore type is not set.
+     * 
+ * + * METASTORE_TYPE_UNSPECIFIED = 0; + */ + public static final int METASTORE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The backend metastore is Dataproc Metastore.
+     * 
+ * + * DATAPROC_METASTORE = 3; + */ + public static final int DATAPROC_METASTORE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetastoreType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetastoreType forNumber(int value) { + switch (value) { + case 0: return METASTORE_TYPE_UNSPECIFIED; + case 3: return DATAPROC_METASTORE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MetastoreType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetastoreType findValueByNumber(int number) { + return MetastoreType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.BackendMetastore.getDescriptor().getEnumTypes().get(0); + } + + private static final MetastoreType[] VALUES = values(); + + public static MetastoreType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetastoreType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.BackendMetastore.MetastoreType) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METASTORE_TYPE_FIELD_NUMBER = 2; + private int metastoreType_ = 0; + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + @java.lang.Override public int getMetastoreTypeValue() { + return metastoreType_; + } + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + @java.lang.Override public com.google.cloud.metastore.v1.BackendMetastore.MetastoreType getMetastoreType() { + com.google.cloud.metastore.v1.BackendMetastore.MetastoreType result = com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.forNumber(metastoreType_); + return result == null ? com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (metastoreType_ != com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.METASTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, metastoreType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (metastoreType_ != com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.METASTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, metastoreType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.BackendMetastore)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.BackendMetastore other = (com.google.cloud.metastore.v1.BackendMetastore) obj; + + if (!getName() + .equals(other.getName())) return false; + if (metastoreType_ != other.metastoreType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + METASTORE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + metastoreType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.BackendMetastore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.BackendMetastore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a backend metastore for the federation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.BackendMetastore} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.BackendMetastore) + com.google.cloud.metastore.v1.BackendMetastoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_BackendMetastore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.BackendMetastore.class, com.google.cloud.metastore.v1.BackendMetastore.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.BackendMetastore.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + metastoreType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.BackendMetastore getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.BackendMetastore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.BackendMetastore build() { + com.google.cloud.metastore.v1.BackendMetastore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.BackendMetastore buildPartial() { + com.google.cloud.metastore.v1.BackendMetastore result = new com.google.cloud.metastore.v1.BackendMetastore(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.BackendMetastore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metastoreType_ = metastoreType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.BackendMetastore) { + return mergeFrom((com.google.cloud.metastore.v1.BackendMetastore)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.BackendMetastore other) { + if (other == com.google.cloud.metastore.v1.BackendMetastore.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.metastoreType_ != 0) { + setMetastoreTypeValue(other.getMetastoreTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + metastoreType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int metastoreType_ = 0; + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + @java.lang.Override public int getMetastoreTypeValue() { + return metastoreType_; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @param value The enum numeric value on the wire for metastoreType to set. + * @return This builder for chaining. + */ + public Builder setMetastoreTypeValue(int value) { + metastoreType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.BackendMetastore.MetastoreType getMetastoreType() { + com.google.cloud.metastore.v1.BackendMetastore.MetastoreType result = com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.forNumber(metastoreType_); + return result == null ? com.google.cloud.metastore.v1.BackendMetastore.MetastoreType.UNRECOGNIZED : result; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @param value The metastoreType to set. + * @return This builder for chaining. + */ + public Builder setMetastoreType(com.google.cloud.metastore.v1.BackendMetastore.MetastoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + metastoreType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @return This builder for chaining. + */ + public Builder clearMetastoreType() { + bitField0_ = (bitField0_ & ~0x00000002); + metastoreType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.BackendMetastore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.BackendMetastore) + private static final com.google.cloud.metastore.v1.BackendMetastore DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.BackendMetastore(); + } + + public static com.google.cloud.metastore.v1.BackendMetastore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackendMetastore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.BackendMetastore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastoreOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastoreOrBuilder.java new file mode 100644 index 000000000000..36384937b10b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackendMetastoreOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public interface BackendMetastoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.BackendMetastore) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + int getMetastoreTypeValue(); + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + com.google.cloud.metastore.v1.BackendMetastore.MetastoreType getMetastoreType(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Backup.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Backup.java new file mode 100644 index 000000000000..aff5368bd5ed --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Backup.java @@ -0,0 +1,1993 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * The details of a backup resource.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Backup} + */ +public final class Backup extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Backup) + BackupOrBuilder { +private static final long serialVersionUID = 0L; + // Use Backup.newBuilder() to construct. + private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Backup() { + name_ = ""; + state_ = 0; + description_ = ""; + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Backup(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Backup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Backup.class, com.google.cloud.metastore.v1.Backup.Builder.class); + } + + /** + *
+   * The current state of the backup.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.Backup.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the backup is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The backup is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The backup is being deleted.
+     * 
+ * + * DELETING = 2; + */ + DELETING(2), + /** + *
+     * The backup is active and ready to use.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + *
+     * The backup failed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + *
+     * The backup is being restored.
+     * 
+ * + * RESTORING = 5; + */ + RESTORING(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the backup is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The backup is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The backup is being deleted.
+     * 
+ * + * DELETING = 2; + */ + public static final int DELETING_VALUE = 2; + /** + *
+     * The backup is active and ready to use.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + *
+     * The backup failed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + *
+     * The backup is being restored.
+     * 
+ * + * RESTORING = 5; + */ + public static final int RESTORING_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return DELETING; + case 3: return ACTIVE; + case 4: return FAILED; + case 5: return RESTORING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.Backup.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Backup.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Backup.State getState() { + com.google.cloud.metastore.v1.Backup.State result = com.google.cloud.metastore.v1.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.Backup.State.UNRECOGNIZED : result; + } + + public static final int SERVICE_REVISION_FIELD_NUMBER = 5; + private com.google.cloud.metastore.v1.Service serviceRevision_; + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + @java.lang.Override + public boolean hasServiceRevision() { + return serviceRevision_ != null; + } + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Service getServiceRevision() { + return serviceRevision_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : serviceRevision_; + } + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder() { + return serviceRevision_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : serviceRevision_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESTORING_SERVICES_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList restoringServices_; + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + public com.google.protobuf.ProtocolStringList + getRestoringServicesList() { + return restoringServices_; + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + public int getRestoringServicesCount() { + return restoringServices_.size(); + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + public java.lang.String getRestoringServices(int index) { + return restoringServices_.get(index); + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + public com.google.protobuf.ByteString + getRestoringServicesBytes(int index) { + return restoringServices_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (serviceRevision_ != null) { + output.writeMessage(5, getServiceRevision()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + for (int i = 0; i < restoringServices_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, restoringServices_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, state_); + } + if (serviceRevision_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getServiceRevision()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + { + int dataSize = 0; + for (int i = 0; i < restoringServices_.size(); i++) { + dataSize += computeStringSizeNoTag(restoringServices_.getRaw(i)); + } + size += dataSize; + size += 1 * getRestoringServicesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.Backup)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.Backup other = (com.google.cloud.metastore.v1.Backup) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (hasServiceRevision() != other.hasServiceRevision()) return false; + if (hasServiceRevision()) { + if (!getServiceRevision() + .equals(other.getServiceRevision())) return false; + } + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getRestoringServicesList() + .equals(other.getRestoringServicesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasServiceRevision()) { + hash = (37 * hash) + SERVICE_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getServiceRevision().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getRestoringServicesCount() > 0) { + hash = (37 * hash) + RESTORING_SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getRestoringServicesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.Backup parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Backup parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Backup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Backup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Backup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Backup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Backup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Backup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Backup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Backup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Backup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Backup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.Backup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a backup resource.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Backup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Backup) + com.google.cloud.metastore.v1.BackupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Backup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Backup.class, com.google.cloud.metastore.v1.Backup.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.Backup.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + serviceRevision_ = null; + if (serviceRevisionBuilder_ != null) { + serviceRevisionBuilder_.dispose(); + serviceRevisionBuilder_ = null; + } + description_ = ""; + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Backup_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Backup getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.Backup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Backup build() { + com.google.cloud.metastore.v1.Backup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Backup buildPartial() { + com.google.cloud.metastore.v1.Backup result = new com.google.cloud.metastore.v1.Backup(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.Backup result) { + if (((bitField0_ & 0x00000040) != 0)) { + restoringServices_ = restoringServices_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.restoringServices_ = restoringServices_; + } + + private void buildPartial0(com.google.cloud.metastore.v1.Backup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.serviceRevision_ = serviceRevisionBuilder_ == null + ? serviceRevision_ + : serviceRevisionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.Backup) { + return mergeFrom((com.google.cloud.metastore.v1.Backup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.Backup other) { + if (other == com.google.cloud.metastore.v1.Backup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasServiceRevision()) { + mergeServiceRevision(other.getServiceRevision()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.restoringServices_.isEmpty()) { + if (restoringServices_.isEmpty()) { + restoringServices_ = other.restoringServices_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureRestoringServicesIsMutable(); + restoringServices_.addAll(other.restoringServices_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getServiceRevisionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureRestoringServicesIsMutable(); + restoringServices_.add(s); + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Backup.State getState() { + com.google.cloud.metastore.v1.Backup.State result = com.google.cloud.metastore.v1.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.Backup.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1.Backup.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.Service serviceRevision_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder> serviceRevisionBuilder_; + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + public boolean hasServiceRevision() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + public com.google.cloud.metastore.v1.Service getServiceRevision() { + if (serviceRevisionBuilder_ == null) { + return serviceRevision_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : serviceRevision_; + } else { + return serviceRevisionBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setServiceRevision(com.google.cloud.metastore.v1.Service value) { + if (serviceRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceRevision_ = value; + } else { + serviceRevisionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setServiceRevision( + com.google.cloud.metastore.v1.Service.Builder builderForValue) { + if (serviceRevisionBuilder_ == null) { + serviceRevision_ = builderForValue.build(); + } else { + serviceRevisionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeServiceRevision(com.google.cloud.metastore.v1.Service value) { + if (serviceRevisionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + serviceRevision_ != null && + serviceRevision_ != com.google.cloud.metastore.v1.Service.getDefaultInstance()) { + getServiceRevisionBuilder().mergeFrom(value); + } else { + serviceRevision_ = value; + } + } else { + serviceRevisionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearServiceRevision() { + bitField0_ = (bitField0_ & ~0x00000010); + serviceRevision_ = null; + if (serviceRevisionBuilder_ != null) { + serviceRevisionBuilder_.dispose(); + serviceRevisionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.Service.Builder getServiceRevisionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getServiceRevisionFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder() { + if (serviceRevisionBuilder_ != null) { + return serviceRevisionBuilder_.getMessageOrBuilder(); + } else { + return serviceRevision_ == null ? + com.google.cloud.metastore.v1.Service.getDefaultInstance() : serviceRevision_; + } + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder> + getServiceRevisionFieldBuilder() { + if (serviceRevisionBuilder_ == null) { + serviceRevisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder>( + getServiceRevision(), + getParentForChildren(), + isClean()); + serviceRevision_ = null; + } + return serviceRevisionBuilder_; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRestoringServicesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + restoringServices_ = new com.google.protobuf.LazyStringArrayList(restoringServices_); + bitField0_ |= 0x00000040; + } + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + public com.google.protobuf.ProtocolStringList + getRestoringServicesList() { + return restoringServices_.getUnmodifiableView(); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + public int getRestoringServicesCount() { + return restoringServices_.size(); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + public java.lang.String getRestoringServices(int index) { + return restoringServices_.get(index); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + public com.google.protobuf.ByteString + getRestoringServicesBytes(int index) { + return restoringServices_.getByteString(index); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index to set the value at. + * @param value The restoringServices to set. + * @return This builder for chaining. + */ + public Builder setRestoringServices( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRestoringServicesIsMutable(); + restoringServices_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The restoringServices to add. + * @return This builder for chaining. + */ + public Builder addRestoringServices( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRestoringServicesIsMutable(); + restoringServices_.add(value); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param values The restoringServices to add. + * @return This builder for chaining. + */ + public Builder addAllRestoringServices( + java.lang.Iterable values) { + ensureRestoringServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, restoringServices_); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearRestoringServices() { + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes of the restoringServices to add. + * @return This builder for chaining. + */ + public Builder addRestoringServicesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureRestoringServicesIsMutable(); + restoringServices_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Backup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Backup) + private static final com.google.cloud.metastore.v1.Backup DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Backup(); + } + + public static com.google.cloud.metastore.v1.Backup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Backup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Backup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupName.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupName.java rename to owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupOrBuilder.java new file mode 100644 index 000000000000..5ee71239ae36 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/BackupOrBuilder.java @@ -0,0 +1,192 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface BackupOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Backup) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1.Backup.State getState(); + + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + boolean hasServiceRevision(); + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + com.google.cloud.metastore.v1.Service getServiceRevision(); + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1.ServiceOrBuilder getServiceRevisionOrBuilder(); + + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + java.util.List + getRestoringServicesList(); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + int getRestoringServicesCount(); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + java.lang.String getRestoringServices(int index); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + com.google.protobuf.ByteString + getRestoringServicesBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java new file mode 100644 index 000000000000..29ece60170d0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequest.java @@ -0,0 +1,1256 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.CreateBackupRequest} + */ +public final class CreateBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateBackupRequest) + CreateBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateBackupRequest.newBuilder() to construct. + private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateBackupRequest() { + parent_ = ""; + backupId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.CreateBackupRequest.class, com.google.cloud.metastore.v1.CreateBackupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1.Backup 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.
+   * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return backup_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Backup getBackup() { + return backup_ == null ? com.google.cloud.metastore.v1.Backup.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder() { + return backup_ == null ? com.google.cloud.metastore.v1.Backup.getDefaultInstance() : backup_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); + } + if (backup_ != null) { + output.writeMessage(3, getBackup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); + } + if (backup_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBackup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.CreateBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.CreateBackupRequest other = (com.google.cloud.metastore.v1.CreateBackupRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getBackupId() + .equals(other.getBackupId())) return false; + if (hasBackup() != other.hasBackup()) return false; + if (hasBackup()) { + if (!getBackup() + .equals(other.getBackup())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + if (hasBackup()) { + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.CreateBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.CreateBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.CreateBackupRequest) + com.google.cloud.metastore.v1.CreateBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.CreateBackupRequest.class, com.google.cloud.metastore.v1.CreateBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.CreateBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupId_ = ""; + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.CreateBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateBackupRequest build() { + com.google.cloud.metastore.v1.CreateBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateBackupRequest buildPartial() { + com.google.cloud.metastore.v1.CreateBackupRequest result = new com.google.cloud.metastore.v1.CreateBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.CreateBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupId_ = backupId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backup_ = backupBuilder_ == null + ? backup_ + : backupBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.CreateBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1.CreateBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.CreateBackupRequest other) { + if (other == com.google.cloud.metastore.v1.CreateBackupRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBackup()) { + mergeBackup(other.getBackup()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + backupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBackupFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString + getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.Backup backup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Backup, com.google.cloud.metastore.v1.Backup.Builder, com.google.cloud.metastore.v1.BackupOrBuilder> backupBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + public boolean hasBackup() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + public com.google.cloud.metastore.v1.Backup getBackup() { + if (backupBuilder_ == null) { + return backup_ == null ? com.google.cloud.metastore.v1.Backup.getDefaultInstance() : backup_; + } else { + return backupBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setBackup(com.google.cloud.metastore.v1.Backup value) { + if (backupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backup_ = value; + } else { + backupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setBackup( + com.google.cloud.metastore.v1.Backup.Builder builderForValue) { + if (backupBuilder_ == null) { + backup_ = builderForValue.build(); + } else { + backupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeBackup(com.google.cloud.metastore.v1.Backup value) { + if (backupBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + backup_ != null && + backup_ != com.google.cloud.metastore.v1.Backup.getDefaultInstance()) { + getBackupBuilder().mergeFrom(value); + } else { + backup_ = value; + } + } else { + backupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearBackup() { + bitField0_ = (bitField0_ & ~0x00000004); + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.Backup.Builder getBackupBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBackupFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder() { + if (backupBuilder_ != null) { + return backupBuilder_.getMessageOrBuilder(); + } else { + return backup_ == null ? + com.google.cloud.metastore.v1.Backup.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Backup, com.google.cloud.metastore.v1.Backup.Builder, com.google.cloud.metastore.v1.BackupOrBuilder> + getBackupFieldBuilder() { + if (backupBuilder_ == null) { + backupBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Backup, com.google.cloud.metastore.v1.Backup.Builder, com.google.cloud.metastore.v1.BackupOrBuilder>( + getBackup(), + getParentForChildren(), + isClean()); + backup_ = null; + } + return backupBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateBackupRequest) + private static final com.google.cloud.metastore.v1.CreateBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateBackupRequest(); + } + + public static com.google.cloud.metastore.v1.CreateBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequestOrBuilder.java new file mode 100644 index 000000000000..190a5c642bc3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateBackupRequestOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface CreateBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.CreateBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString + getBackupIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + boolean hasBackup(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + com.google.cloud.metastore.v1.Backup getBackup(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1.BackupOrBuilder getBackupOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequest.java new file mode 100644 index 000000000000..10500c67125a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequest.java @@ -0,0 +1,1266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for CreateFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.CreateFederationRequest} + */ +public final class CreateFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateFederationRequest) + CreateFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateFederationRequest.newBuilder() to construct. + private CreateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateFederationRequest() { + parent_ = ""; + federationId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_CreateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.CreateFederationRequest.class, com.google.cloud.metastore.v1.CreateFederationRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEDERATION_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + @java.lang.Override + public java.lang.String getFederationId() { + java.lang.Object ref = federationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + federationId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFederationIdBytes() { + java.lang.Object ref = federationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + federationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEDERATION_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1.Federation 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.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + @java.lang.Override + public boolean hasFederation() { + return federation_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Federation getFederation() { + return federation_ == null ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder() { + return federation_ == null ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() : federation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, federationId_); + } + if (federation_ != null) { + output.writeMessage(3, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, federationId_); + } + if (federation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.CreateFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.CreateFederationRequest other = (com.google.cloud.metastore.v1.CreateFederationRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFederationId() + .equals(other.getFederationId())) return false; + if (hasFederation() != other.hasFederation()) return false; + if (hasFederation()) { + if (!getFederation() + .equals(other.getFederation())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FEDERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getFederationId().hashCode(); + if (hasFederation()) { + hash = (37 * hash) + FEDERATION_FIELD_NUMBER; + hash = (53 * hash) + getFederation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.CreateFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.CreateFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.CreateFederationRequest) + com.google.cloud.metastore.v1.CreateFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_CreateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.CreateFederationRequest.class, com.google.cloud.metastore.v1.CreateFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.CreateFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + federationId_ = ""; + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.CreateFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateFederationRequest build() { + com.google.cloud.metastore.v1.CreateFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateFederationRequest buildPartial() { + com.google.cloud.metastore.v1.CreateFederationRequest result = new com.google.cloud.metastore.v1.CreateFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.CreateFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.federationId_ = federationId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.federation_ = federationBuilder_ == null + ? federation_ + : federationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.CreateFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1.CreateFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.CreateFederationRequest other) { + if (other == com.google.cloud.metastore.v1.CreateFederationRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFederationId().isEmpty()) { + federationId_ = other.federationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasFederation()) { + mergeFederation(other.getFederation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + federationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getFederationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + public java.lang.String getFederationId() { + java.lang.Object ref = federationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + federationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + public com.google.protobuf.ByteString + getFederationIdBytes() { + java.lang.Object ref = federationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + federationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The federationId to set. + * @return This builder for chaining. + */ + public Builder setFederationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + federationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearFederationId() { + federationId_ = getDefaultInstance().getFederationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for federationId to set. + * @return This builder for chaining. + */ + public Builder setFederationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + federationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.Federation federation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder> federationBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + public boolean hasFederation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + public com.google.cloud.metastore.v1.Federation getFederation() { + if (federationBuilder_ == null) { + return federation_ == null ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() : federation_; + } else { + return federationBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation(com.google.cloud.metastore.v1.Federation value) { + if (federationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + federation_ = value; + } else { + federationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation( + com.google.cloud.metastore.v1.Federation.Builder builderForValue) { + if (federationBuilder_ == null) { + federation_ = builderForValue.build(); + } else { + federationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFederation(com.google.cloud.metastore.v1.Federation value) { + if (federationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + federation_ != null && + federation_ != com.google.cloud.metastore.v1.Federation.getDefaultInstance()) { + getFederationBuilder().mergeFrom(value); + } else { + federation_ = value; + } + } else { + federationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFederation() { + bitField0_ = (bitField0_ & ~0x00000004); + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.Federation.Builder getFederationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFederationFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder() { + if (federationBuilder_ != null) { + return federationBuilder_.getMessageOrBuilder(); + } else { + return federation_ == null ? + com.google.cloud.metastore.v1.Federation.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder> + getFederationFieldBuilder() { + if (federationBuilder_ == null) { + federationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder>( + getFederation(), + getParentForChildren(), + isClean()); + federation_ = null; + } + return federationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateFederationRequest) + private static final com.google.cloud.metastore.v1.CreateFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateFederationRequest(); + } + + public static com.google.cloud.metastore.v1.CreateFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequestOrBuilder.java new file mode 100644 index 000000000000..2462e667ad6e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateFederationRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public interface CreateFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.CreateFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + java.lang.String getFederationId(); + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + com.google.protobuf.ByteString + getFederationIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + boolean hasFederation(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + com.google.cloud.metastore.v1.Federation getFederation(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequest.java new file mode 100644 index 000000000000..2dddb558396a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequest.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.CreateMetadataImportRequest} + */ +public final class CreateMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateMetadataImportRequest) + CreateMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateMetadataImportRequest.newBuilder() to construct. + private CreateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateMetadataImportRequest() { + parent_ = ""; + metadataImportId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.CreateMetadataImportRequest.class, com.google.cloud.metastore.v1.CreateMetadataImportRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_IMPORT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + @java.lang.Override + public java.lang.String getMetadataImportId() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataImportId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataImportIdBytes() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataImportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_IMPORT_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1.MetadataImport 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.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + @java.lang.Override + public boolean hasMetadataImport() { + return metadataImport_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport getMetadataImport() { + return metadataImport_ == null ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder() { + return metadataImport_ == null ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() : metadataImport_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metadataImportId_); + } + if (metadataImport_ != null) { + output.writeMessage(3, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metadataImportId_); + } + if (metadataImport_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.CreateMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.CreateMetadataImportRequest other = (com.google.cloud.metastore.v1.CreateMetadataImportRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getMetadataImportId() + .equals(other.getMetadataImportId())) return false; + if (hasMetadataImport() != other.hasMetadataImport()) return false; + if (hasMetadataImport()) { + if (!getMetadataImport() + .equals(other.getMetadataImport())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + METADATA_IMPORT_ID_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImportId().hashCode(); + if (hasMetadataImport()) { + hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImport().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.CreateMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.CreateMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.CreateMetadataImportRequest) + com.google.cloud.metastore.v1.CreateMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.CreateMetadataImportRequest.class, com.google.cloud.metastore.v1.CreateMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.CreateMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + metadataImportId_ = ""; + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.CreateMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateMetadataImportRequest build() { + com.google.cloud.metastore.v1.CreateMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1.CreateMetadataImportRequest result = new com.google.cloud.metastore.v1.CreateMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.CreateMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataImportId_ = metadataImportId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadataImport_ = metadataImportBuilder_ == null + ? metadataImport_ + : metadataImportBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.CreateMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1.CreateMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.CreateMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1.CreateMetadataImportRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMetadataImportId().isEmpty()) { + metadataImportId_ = other.metadataImportId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasMetadataImport()) { + mergeMetadataImport(other.getMetadataImport()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + metadataImportId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getMetadataImportFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + public java.lang.String getMetadataImportId() { + java.lang.Object ref = metadataImportId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataImportId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + public com.google.protobuf.ByteString + getMetadataImportIdBytes() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataImportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The metadataImportId to set. + * @return This builder for chaining. + */ + public Builder setMetadataImportId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataImportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearMetadataImportId() { + metadataImportId_ = getDefaultInstance().getMetadataImportId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for metadataImportId to set. + * @return This builder for chaining. + */ + public Builder setMetadataImportIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataImportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.MetadataImport metadataImport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder> metadataImportBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + public boolean hasMetadataImport() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + public com.google.cloud.metastore.v1.MetadataImport getMetadataImport() { + if (metadataImportBuilder_ == null) { + return metadataImport_ == null ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() : metadataImport_; + } else { + return metadataImportBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport(com.google.cloud.metastore.v1.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataImport_ = value; + } else { + metadataImportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport( + com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { + if (metadataImportBuilder_ == null) { + metadataImport_ = builderForValue.build(); + } else { + metadataImportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeMetadataImport(com.google.cloud.metastore.v1.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadataImport_ != null && + metadataImport_ != com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()) { + getMetadataImportBuilder().mergeFrom(value); + } else { + metadataImport_ = value; + } + } else { + metadataImportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearMetadataImport() { + bitField0_ = (bitField0_ & ~0x00000004); + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.MetadataImport.Builder getMetadataImportBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataImportFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder() { + if (metadataImportBuilder_ != null) { + return metadataImportBuilder_.getMessageOrBuilder(); + } else { + return metadataImport_ == null ? + com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder> + getMetadataImportFieldBuilder() { + if (metadataImportBuilder_ == null) { + metadataImportBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder>( + getMetadataImport(), + getParentForChildren(), + isClean()); + metadataImport_ = null; + } + return metadataImportBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateMetadataImportRequest) + private static final com.google.cloud.metastore.v1.CreateMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1.CreateMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..80e5f9bd6202 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateMetadataImportRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface CreateMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.CreateMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + java.lang.String getMetadataImportId(); + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + com.google.protobuf.ByteString + getMetadataImportIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + boolean hasMetadataImport(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + com.google.cloud.metastore.v1.MetadataImport getMetadataImport(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequest.java new file mode 100644 index 000000000000..7e2b22df59b8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequest.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.CreateServiceRequest} + */ +public final class CreateServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.CreateServiceRequest) + CreateServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateServiceRequest.newBuilder() to construct. + private CreateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateServiceRequest() { + parent_ = ""; + serviceId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.CreateServiceRequest.class, com.google.cloud.metastore.v1.CreateServiceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + @java.lang.Override + public java.lang.String getServiceId() { + java.lang.Object ref = serviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceIdBytes() { + java.lang.Object ref = serviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1.Service 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.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Service getService() { + return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder() { + return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceId_); + } + if (service_ != null) { + output.writeMessage(3, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceId_); + } + if (service_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.CreateServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.CreateServiceRequest other = (com.google.cloud.metastore.v1.CreateServiceRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getServiceId() + .equals(other.getServiceId())) return false; + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService() + .equals(other.getService())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.CreateServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.CreateServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.CreateServiceRequest) + com.google.cloud.metastore.v1.CreateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.CreateServiceRequest.class, com.google.cloud.metastore.v1.CreateServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.CreateServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + serviceId_ = ""; + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.CreateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateServiceRequest build() { + com.google.cloud.metastore.v1.CreateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateServiceRequest buildPartial() { + com.google.cloud.metastore.v1.CreateServiceRequest result = new com.google.cloud.metastore.v1.CreateServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.CreateServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceId_ = serviceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.service_ = serviceBuilder_ == null + ? service_ + : serviceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.CreateServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1.CreateServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.CreateServiceRequest other) { + if (other == com.google.cloud.metastore.v1.CreateServiceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getServiceId().isEmpty()) { + serviceId_ = other.serviceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + serviceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getServiceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + public java.lang.String getServiceId() { + java.lang.Object ref = serviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + public com.google.protobuf.ByteString + getServiceIdBytes() { + java.lang.Object ref = serviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The serviceId to set. + * @return This builder for chaining. + */ + public Builder setServiceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + serviceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearServiceId() { + serviceId_ = getDefaultInstance().getServiceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for serviceId to set. + * @return This builder for chaining. + */ + public Builder setServiceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + serviceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.Service service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder> serviceBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + public boolean hasService() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + public com.google.cloud.metastore.v1.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService(com.google.cloud.metastore.v1.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + } else { + serviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService( + com.google.cloud.metastore.v1.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeService(com.google.cloud.metastore.v1.Service value) { + if (serviceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + service_ != null && + service_ != com.google.cloud.metastore.v1.Service.getDefaultInstance()) { + getServiceBuilder().mergeFrom(value); + } else { + service_ = value; + } + } else { + serviceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000004); + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.Service.Builder getServiceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null ? + com.google.cloud.metastore.v1.Service.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder>( + getService(), + getParentForChildren(), + isClean()); + service_ = null; + } + return serviceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.CreateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.CreateServiceRequest) + private static final com.google.cloud.metastore.v1.CreateServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.CreateServiceRequest(); + } + + public static com.google.cloud.metastore.v1.CreateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.CreateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequestOrBuilder.java new file mode 100644 index 000000000000..ec943f4344b2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/CreateServiceRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface CreateServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.CreateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + java.lang.String getServiceId(); + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + com.google.protobuf.ByteString + getServiceIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + boolean hasService(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + com.google.cloud.metastore.v1.Service getService(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java new file mode 100644 index 000000000000..ce53faac1904 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpec.java @@ -0,0 +1,554 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * The specification of database dump to import from or export to.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.DatabaseDumpSpec} + */ +public final class DatabaseDumpSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DatabaseDumpSpec) + DatabaseDumpSpecOrBuilder { +private static final long serialVersionUID = 0L; + // Use DatabaseDumpSpec.newBuilder() to construct. + private DatabaseDumpSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DatabaseDumpSpec() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DatabaseDumpSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.DatabaseDumpSpec.class, com.google.cloud.metastore.v1.DatabaseDumpSpec.Builder.class); + } + + /** + *
+   * The type of the database dump.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.DatabaseDumpSpec.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The type of the database dump is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Database dump is a MySQL dump file.
+     * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + /** + *
+     * Database dump contains Avro files.
+     * 
+ * + * AVRO = 2; + */ + AVRO(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The type of the database dump is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Database dump is a MySQL dump file.
+     * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + /** + *
+     * Database dump contains Avro files.
+     * 
+ * + * AVRO = 2; + */ + public static final int AVRO_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return MYSQL; + case 2: return AVRO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.DatabaseDumpSpec.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.DatabaseDumpSpec.Type) + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.DatabaseDumpSpec)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.DatabaseDumpSpec other = (com.google.cloud.metastore.v1.DatabaseDumpSpec) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DatabaseDumpSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.DatabaseDumpSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The specification of database dump to import from or export to.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.DatabaseDumpSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.DatabaseDumpSpec) + com.google.cloud.metastore.v1.DatabaseDumpSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.DatabaseDumpSpec.class, com.google.cloud.metastore.v1.DatabaseDumpSpec.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.DatabaseDumpSpec.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DatabaseDumpSpec getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.DatabaseDumpSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DatabaseDumpSpec build() { + com.google.cloud.metastore.v1.DatabaseDumpSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DatabaseDumpSpec buildPartial() { + com.google.cloud.metastore.v1.DatabaseDumpSpec result = new com.google.cloud.metastore.v1.DatabaseDumpSpec(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.DatabaseDumpSpec) { + return mergeFrom((com.google.cloud.metastore.v1.DatabaseDumpSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.DatabaseDumpSpec other) { + if (other == com.google.cloud.metastore.v1.DatabaseDumpSpec.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DatabaseDumpSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DatabaseDumpSpec) + private static final com.google.cloud.metastore.v1.DatabaseDumpSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DatabaseDumpSpec(); + } + + public static com.google.cloud.metastore.v1.DatabaseDumpSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseDumpSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DatabaseDumpSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpecOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpecOrBuilder.java new file mode 100644 index 000000000000..0ce0e6cf17ac --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DatabaseDumpSpecOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface DatabaseDumpSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.DatabaseDumpSpec) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java new file mode 100644 index 000000000000..dc734108d284 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequest.java @@ -0,0 +1,823 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.DeleteBackupRequest} + */ +public final class DeleteBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DeleteBackupRequest) + DeleteBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteBackupRequest.newBuilder() to construct. + private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteBackupRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.DeleteBackupRequest.class, com.google.cloud.metastore.v1.DeleteBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.DeleteBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.DeleteBackupRequest other = (com.google.cloud.metastore.v1.DeleteBackupRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.DeleteBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.DeleteBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.DeleteBackupRequest) + com.google.cloud.metastore.v1.DeleteBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.DeleteBackupRequest.class, com.google.cloud.metastore.v1.DeleteBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.DeleteBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.DeleteBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteBackupRequest build() { + com.google.cloud.metastore.v1.DeleteBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteBackupRequest buildPartial() { + com.google.cloud.metastore.v1.DeleteBackupRequest result = new com.google.cloud.metastore.v1.DeleteBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.DeleteBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.DeleteBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1.DeleteBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.DeleteBackupRequest other) { + if (other == com.google.cloud.metastore.v1.DeleteBackupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DeleteBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DeleteBackupRequest) + private static final com.google.cloud.metastore.v1.DeleteBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DeleteBackupRequest(); + } + + public static com.google.cloud.metastore.v1.DeleteBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequestOrBuilder.java new file mode 100644 index 000000000000..d7c43e9bedb6 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteBackupRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface DeleteBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.DeleteBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequest.java new file mode 100644 index 000000000000..e910fbc4329c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequest.java @@ -0,0 +1,821 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for DeleteFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.DeleteFederationRequest} + */ +public final class DeleteFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DeleteFederationRequest) + DeleteFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteFederationRequest.newBuilder() to construct. + private DeleteFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteFederationRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_DeleteFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.DeleteFederationRequest.class, com.google.cloud.metastore.v1.DeleteFederationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.DeleteFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.DeleteFederationRequest other = (com.google.cloud.metastore.v1.DeleteFederationRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.DeleteFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.DeleteFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.DeleteFederationRequest) + com.google.cloud.metastore.v1.DeleteFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_DeleteFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.DeleteFederationRequest.class, com.google.cloud.metastore.v1.DeleteFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.DeleteFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.DeleteFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteFederationRequest build() { + com.google.cloud.metastore.v1.DeleteFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteFederationRequest buildPartial() { + com.google.cloud.metastore.v1.DeleteFederationRequest result = new com.google.cloud.metastore.v1.DeleteFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.DeleteFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.DeleteFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1.DeleteFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.DeleteFederationRequest other) { + if (other == com.google.cloud.metastore.v1.DeleteFederationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DeleteFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DeleteFederationRequest) + private static final com.google.cloud.metastore.v1.DeleteFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DeleteFederationRequest(); + } + + public static com.google.cloud.metastore.v1.DeleteFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequestOrBuilder.java new file mode 100644 index 000000000000..33d6982f98b5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteFederationRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public interface DeleteFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.DeleteFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequest.java new file mode 100644 index 000000000000..b13d5b5ef75f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequest.java @@ -0,0 +1,823 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.DeleteServiceRequest} + */ +public final class DeleteServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.DeleteServiceRequest) + DeleteServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteServiceRequest.newBuilder() to construct. + private DeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteServiceRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.DeleteServiceRequest.class, com.google.cloud.metastore.v1.DeleteServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.DeleteServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.DeleteServiceRequest other = (com.google.cloud.metastore.v1.DeleteServiceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.DeleteServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.DeleteServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.DeleteServiceRequest) + com.google.cloud.metastore.v1.DeleteServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.DeleteServiceRequest.class, com.google.cloud.metastore.v1.DeleteServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.DeleteServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.DeleteServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteServiceRequest build() { + com.google.cloud.metastore.v1.DeleteServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteServiceRequest buildPartial() { + com.google.cloud.metastore.v1.DeleteServiceRequest result = new com.google.cloud.metastore.v1.DeleteServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.DeleteServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.DeleteServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1.DeleteServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.DeleteServiceRequest other) { + if (other == com.google.cloud.metastore.v1.DeleteServiceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.DeleteServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.DeleteServiceRequest) + private static final com.google.cloud.metastore.v1.DeleteServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.DeleteServiceRequest(); + } + + public static com.google.cloud.metastore.v1.DeleteServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.DeleteServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequestOrBuilder.java new file mode 100644 index 000000000000..a35e3094a2de --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/DeleteServiceRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface DeleteServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.DeleteServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfig.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfig.java new file mode 100644 index 000000000000..bb5b734a9a7a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfig.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Encryption settings for the service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.EncryptionConfig} + */ +public final class EncryptionConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.EncryptionConfig) + EncryptionConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use EncryptionConfig.newBuilder() to construct. + private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EncryptionConfig() { + kmsKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EncryptionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.EncryptionConfig.class, com.google.cloud.metastore.v1.EncryptionConfig.Builder.class); + } + + public static final int KMS_KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } + } + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.EncryptionConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.EncryptionConfig other = (com.google.cloud.metastore.v1.EncryptionConfig) obj; + + if (!getKmsKey() + .equals(other.getKmsKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.EncryptionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Encryption settings for the service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.EncryptionConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.EncryptionConfig) + com.google.cloud.metastore.v1.EncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.EncryptionConfig.class, com.google.cloud.metastore.v1.EncryptionConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.EncryptionConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.EncryptionConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.EncryptionConfig build() { + com.google.cloud.metastore.v1.EncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.EncryptionConfig buildPartial() { + com.google.cloud.metastore.v1.EncryptionConfig result = new com.google.cloud.metastore.v1.EncryptionConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.EncryptionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kmsKey_ = kmsKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.EncryptionConfig) { + return mergeFrom((com.google.cloud.metastore.v1.EncryptionConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.EncryptionConfig other) { + if (other == com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance()) return this; + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + kmsKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object kmsKey_ = ""; + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString + getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.EncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.EncryptionConfig) + private static final com.google.cloud.metastore.v1.EncryptionConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.EncryptionConfig(); + } + + public static com.google.cloud.metastore.v1.EncryptionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EncryptionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.EncryptionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfigOrBuilder.java new file mode 100644 index 000000000000..b9bba90351df --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/EncryptionConfigOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface EncryptionConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString + getKmsKeyBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequest.java new file mode 100644 index 000000000000..ea159e0fce02 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequest.java @@ -0,0 +1,1253 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ExportMetadataRequest} + */ +public final class ExportMetadataRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ExportMetadataRequest) + ExportMetadataRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExportMetadataRequest.newBuilder() to construct. + private ExportMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExportMetadataRequest() { + service_ = ""; + requestId_ = ""; + databaseDumpType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExportMetadataRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ExportMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ExportMetadataRequest.class, com.google.cloud.metastore.v1.ExportMetadataRequest.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DESTINATION_GCS_FOLDER(2), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 2: return DESTINATION_GCS_FOLDER; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int DESTINATION_GCS_FOLDER_FIELD_NUMBER = 2; + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + public boolean hasDestinationGcsFolder() { + return destinationCase_ == 2; + } + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + public java.lang.String getDestinationGcsFolder() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } + } + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + public com.google.protobuf.ByteString + getDestinationGcsFolderBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 4; + private int databaseDumpType_ = 0; + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + @java.lang.Override public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (destinationCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, databaseDumpType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (destinationCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, databaseDumpType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ExportMetadataRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ExportMetadataRequest other = (com.google.cloud.metastore.v1.ExportMetadataRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (databaseDumpType_ != other.databaseDumpType_) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 2: + if (!getDestinationGcsFolder() + .equals(other.getDestinationGcsFolder())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseDumpType_; + switch (destinationCase_) { + case 2: + hash = (37 * hash) + DESTINATION_GCS_FOLDER_FIELD_NUMBER; + hash = (53 * hash) + getDestinationGcsFolder().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ExportMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ExportMetadataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ExportMetadataRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ExportMetadataRequest) + com.google.cloud.metastore.v1.ExportMetadataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ExportMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ExportMetadataRequest.class, com.google.cloud.metastore.v1.ExportMetadataRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ExportMetadataRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + requestId_ = ""; + databaseDumpType_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ExportMetadataRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ExportMetadataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ExportMetadataRequest build() { + com.google.cloud.metastore.v1.ExportMetadataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ExportMetadataRequest buildPartial() { + com.google.cloud.metastore.v1.ExportMetadataRequest result = new com.google.cloud.metastore.v1.ExportMetadataRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ExportMetadataRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.databaseDumpType_ = databaseDumpType_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1.ExportMetadataRequest result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ExportMetadataRequest) { + return mergeFrom((com.google.cloud.metastore.v1.ExportMetadataRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ExportMetadataRequest other) { + if (other == com.google.cloud.metastore.v1.ExportMetadataRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.databaseDumpType_ != 0) { + setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); + } + switch (other.getDestinationCase()) { + case DESTINATION_GCS_FOLDER: { + destinationCase_ = 2; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 2; + destination_ = s; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + databaseDumpType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + @java.lang.Override + public boolean hasDestinationGcsFolder() { + return destinationCase_ == 2; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + @java.lang.Override + public java.lang.String getDestinationGcsFolder() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationGcsFolderBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @param value The destinationGcsFolder to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsFolder( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return This builder for chaining. + */ + public Builder clearDestinationGcsFolder() { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @param value The bytes for destinationGcsFolder to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsFolderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int databaseDumpType_ = 0; + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpTypeValue(int value) { + databaseDumpType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpType(com.google.cloud.metastore.v1.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + databaseDumpType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearDatabaseDumpType() { + bitField0_ = (bitField0_ & ~0x00000008); + databaseDumpType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ExportMetadataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ExportMetadataRequest) + private static final com.google.cloud.metastore.v1.ExportMetadataRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ExportMetadataRequest(); + } + + public static com.google.cloud.metastore.v1.ExportMetadataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportMetadataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ExportMetadataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequestOrBuilder.java new file mode 100644 index 000000000000..89d5b46d9da0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ExportMetadataRequestOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ExportMetadataRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ExportMetadataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + boolean hasDestinationGcsFolder(); + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + java.lang.String getDestinationGcsFolder(); + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + com.google.protobuf.ByteString + getDestinationGcsFolderBytes(); + + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); + + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + int getDatabaseDumpTypeValue(); + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType(); + + public com.google.cloud.metastore.v1.ExportMetadataRequest.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Federation.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Federation.java new file mode 100644 index 000000000000..fad24f6803b2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Federation.java @@ -0,0 +1,2724 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Represents a federation of multiple backend metastores.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Federation} + */ +public final class Federation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Federation) + FederationOrBuilder { +private static final long serialVersionUID = 0L; + // Use Federation.newBuilder() to construct. + private Federation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Federation() { + name_ = ""; + version_ = ""; + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + uid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Federation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_Federation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 6: + return internalGetBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_Federation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Federation.class, com.google.cloud.metastore.v1.Federation.Builder.class); + } + + /** + *
+   * The current state of the federation.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.Federation.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metastore federation is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metastore federation is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The metastore federation is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + *
+     * The metastore federation is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + *
+     * The metastore federation is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + *
+     * The metastore federation has encountered an error and cannot be used. The
+     * metastore federation should be deleted.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metastore federation is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metastore federation is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The metastore federation is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + *
+     * The metastore federation is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + *
+     * The metastore federation is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + *
+     * The metastore federation has encountered an error and cannot be used. The
+     * metastore federation should be deleted.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return ACTIVE; + case 3: return UPDATING; + case 4: return DELETING; + case 5: return ERROR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.Federation.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Federation.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int VERSION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKEND_METASTORES_FIELD_NUMBER = 6; + private static final class BackendMetastoresDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.metastore.v1.BackendMetastore.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> backendMetastores_; + private com.google.protobuf.MapField + internalGetBackendMetastores() { + if (backendMetastores_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + return backendMetastores_; + } + public int getBackendMetastoresCount() { + return internalGetBackendMetastores().getMap().size(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public boolean containsBackendMetastores( + int key) { + + return internalGetBackendMetastores().getMap().containsKey(key); + } + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBackendMetastores() { + return getBackendMetastoresMap(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public java.util.Map getBackendMetastoresMap() { + return internalGetBackendMetastores().getMap(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1.BackendMetastore defaultValue) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrThrow( + int key) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_ = 0; + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Federation.State getState() { + com.google.cloud.metastore.v1.Federation.State result = com.google.cloud.metastore.v1.Federation.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.Federation.State.UNRECOGNIZED : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object stateMessage_ = ""; + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetBackendMetastores(), + BackendMetastoresDefaultEntryHolder.defaultEntry, + 6); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, endpointUri_); + } + if (state_ != com.google.cloud.metastore.v1.Federation.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, uid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); + } + for (java.util.Map.Entry entry + : internalGetBackendMetastores().getMap().entrySet()) { + com.google.protobuf.MapEntry + backendMetastores__ = BackendMetastoresDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, backendMetastores__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, endpointUri_); + } + if (state_ != com.google.cloud.metastore.v1.Federation.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, uid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.Federation)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.Federation other = (com.google.cloud.metastore.v1.Federation) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetBackendMetastores().equals( + other.internalGetBackendMetastores())) return false; + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (state_ != other.state_) return false; + if (!getStateMessage() + .equals(other.getStateMessage())) return false; + if (!getUid() + .equals(other.getUid())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetBackendMetastores().getMap().isEmpty()) { + hash = (37 * hash) + BACKEND_METASTORES_FIELD_NUMBER; + hash = (53 * hash) + internalGetBackendMetastores().hashCode(); + } + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.Federation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Federation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Federation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Federation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Federation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Federation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Federation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Federation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Federation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Federation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Federation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Federation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.Federation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a federation of multiple backend metastores.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Federation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Federation) + com.google.cloud.metastore.v1.FederationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_Federation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 6: + return internalGetBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 6: + return internalGetMutableBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_Federation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Federation.class, com.google.cloud.metastore.v1.Federation.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.Federation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + version_ = ""; + internalGetMutableBackendMetastores().clear(); + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + uid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_Federation_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Federation getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.Federation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Federation build() { + com.google.cloud.metastore.v1.Federation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Federation buildPartial() { + com.google.cloud.metastore.v1.Federation result = new com.google.cloud.metastore.v1.Federation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.Federation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.backendMetastores_ = internalGetBackendMetastores(); + result.backendMetastores_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endpointUri_ = endpointUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.stateMessage_ = stateMessage_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.uid_ = uid_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.Federation) { + return mergeFrom((com.google.cloud.metastore.v1.Federation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.Federation other) { + if (other == com.google.cloud.metastore.v1.Federation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000010; + onChanged(); + } + internalGetMutableBackendMetastores().mergeFrom( + other.internalGetBackendMetastores()); + bitField0_ |= 0x00000020; + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + com.google.protobuf.MapEntry + backendMetastores__ = input.readMessage( + BackendMetastoresDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableBackendMetastores().getMutableMap().put( + backendMetastores__.getKey(), backendMetastores__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + state_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: { + stateMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, com.google.cloud.metastore.v1.BackendMetastore> backendMetastores_; + private com.google.protobuf.MapField + internalGetBackendMetastores() { + if (backendMetastores_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + return backendMetastores_; + } + private com.google.protobuf.MapField + internalGetMutableBackendMetastores() { + if (backendMetastores_ == null) { + backendMetastores_ = com.google.protobuf.MapField.newMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + if (!backendMetastores_.isMutable()) { + backendMetastores_ = backendMetastores_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return backendMetastores_; + } + public int getBackendMetastoresCount() { + return internalGetBackendMetastores().getMap().size(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public boolean containsBackendMetastores( + int key) { + + return internalGetBackendMetastores().getMap().containsKey(key); + } + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBackendMetastores() { + return getBackendMetastoresMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public java.util.Map getBackendMetastoresMap() { + return internalGetBackendMetastores().getMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1.BackendMetastore defaultValue) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrThrow( + int key) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearBackendMetastores() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableBackendMetastores().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + public Builder removeBackendMetastores( + int key) { + + internalGetMutableBackendMetastores().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableBackendMetastores() { + bitField0_ |= 0x00000020; + return internalGetMutableBackendMetastores().getMutableMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + public Builder putBackendMetastores( + int key, + com.google.cloud.metastore.v1.BackendMetastore value) { + + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableBackendMetastores().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + public Builder putAllBackendMetastores( + java.util.Map values) { + internalGetMutableBackendMetastores().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Federation.State getState() { + com.google.cloud.metastore.v1.Federation.State result = com.google.cloud.metastore.v1.Federation.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.Federation.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1.Federation.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000080); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + stateMessage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + stateMessage_ = getDefaultInstance().getStateMessage(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + stateMessage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Federation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Federation) + private static final com.google.cloud.metastore.v1.Federation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Federation(); + } + + public static com.google.cloud.metastore.v1.Federation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Federation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Federation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationName.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationName.java rename to owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationOrBuilder.java new file mode 100644 index 000000000000..626cf646cbd2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/FederationOrBuilder.java @@ -0,0 +1,325 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public interface FederationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Federation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + int getBackendMetastoresCount(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + boolean containsBackendMetastores( + int key); + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getBackendMetastores(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + java.util.Map + getBackendMetastoresMap(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + /* nullable */ +com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1.BackendMetastore defaultValue); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1.BackendMetastore> backend_metastores = 6; + */ + com.google.cloud.metastore.v1.BackendMetastore getBackendMetastoresOrThrow( + int key); + + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1.Federation.State getState(); + + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString + getStateMessageBytes(); + + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + java.lang.String getUid(); + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequest.java new file mode 100644 index 000000000000..2e8683f4014a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.GetBackupRequest} + */ +public final class GetBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.GetBackupRequest) + GetBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetBackupRequest.newBuilder() to construct. + private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBackupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.GetBackupRequest.class, com.google.cloud.metastore.v1.GetBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.GetBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.GetBackupRequest other = (com.google.cloud.metastore.v1.GetBackupRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.GetBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.GetBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.GetBackupRequest) + com.google.cloud.metastore.v1.GetBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.GetBackupRequest.class, com.google.cloud.metastore.v1.GetBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.GetBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.GetBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetBackupRequest build() { + com.google.cloud.metastore.v1.GetBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetBackupRequest buildPartial() { + com.google.cloud.metastore.v1.GetBackupRequest result = new com.google.cloud.metastore.v1.GetBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.GetBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.GetBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1.GetBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.GetBackupRequest other) { + if (other == com.google.cloud.metastore.v1.GetBackupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.GetBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.GetBackupRequest) + private static final com.google.cloud.metastore.v1.GetBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.GetBackupRequest(); + } + + public static com.google.cloud.metastore.v1.GetBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequestOrBuilder.java new file mode 100644 index 000000000000..ce2dc56afc53 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetBackupRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface GetBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.GetBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequest.java new file mode 100644 index 000000000000..b4766cb4c6ca --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequest.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for GetFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.GetFederationRequest} + */ +public final class GetFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.GetFederationRequest) + GetFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetFederationRequest.newBuilder() to construct. + private GetFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetFederationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_GetFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.GetFederationRequest.class, com.google.cloud.metastore.v1.GetFederationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.GetFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.GetFederationRequest other = (com.google.cloud.metastore.v1.GetFederationRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.GetFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.GetFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.GetFederationRequest) + com.google.cloud.metastore.v1.GetFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_GetFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.GetFederationRequest.class, com.google.cloud.metastore.v1.GetFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.GetFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.GetFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetFederationRequest build() { + com.google.cloud.metastore.v1.GetFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetFederationRequest buildPartial() { + com.google.cloud.metastore.v1.GetFederationRequest result = new com.google.cloud.metastore.v1.GetFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.GetFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.GetFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1.GetFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.GetFederationRequest other) { + if (other == com.google.cloud.metastore.v1.GetFederationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.GetFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.GetFederationRequest) + private static final com.google.cloud.metastore.v1.GetFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.GetFederationRequest(); + } + + public static com.google.cloud.metastore.v1.GetFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequestOrBuilder.java new file mode 100644 index 000000000000..087bd5dd79d0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetFederationRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public interface GetFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.GetFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequest.java new file mode 100644 index 000000000000..b365d21d23a0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.GetMetadataImportRequest} + */ +public final class GetMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.GetMetadataImportRequest) + GetMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetMetadataImportRequest.newBuilder() to construct. + private GetMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetMetadataImportRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.GetMetadataImportRequest.class, com.google.cloud.metastore.v1.GetMetadataImportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.GetMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.GetMetadataImportRequest other = (com.google.cloud.metastore.v1.GetMetadataImportRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.GetMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.GetMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.GetMetadataImportRequest) + com.google.cloud.metastore.v1.GetMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.GetMetadataImportRequest.class, com.google.cloud.metastore.v1.GetMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.GetMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.GetMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetMetadataImportRequest build() { + com.google.cloud.metastore.v1.GetMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1.GetMetadataImportRequest result = new com.google.cloud.metastore.v1.GetMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.GetMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.GetMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1.GetMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.GetMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1.GetMetadataImportRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.GetMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.GetMetadataImportRequest) + private static final com.google.cloud.metastore.v1.GetMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.GetMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1.GetMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..e5fe88088b3c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetMetadataImportRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface GetMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.GetMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequest.java new file mode 100644 index 000000000000..60dbde0b244a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.GetServiceRequest} + */ +public final class GetServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.GetServiceRequest) + GetServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetServiceRequest.newBuilder() to construct. + private GetServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetServiceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.GetServiceRequest.class, com.google.cloud.metastore.v1.GetServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.GetServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.GetServiceRequest other = (com.google.cloud.metastore.v1.GetServiceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.GetServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.GetServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.GetServiceRequest) + com.google.cloud.metastore.v1.GetServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.GetServiceRequest.class, com.google.cloud.metastore.v1.GetServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.GetServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.GetServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetServiceRequest build() { + com.google.cloud.metastore.v1.GetServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetServiceRequest buildPartial() { + com.google.cloud.metastore.v1.GetServiceRequest result = new com.google.cloud.metastore.v1.GetServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.GetServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.GetServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1.GetServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.GetServiceRequest other) { + if (other == com.google.cloud.metastore.v1.GetServiceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object 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}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.GetServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.GetServiceRequest) + private static final com.google.cloud.metastore.v1.GetServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.GetServiceRequest(); + } + + public static com.google.cloud.metastore.v1.GetServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.GetServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequestOrBuilder.java new file mode 100644 index 000000000000..58751f1a03e9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/GetServiceRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface GetServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.GetServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfig.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfig.java new file mode 100644 index 000000000000..8bfc12d20a0c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfig.java @@ -0,0 +1,1598 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Specifies configuration information specific to running Hive metastore
+ * software as the metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.HiveMetastoreConfig} + */ +public final class HiveMetastoreConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.HiveMetastoreConfig) + HiveMetastoreConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use HiveMetastoreConfig.newBuilder() to construct. + private HiveMetastoreConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HiveMetastoreConfig() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HiveMetastoreConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + case 5: + return internalGetAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.HiveMetastoreConfig.class, com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; + private static final class ConfigOverridesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_ConfigOverridesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int KERBEROS_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1.KerberosConfig kerberosConfig_; + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + @java.lang.Override + public boolean hasKerberosConfig() { + return kerberosConfig_ != null; + } + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.KerberosConfig getKerberosConfig() { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + + public static final int AUXILIARY_VERSIONS_FIELD_NUMBER = 5; + private static final class AuxiliaryVersionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.metastore.v1.AuxiliaryVersionConfig> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.metastore.v1.AuxiliaryVersionConfig.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliaryVersions_; + private com.google.protobuf.MapField + internalGetAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + return auxiliaryVersions_; + } + public int getAuxiliaryVersionsCount() { + return internalGetAuxiliaryVersions().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public boolean containsAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAuxiliaryVersions().getMap().containsKey(key); + } + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAuxiliaryVersions() { + return getAuxiliaryVersionsMap(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public java.util.Map getAuxiliaryVersionsMap() { + return internalGetAuxiliaryVersions().getMap(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1.AuxiliaryVersionConfig defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetConfigOverrides(), + ConfigOverridesDefaultEntryHolder.defaultEntry, + 2); + if (kerberosConfig_ != null) { + output.writeMessage(3, getKerberosConfig()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAuxiliaryVersions(), + AuxiliaryVersionsDefaultEntryHolder.defaultEntry, + 5); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + for (java.util.Map.Entry entry + : internalGetConfigOverrides().getMap().entrySet()) { + com.google.protobuf.MapEntry + configOverrides__ = ConfigOverridesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, configOverrides__); + } + if (kerberosConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getKerberosConfig()); + } + for (java.util.Map.Entry entry + : internalGetAuxiliaryVersions().getMap().entrySet()) { + com.google.protobuf.MapEntry + auxiliaryVersions__ = AuxiliaryVersionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, auxiliaryVersions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.HiveMetastoreConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.HiveMetastoreConfig other = (com.google.cloud.metastore.v1.HiveMetastoreConfig) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetConfigOverrides().equals( + other.internalGetConfigOverrides())) return false; + if (hasKerberosConfig() != other.hasKerberosConfig()) return false; + if (hasKerberosConfig()) { + if (!getKerberosConfig() + .equals(other.getKerberosConfig())) return false; + } + if (!internalGetAuxiliaryVersions().equals( + other.internalGetAuxiliaryVersions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetConfigOverrides().getMap().isEmpty()) { + hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + internalGetConfigOverrides().hashCode(); + } + if (hasKerberosConfig()) { + hash = (37 * hash) + KERBEROS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getKerberosConfig().hashCode(); + } + if (!internalGetAuxiliaryVersions().getMap().isEmpty()) { + hash = (37 * hash) + AUXILIARY_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAuxiliaryVersions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.HiveMetastoreConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.HiveMetastoreConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.HiveMetastoreConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.HiveMetastoreConfig) + com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + case 5: + return internalGetAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableConfigOverrides(); + case 5: + return internalGetMutableAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.HiveMetastoreConfig.class, com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.HiveMetastoreConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + internalGetMutableConfigOverrides().clear(); + kerberosConfig_ = null; + if (kerberosConfigBuilder_ != null) { + kerberosConfigBuilder_.dispose(); + kerberosConfigBuilder_ = null; + } + internalGetMutableAuxiliaryVersions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfig build() { + com.google.cloud.metastore.v1.HiveMetastoreConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfig buildPartial() { + com.google.cloud.metastore.v1.HiveMetastoreConfig result = new com.google.cloud.metastore.v1.HiveMetastoreConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.HiveMetastoreConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configOverrides_ = internalGetConfigOverrides(); + result.configOverrides_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kerberosConfig_ = kerberosConfigBuilder_ == null + ? kerberosConfig_ + : kerberosConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.auxiliaryVersions_ = internalGetAuxiliaryVersions(); + result.auxiliaryVersions_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.HiveMetastoreConfig) { + return mergeFrom((com.google.cloud.metastore.v1.HiveMetastoreConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.HiveMetastoreConfig other) { + if (other == com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableConfigOverrides().mergeFrom( + other.internalGetConfigOverrides()); + bitField0_ |= 0x00000002; + if (other.hasKerberosConfig()) { + mergeKerberosConfig(other.getKerberosConfig()); + } + internalGetMutableAuxiliaryVersions().mergeFrom( + other.internalGetAuxiliaryVersions()); + bitField0_ |= 0x00000008; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + configOverrides__ = input.readMessage( + ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableConfigOverrides().getMutableMap().put( + configOverrides__.getKey(), configOverrides__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getKerberosConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: { + com.google.protobuf.MapEntry + auxiliaryVersions__ = input.readMessage( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableAuxiliaryVersions().getMutableMap().put( + auxiliaryVersions__.getKey(), auxiliaryVersions__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + private com.google.protobuf.MapField + internalGetMutableConfigOverrides() { + if (configOverrides_ == null) { + configOverrides_ = com.google.protobuf.MapField.newMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + if (!configOverrides_.isMutable()) { + configOverrides_ = configOverrides_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearConfigOverrides() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableConfigOverrides().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder removeConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableConfigOverrides().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableConfigOverrides() { + bitField0_ |= 0x00000002; + return internalGetMutableConfigOverrides().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putConfigOverrides( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableConfigOverrides().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putAllConfigOverrides( + java.util.Map values) { + internalGetMutableConfigOverrides().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.cloud.metastore.v1.KerberosConfig kerberosConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.KerberosConfig, com.google.cloud.metastore.v1.KerberosConfig.Builder, com.google.cloud.metastore.v1.KerberosConfigOrBuilder> kerberosConfigBuilder_; + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + public boolean hasKerberosConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + public com.google.cloud.metastore.v1.KerberosConfig getKerberosConfig() { + if (kerberosConfigBuilder_ == null) { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } else { + return kerberosConfigBuilder_.getMessage(); + } + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + public Builder setKerberosConfig(com.google.cloud.metastore.v1.KerberosConfig value) { + if (kerberosConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kerberosConfig_ = value; + } else { + kerberosConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + public Builder setKerberosConfig( + com.google.cloud.metastore.v1.KerberosConfig.Builder builderForValue) { + if (kerberosConfigBuilder_ == null) { + kerberosConfig_ = builderForValue.build(); + } else { + kerberosConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + public Builder mergeKerberosConfig(com.google.cloud.metastore.v1.KerberosConfig value) { + if (kerberosConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + kerberosConfig_ != null && + kerberosConfig_ != com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance()) { + getKerberosConfigBuilder().mergeFrom(value); + } else { + kerberosConfig_ = value; + } + } else { + kerberosConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + public Builder clearKerberosConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + kerberosConfig_ = null; + if (kerberosConfigBuilder_ != null) { + kerberosConfigBuilder_.dispose(); + kerberosConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + public com.google.cloud.metastore.v1.KerberosConfig.Builder getKerberosConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getKerberosConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + public com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { + if (kerberosConfigBuilder_ != null) { + return kerberosConfigBuilder_.getMessageOrBuilder(); + } else { + return kerberosConfig_ == null ? + com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.KerberosConfig, com.google.cloud.metastore.v1.KerberosConfig.Builder, com.google.cloud.metastore.v1.KerberosConfigOrBuilder> + getKerberosConfigFieldBuilder() { + if (kerberosConfigBuilder_ == null) { + kerberosConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.KerberosConfig, com.google.cloud.metastore.v1.KerberosConfig.Builder, com.google.cloud.metastore.v1.KerberosConfigOrBuilder>( + getKerberosConfig(), + getParentForChildren(), + isClean()); + kerberosConfig_ = null; + } + return kerberosConfigBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliaryVersions_; + private com.google.protobuf.MapField + internalGetAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + return auxiliaryVersions_; + } + private com.google.protobuf.MapField + internalGetMutableAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + auxiliaryVersions_ = com.google.protobuf.MapField.newMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + if (!auxiliaryVersions_.isMutable()) { + auxiliaryVersions_ = auxiliaryVersions_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return auxiliaryVersions_; + } + public int getAuxiliaryVersionsCount() { + return internalGetAuxiliaryVersions().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public boolean containsAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAuxiliaryVersions().getMap().containsKey(key); + } + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAuxiliaryVersions() { + return getAuxiliaryVersionsMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public java.util.Map getAuxiliaryVersionsMap() { + return internalGetAuxiliaryVersions().getMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1.AuxiliaryVersionConfig defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearAuxiliaryVersions() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableAuxiliaryVersions().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder removeAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableAuxiliaryVersions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAuxiliaryVersions() { + bitField0_ |= 0x00000008; + return internalGetMutableAuxiliaryVersions().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder putAuxiliaryVersions( + java.lang.String key, + com.google.cloud.metastore.v1.AuxiliaryVersionConfig value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableAuxiliaryVersions().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder putAllAuxiliaryVersions( + java.util.Map values) { + internalGetMutableAuxiliaryVersions().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.HiveMetastoreConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.HiveMetastoreConfig) + private static final com.google.cloud.metastore.v1.HiveMetastoreConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.HiveMetastoreConfig(); + } + + public static com.google.cloud.metastore.v1.HiveMetastoreConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HiveMetastoreConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfigOrBuilder.java new file mode 100644 index 000000000000..72b54d9b4a51 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/HiveMetastoreConfigOrBuilder.java @@ -0,0 +1,231 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface HiveMetastoreConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.HiveMetastoreConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + int getConfigOverridesCount(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + boolean containsConfigOverrides( + java.lang.String key); + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getConfigOverrides(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.util.Map + getConfigOverridesMap(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.lang.String getConfigOverridesOrThrow( + java.lang.String key); + + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + boolean hasKerberosConfig(); + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + com.google.cloud.metastore.v1.KerberosConfig getKerberosConfig(); + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1.KerberosConfig kerberos_config = 3; + */ + com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); + + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + int getAuxiliaryVersionsCount(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + boolean containsAuxiliaryVersions( + java.lang.String key); + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAuxiliaryVersions(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + java.util.Map + getAuxiliaryVersionsMap(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + /* nullable */ +com.google.cloud.metastore.v1.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1.AuxiliaryVersionConfig defaultValue); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + com.google.cloud.metastore.v1.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfig.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfig.java new file mode 100644 index 000000000000..2e217cf1a7b9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfig.java @@ -0,0 +1,1013 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Configuration information for a Kerberos principal.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.KerberosConfig} + */ +public final class KerberosConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.KerberosConfig) + KerberosConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use KerberosConfig.newBuilder() to construct. + private KerberosConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KerberosConfig() { + principal_ = ""; + krb5ConfigGcsUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KerberosConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_KerberosConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_KerberosConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.KerberosConfig.class, com.google.cloud.metastore.v1.KerberosConfig.Builder.class); + } + + public static final int KEYTAB_FIELD_NUMBER = 1; + private com.google.cloud.metastore.v1.Secret keytab_; + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + @java.lang.Override + public boolean hasKeytab() { + return keytab_ != null; + } + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + * @return The keytab. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Secret getKeytab() { + return keytab_ == null ? com.google.cloud.metastore.v1.Secret.getDefaultInstance() : keytab_; + } + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.SecretOrBuilder getKeytabOrBuilder() { + return keytab_ == null ? com.google.cloud.metastore.v1.Secret.getDefaultInstance() : keytab_; + } + + public static final int PRINCIPAL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object principal_ = ""; + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The principal. + */ + @java.lang.Override + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } + } + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KRB5_CONFIG_GCS_URI_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object krb5ConfigGcsUri_ = ""; + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + @java.lang.Override + public java.lang.String getKrb5ConfigGcsUri() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + krb5ConfigGcsUri_ = s; + return s; + } + } + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + krb5ConfigGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (keytab_ != null) { + output.writeMessage(1, getKeytab()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, principal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, krb5ConfigGcsUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (keytab_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getKeytab()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, principal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, krb5ConfigGcsUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.KerberosConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.KerberosConfig other = (com.google.cloud.metastore.v1.KerberosConfig) obj; + + if (hasKeytab() != other.hasKeytab()) return false; + if (hasKeytab()) { + if (!getKeytab() + .equals(other.getKeytab())) return false; + } + if (!getPrincipal() + .equals(other.getPrincipal())) return false; + if (!getKrb5ConfigGcsUri() + .equals(other.getKrb5ConfigGcsUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeytab()) { + hash = (37 * hash) + KEYTAB_FIELD_NUMBER; + hash = (53 * hash) + getKeytab().hashCode(); + } + hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipal().hashCode(); + hash = (37 * hash) + KRB5_CONFIG_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getKrb5ConfigGcsUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.KerberosConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.KerberosConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration information for a Kerberos principal.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.KerberosConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.KerberosConfig) + com.google.cloud.metastore.v1.KerberosConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_KerberosConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_KerberosConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.KerberosConfig.class, com.google.cloud.metastore.v1.KerberosConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.KerberosConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keytab_ = null; + if (keytabBuilder_ != null) { + keytabBuilder_.dispose(); + keytabBuilder_ = null; + } + principal_ = ""; + krb5ConfigGcsUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_KerberosConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.KerberosConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.KerberosConfig build() { + com.google.cloud.metastore.v1.KerberosConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.KerberosConfig buildPartial() { + com.google.cloud.metastore.v1.KerberosConfig result = new com.google.cloud.metastore.v1.KerberosConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.KerberosConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keytab_ = keytabBuilder_ == null + ? keytab_ + : keytabBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.principal_ = principal_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.krb5ConfigGcsUri_ = krb5ConfigGcsUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.KerberosConfig) { + return mergeFrom((com.google.cloud.metastore.v1.KerberosConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.KerberosConfig other) { + if (other == com.google.cloud.metastore.v1.KerberosConfig.getDefaultInstance()) return this; + if (other.hasKeytab()) { + mergeKeytab(other.getKeytab()); + } + if (!other.getPrincipal().isEmpty()) { + principal_ = other.principal_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getKrb5ConfigGcsUri().isEmpty()) { + krb5ConfigGcsUri_ = other.krb5ConfigGcsUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getKeytabFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + principal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + krb5ConfigGcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.cloud.metastore.v1.Secret keytab_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Secret, com.google.cloud.metastore.v1.Secret.Builder, com.google.cloud.metastore.v1.SecretOrBuilder> keytabBuilder_; + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + public boolean hasKeytab() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + * @return The keytab. + */ + public com.google.cloud.metastore.v1.Secret getKeytab() { + if (keytabBuilder_ == null) { + return keytab_ == null ? com.google.cloud.metastore.v1.Secret.getDefaultInstance() : keytab_; + } else { + return keytabBuilder_.getMessage(); + } + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + public Builder setKeytab(com.google.cloud.metastore.v1.Secret value) { + if (keytabBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keytab_ = value; + } else { + keytabBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + public Builder setKeytab( + com.google.cloud.metastore.v1.Secret.Builder builderForValue) { + if (keytabBuilder_ == null) { + keytab_ = builderForValue.build(); + } else { + keytabBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + public Builder mergeKeytab(com.google.cloud.metastore.v1.Secret value) { + if (keytabBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + keytab_ != null && + keytab_ != com.google.cloud.metastore.v1.Secret.getDefaultInstance()) { + getKeytabBuilder().mergeFrom(value); + } else { + keytab_ = value; + } + } else { + keytabBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + public Builder clearKeytab() { + bitField0_ = (bitField0_ & ~0x00000001); + keytab_ = null; + if (keytabBuilder_ != null) { + keytabBuilder_.dispose(); + keytabBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + public com.google.cloud.metastore.v1.Secret.Builder getKeytabBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeytabFieldBuilder().getBuilder(); + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + public com.google.cloud.metastore.v1.SecretOrBuilder getKeytabOrBuilder() { + if (keytabBuilder_ != null) { + return keytabBuilder_.getMessageOrBuilder(); + } else { + return keytab_ == null ? + com.google.cloud.metastore.v1.Secret.getDefaultInstance() : keytab_; + } + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Secret, com.google.cloud.metastore.v1.Secret.Builder, com.google.cloud.metastore.v1.SecretOrBuilder> + getKeytabFieldBuilder() { + if (keytabBuilder_ == null) { + keytabBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Secret, com.google.cloud.metastore.v1.Secret.Builder, com.google.cloud.metastore.v1.SecretOrBuilder>( + getKeytab(), + getParentForChildren(), + isClean()); + keytab_ = null; + } + return keytabBuilder_; + } + + private java.lang.Object principal_ = ""; + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return The principal. + */ + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + public com.google.protobuf.ByteString + getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @param value The principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipal( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + principal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return This builder for chaining. + */ + public Builder clearPrincipal() { + principal_ = getDefaultInstance().getPrincipal(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @param value The bytes for principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + principal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object krb5ConfigGcsUri_ = ""; + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + public java.lang.String getKrb5ConfigGcsUri() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + krb5ConfigGcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + public com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + krb5ConfigGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @param value The krb5ConfigGcsUri to set. + * @return This builder for chaining. + */ + public Builder setKrb5ConfigGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + krb5ConfigGcsUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return This builder for chaining. + */ + public Builder clearKrb5ConfigGcsUri() { + krb5ConfigGcsUri_ = getDefaultInstance().getKrb5ConfigGcsUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @param value The bytes for krb5ConfigGcsUri to set. + * @return This builder for chaining. + */ + public Builder setKrb5ConfigGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + krb5ConfigGcsUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.KerberosConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.KerberosConfig) + private static final com.google.cloud.metastore.v1.KerberosConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.KerberosConfig(); + } + + public static com.google.cloud.metastore.v1.KerberosConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KerberosConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.KerberosConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfigOrBuilder.java new file mode 100644 index 000000000000..8675fa4ffd06 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/KerberosConfigOrBuilder.java @@ -0,0 +1,87 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface KerberosConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.KerberosConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + boolean hasKeytab(); + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + * @return The keytab. + */ + com.google.cloud.metastore.v1.Secret getKeytab(); + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1.Secret keytab = 1; + */ + com.google.cloud.metastore.v1.SecretOrBuilder getKeytabOrBuilder(); + + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The principal. + */ + java.lang.String getPrincipal(); + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + com.google.protobuf.ByteString + getPrincipalBytes(); + + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + java.lang.String getKrb5ConfigGcsUri(); + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequest.java new file mode 100644 index 000000000000..313697254dda --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequest.java @@ -0,0 +1,1234 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListBackupsRequest} + */ +public final class ListBackupsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListBackupsRequest) + ListBackupsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListBackupsRequest.newBuilder() to construct. + private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListBackupsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListBackupsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListBackupsRequest.class, com.google.cloud.metastore.v1.ListBackupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of backups to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 backups are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ListBackupsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ListBackupsRequest other = (com.google.cloud.metastore.v1.ListBackupsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ListBackupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListBackupsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListBackupsRequest) + com.google.cloud.metastore.v1.ListBackupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListBackupsRequest.class, com.google.cloud.metastore.v1.ListBackupsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ListBackupsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListBackupsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ListBackupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListBackupsRequest build() { + com.google.cloud.metastore.v1.ListBackupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListBackupsRequest buildPartial() { + com.google.cloud.metastore.v1.ListBackupsRequest result = new com.google.cloud.metastore.v1.ListBackupsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ListBackupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ListBackupsRequest) { + return mergeFrom((com.google.cloud.metastore.v1.ListBackupsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ListBackupsRequest other) { + if (other == com.google.cloud.metastore.v1.ListBackupsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListBackupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListBackupsRequest) + private static final com.google.cloud.metastore.v1.ListBackupsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListBackupsRequest(); + } + + public static com.google.cloud.metastore.v1.ListBackupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListBackupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequestOrBuilder.java new file mode 100644 index 000000000000..71c0dd1ef56a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsRequestOrBuilder.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ListBackupsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListBackupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of backups to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 backups are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponse.java new file mode 100644 index 000000000000..f195ee87086c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListBackupsResponse} + */ +public final class ListBackupsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListBackupsResponse) + ListBackupsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListBackupsResponse.newBuilder() to construct. + private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListBackupsResponse() { + backups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListBackupsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListBackupsResponse.class, com.google.cloud.metastore.v1.ListBackupsResponse.Builder.class); + } + + public static final int BACKUPS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List backups_; + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + @java.lang.Override + public java.util.List getBackupsList() { + return backups_; + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + @java.lang.Override + public java.util.List + getBackupsOrBuilderList() { + return backups_; + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + @java.lang.Override + public int getBackupsCount() { + return backups_.size(); + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Backup getBackups(int index) { + return backups_.get(index); + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.BackupOrBuilder getBackupsOrBuilder( + int index) { + return backups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < backups_.size(); i++) { + output.writeMessage(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < backups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ListBackupsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ListBackupsResponse other = (com.google.cloud.metastore.v1.ListBackupsResponse) obj; + + if (!getBackupsList() + .equals(other.getBackupsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBackupsCount() > 0) { + hash = (37 * hash) + BACKUPS_FIELD_NUMBER; + hash = (53 * hash) + getBackupsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ListBackupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListBackupsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListBackupsResponse) + com.google.cloud.metastore.v1.ListBackupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListBackupsResponse.class, com.google.cloud.metastore.v1.ListBackupsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ListBackupsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + } else { + backups_ = null; + backupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListBackupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListBackupsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ListBackupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListBackupsResponse build() { + com.google.cloud.metastore.v1.ListBackupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListBackupsResponse buildPartial() { + com.google.cloud.metastore.v1.ListBackupsResponse result = new com.google.cloud.metastore.v1.ListBackupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.ListBackupsResponse result) { + if (backupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backups_ = java.util.Collections.unmodifiableList(backups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backups_ = backups_; + } else { + result.backups_ = backupsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ListBackupsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ListBackupsResponse) { + return mergeFrom((com.google.cloud.metastore.v1.ListBackupsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ListBackupsResponse other) { + if (other == com.google.cloud.metastore.v1.ListBackupsResponse.getDefaultInstance()) return this; + if (backupsBuilder_ == null) { + if (!other.backups_.isEmpty()) { + if (backups_.isEmpty()) { + backups_ = other.backups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupsIsMutable(); + backups_.addAll(other.backups_); + } + onChanged(); + } + } else { + if (!other.backups_.isEmpty()) { + if (backupsBuilder_.isEmpty()) { + backupsBuilder_.dispose(); + backupsBuilder_ = null; + backups_ = other.backups_; + bitField0_ = (bitField0_ & ~0x00000001); + backupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBackupsFieldBuilder() : null; + } else { + backupsBuilder_.addAllMessages(other.backups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1.Backup m = + input.readMessage( + com.google.cloud.metastore.v1.Backup.parser(), + extensionRegistry); + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(m); + } else { + backupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List backups_ = + java.util.Collections.emptyList(); + private void ensureBackupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backups_ = new java.util.ArrayList(backups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Backup, com.google.cloud.metastore.v1.Backup.Builder, com.google.cloud.metastore.v1.BackupOrBuilder> backupsBuilder_; + + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public java.util.List getBackupsList() { + if (backupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backups_); + } else { + return backupsBuilder_.getMessageList(); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public int getBackupsCount() { + if (backupsBuilder_ == null) { + return backups_.size(); + } else { + return backupsBuilder_.getCount(); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public com.google.cloud.metastore.v1.Backup getBackups(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessage(index); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.metastore.v1.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.set(index, value); + onChanged(); + } else { + backupsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.metastore.v1.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.set(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.metastore.v1.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(value); + onChanged(); + } else { + backupsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.metastore.v1.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(index, value); + onChanged(); + } else { + backupsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder addBackups( + com.google.cloud.metastore.v1.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.metastore.v1.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder addAllBackups( + java.lang.Iterable values) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, backups_); + onChanged(); + } else { + backupsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder clearBackups() { + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupsBuilder_.clear(); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public Builder removeBackups(int index) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.remove(index); + onChanged(); + } else { + backupsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public com.google.cloud.metastore.v1.Backup.Builder getBackupsBuilder( + int index) { + return getBackupsFieldBuilder().getBuilder(index); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public com.google.cloud.metastore.v1.BackupOrBuilder getBackupsOrBuilder( + int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); } else { + return backupsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public java.util.List + getBackupsOrBuilderList() { + if (backupsBuilder_ != null) { + return backupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backups_); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public com.google.cloud.metastore.v1.Backup.Builder addBackupsBuilder() { + return getBackupsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1.Backup.getDefaultInstance()); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public com.google.cloud.metastore.v1.Backup.Builder addBackupsBuilder( + int index) { + return getBackupsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1.Backup.getDefaultInstance()); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + public java.util.List + getBackupsBuilderList() { + return getBackupsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Backup, com.google.cloud.metastore.v1.Backup.Builder, com.google.cloud.metastore.v1.BackupOrBuilder> + getBackupsFieldBuilder() { + if (backupsBuilder_ == null) { + backupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Backup, com.google.cloud.metastore.v1.Backup.Builder, com.google.cloud.metastore.v1.BackupOrBuilder>( + backups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + backups_ = null; + } + return backupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListBackupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListBackupsResponse) + private static final com.google.cloud.metastore.v1.ListBackupsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListBackupsResponse(); + } + + public static com.google.cloud.metastore.v1.ListBackupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListBackupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponseOrBuilder.java new file mode 100644 index 000000000000..649c1c113441 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListBackupsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ListBackupsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListBackupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + java.util.List + getBackupsList(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + com.google.cloud.metastore.v1.Backup getBackups(int index); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + int getBackupsCount(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + java.util.List + getBackupsOrBuilderList(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Backup backups = 1; + */ + com.google.cloud.metastore.v1.BackupOrBuilder getBackupsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequest.java new file mode 100644 index 000000000000..b57f548addee --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequest.java @@ -0,0 +1,1229 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for ListFederations.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListFederationsRequest} + */ +public final class ListFederationsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListFederationsRequest) + ListFederationsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFederationsRequest.newBuilder() to construct. + private ListFederationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFederationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFederationsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListFederationsRequest.class, com.google.cloud.metastore.v1.ListFederationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of federations to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ListFederationsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ListFederationsRequest other = (com.google.cloud.metastore.v1.ListFederationsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListFederationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ListFederationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListFederations.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListFederationsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListFederationsRequest) + com.google.cloud.metastore.v1.ListFederationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListFederationsRequest.class, com.google.cloud.metastore.v1.ListFederationsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ListFederationsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListFederationsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ListFederationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListFederationsRequest build() { + com.google.cloud.metastore.v1.ListFederationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListFederationsRequest buildPartial() { + com.google.cloud.metastore.v1.ListFederationsRequest result = new com.google.cloud.metastore.v1.ListFederationsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ListFederationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ListFederationsRequest) { + return mergeFrom((com.google.cloud.metastore.v1.ListFederationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ListFederationsRequest other) { + if (other == com.google.cloud.metastore.v1.ListFederationsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListFederationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListFederationsRequest) + private static final com.google.cloud.metastore.v1.ListFederationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListFederationsRequest(); + } + + public static com.google.cloud.metastore.v1.ListFederationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFederationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListFederationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequestOrBuilder.java new file mode 100644 index 000000000000..2bf374fe1acf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsRequestOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public interface ListFederationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListFederationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of federations to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponse.java new file mode 100644 index 000000000000..eaee4c5c5a7a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponse.java @@ -0,0 +1,1266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Response message for ListFederations
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListFederationsResponse} + */ +public final class ListFederationsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListFederationsResponse) + ListFederationsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFederationsResponse.newBuilder() to construct. + private ListFederationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFederationsResponse() { + federations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFederationsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListFederationsResponse.class, com.google.cloud.metastore.v1.ListFederationsResponse.Builder.class); + } + + public static final int FEDERATIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List federations_; + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + @java.lang.Override + public java.util.List getFederationsList() { + return federations_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + @java.lang.Override + public java.util.List + getFederationsOrBuilderList() { + return federations_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + @java.lang.Override + public int getFederationsCount() { + return federations_.size(); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Federation getFederations(int index) { + return federations_.get(index); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.FederationOrBuilder getFederationsOrBuilder( + int index) { + return federations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < federations_.size(); i++) { + output.writeMessage(1, federations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < federations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, federations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ListFederationsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ListFederationsResponse other = (com.google.cloud.metastore.v1.ListFederationsResponse) obj; + + if (!getFederationsList() + .equals(other.getFederationsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFederationsCount() > 0) { + hash = (37 * hash) + FEDERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFederationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListFederationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ListFederationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListFederations
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListFederationsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListFederationsResponse) + com.google.cloud.metastore.v1.ListFederationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListFederationsResponse.class, com.google.cloud.metastore.v1.ListFederationsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ListFederationsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (federationsBuilder_ == null) { + federations_ = java.util.Collections.emptyList(); + } else { + federations_ = null; + federationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListFederationsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ListFederationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListFederationsResponse build() { + com.google.cloud.metastore.v1.ListFederationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListFederationsResponse buildPartial() { + com.google.cloud.metastore.v1.ListFederationsResponse result = new com.google.cloud.metastore.v1.ListFederationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.ListFederationsResponse result) { + if (federationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + federations_ = java.util.Collections.unmodifiableList(federations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.federations_ = federations_; + } else { + result.federations_ = federationsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ListFederationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ListFederationsResponse) { + return mergeFrom((com.google.cloud.metastore.v1.ListFederationsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ListFederationsResponse other) { + if (other == com.google.cloud.metastore.v1.ListFederationsResponse.getDefaultInstance()) return this; + if (federationsBuilder_ == null) { + if (!other.federations_.isEmpty()) { + if (federations_.isEmpty()) { + federations_ = other.federations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFederationsIsMutable(); + federations_.addAll(other.federations_); + } + onChanged(); + } + } else { + if (!other.federations_.isEmpty()) { + if (federationsBuilder_.isEmpty()) { + federationsBuilder_.dispose(); + federationsBuilder_ = null; + federations_ = other.federations_; + bitField0_ = (bitField0_ & ~0x00000001); + federationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFederationsFieldBuilder() : null; + } else { + federationsBuilder_.addAllMessages(other.federations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1.Federation m = + input.readMessage( + com.google.cloud.metastore.v1.Federation.parser(), + extensionRegistry); + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(m); + } else { + federationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List federations_ = + java.util.Collections.emptyList(); + private void ensureFederationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + federations_ = new java.util.ArrayList(federations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder> federationsBuilder_; + + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public java.util.List getFederationsList() { + if (federationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(federations_); + } else { + return federationsBuilder_.getMessageList(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public int getFederationsCount() { + if (federationsBuilder_ == null) { + return federations_.size(); + } else { + return federationsBuilder_.getCount(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public com.google.cloud.metastore.v1.Federation getFederations(int index) { + if (federationsBuilder_ == null) { + return federations_.get(index); + } else { + return federationsBuilder_.getMessage(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder setFederations( + int index, com.google.cloud.metastore.v1.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.set(index, value); + onChanged(); + } else { + federationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder setFederations( + int index, com.google.cloud.metastore.v1.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.set(index, builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder addFederations(com.google.cloud.metastore.v1.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.add(value); + onChanged(); + } else { + federationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder addFederations( + int index, com.google.cloud.metastore.v1.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.add(index, value); + onChanged(); + } else { + federationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder addFederations( + com.google.cloud.metastore.v1.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder addFederations( + int index, com.google.cloud.metastore.v1.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(index, builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder addAllFederations( + java.lang.Iterable values) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, federations_); + onChanged(); + } else { + federationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder clearFederations() { + if (federationsBuilder_ == null) { + federations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + federationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public Builder removeFederations(int index) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.remove(index); + onChanged(); + } else { + federationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public com.google.cloud.metastore.v1.Federation.Builder getFederationsBuilder( + int index) { + return getFederationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public com.google.cloud.metastore.v1.FederationOrBuilder getFederationsOrBuilder( + int index) { + if (federationsBuilder_ == null) { + return federations_.get(index); } else { + return federationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public java.util.List + getFederationsOrBuilderList() { + if (federationsBuilder_ != null) { + return federationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(federations_); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public com.google.cloud.metastore.v1.Federation.Builder addFederationsBuilder() { + return getFederationsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1.Federation.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public com.google.cloud.metastore.v1.Federation.Builder addFederationsBuilder( + int index) { + return getFederationsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1.Federation.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + public java.util.List + getFederationsBuilderList() { + return getFederationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder> + getFederationsFieldBuilder() { + if (federationsBuilder_ == null) { + federationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder>( + federations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + federations_ = null; + } + return federationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListFederationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListFederationsResponse) + private static final com.google.cloud.metastore.v1.ListFederationsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListFederationsResponse(); + } + + public static com.google.cloud.metastore.v1.ListFederationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFederationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListFederationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponseOrBuilder.java new file mode 100644 index 000000000000..0f7129ff9967 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListFederationsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public interface ListFederationsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListFederationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + java.util.List + getFederationsList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + com.google.cloud.metastore.v1.Federation getFederations(int index); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + int getFederationsCount(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + java.util.List + getFederationsOrBuilderList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Federation federations = 1; + */ + com.google.cloud.metastore.v1.FederationOrBuilder getFederationsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequest.java new file mode 100644 index 000000000000..b8fee5fcf796 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequest.java @@ -0,0 +1,1234 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListMetadataImportsRequest} + */ +public final class ListMetadataImportsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListMetadataImportsRequest) + ListMetadataImportsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListMetadataImportsRequest.newBuilder() to construct. + private ListMetadataImportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListMetadataImportsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListMetadataImportsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListMetadataImportsRequest.class, com.google.cloud.metastore.v1.ListMetadataImportsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of imports to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 imports are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ListMetadataImportsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ListMetadataImportsRequest other = (com.google.cloud.metastore.v1.ListMetadataImportsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ListMetadataImportsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListMetadataImportsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListMetadataImportsRequest) + com.google.cloud.metastore.v1.ListMetadataImportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListMetadataImportsRequest.class, com.google.cloud.metastore.v1.ListMetadataImportsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ListMetadataImportsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListMetadataImportsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ListMetadataImportsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListMetadataImportsRequest build() { + com.google.cloud.metastore.v1.ListMetadataImportsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListMetadataImportsRequest buildPartial() { + com.google.cloud.metastore.v1.ListMetadataImportsRequest result = new com.google.cloud.metastore.v1.ListMetadataImportsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ListMetadataImportsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ListMetadataImportsRequest) { + return mergeFrom((com.google.cloud.metastore.v1.ListMetadataImportsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ListMetadataImportsRequest other) { + if (other == com.google.cloud.metastore.v1.ListMetadataImportsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListMetadataImportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListMetadataImportsRequest) + private static final com.google.cloud.metastore.v1.ListMetadataImportsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListMetadataImportsRequest(); + } + + public static com.google.cloud.metastore.v1.ListMetadataImportsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMetadataImportsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListMetadataImportsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequestOrBuilder.java new file mode 100644 index 000000000000..2b995e38f680 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsRequestOrBuilder.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ListMetadataImportsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListMetadataImportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of imports to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 imports are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponse.java new file mode 100644 index 000000000000..3524eb609aca --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListMetadataImportsResponse} + */ +public final class ListMetadataImportsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListMetadataImportsResponse) + ListMetadataImportsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListMetadataImportsResponse.newBuilder() to construct. + private ListMetadataImportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListMetadataImportsResponse() { + metadataImports_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListMetadataImportsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListMetadataImportsResponse.class, com.google.cloud.metastore.v1.ListMetadataImportsResponse.Builder.class); + } + + public static final int METADATA_IMPORTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List metadataImports_; + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public java.util.List getMetadataImportsList() { + return metadataImports_; + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public java.util.List + getMetadataImportsOrBuilderList() { + return metadataImports_; + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public int getMetadataImportsCount() { + return metadataImports_.size(); + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport getMetadataImports(int index) { + return metadataImports_.get(index); + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index) { + return metadataImports_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < metadataImports_.size(); i++) { + output.writeMessage(1, metadataImports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < metadataImports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metadataImports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ListMetadataImportsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ListMetadataImportsResponse other = (com.google.cloud.metastore.v1.ListMetadataImportsResponse) obj; + + if (!getMetadataImportsList() + .equals(other.getMetadataImportsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMetadataImportsCount() > 0) { + hash = (37 * hash) + METADATA_IMPORTS_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImportsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ListMetadataImportsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListMetadataImportsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListMetadataImportsResponse) + com.google.cloud.metastore.v1.ListMetadataImportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListMetadataImportsResponse.class, com.google.cloud.metastore.v1.ListMetadataImportsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ListMetadataImportsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (metadataImportsBuilder_ == null) { + metadataImports_ = java.util.Collections.emptyList(); + } else { + metadataImports_ = null; + metadataImportsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListMetadataImportsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ListMetadataImportsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListMetadataImportsResponse build() { + com.google.cloud.metastore.v1.ListMetadataImportsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListMetadataImportsResponse buildPartial() { + com.google.cloud.metastore.v1.ListMetadataImportsResponse result = new com.google.cloud.metastore.v1.ListMetadataImportsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.ListMetadataImportsResponse result) { + if (metadataImportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metadataImports_ = java.util.Collections.unmodifiableList(metadataImports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metadataImports_ = metadataImports_; + } else { + result.metadataImports_ = metadataImportsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ListMetadataImportsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ListMetadataImportsResponse) { + return mergeFrom((com.google.cloud.metastore.v1.ListMetadataImportsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ListMetadataImportsResponse other) { + if (other == com.google.cloud.metastore.v1.ListMetadataImportsResponse.getDefaultInstance()) return this; + if (metadataImportsBuilder_ == null) { + if (!other.metadataImports_.isEmpty()) { + if (metadataImports_.isEmpty()) { + metadataImports_ = other.metadataImports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetadataImportsIsMutable(); + metadataImports_.addAll(other.metadataImports_); + } + onChanged(); + } + } else { + if (!other.metadataImports_.isEmpty()) { + if (metadataImportsBuilder_.isEmpty()) { + metadataImportsBuilder_.dispose(); + metadataImportsBuilder_ = null; + metadataImports_ = other.metadataImports_; + bitField0_ = (bitField0_ & ~0x00000001); + metadataImportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMetadataImportsFieldBuilder() : null; + } else { + metadataImportsBuilder_.addAllMessages(other.metadataImports_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1.MetadataImport m = + input.readMessage( + com.google.cloud.metastore.v1.MetadataImport.parser(), + extensionRegistry); + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(m); + } else { + metadataImportsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List metadataImports_ = + java.util.Collections.emptyList(); + private void ensureMetadataImportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metadataImports_ = new java.util.ArrayList(metadataImports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder> metadataImportsBuilder_; + + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public java.util.List getMetadataImportsList() { + if (metadataImportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metadataImports_); + } else { + return metadataImportsBuilder_.getMessageList(); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public int getMetadataImportsCount() { + if (metadataImportsBuilder_ == null) { + return metadataImports_.size(); + } else { + return metadataImportsBuilder_.getCount(); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1.MetadataImport getMetadataImports(int index) { + if (metadataImportsBuilder_ == null) { + return metadataImports_.get(index); + } else { + return metadataImportsBuilder_.getMessage(index); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder setMetadataImports( + int index, com.google.cloud.metastore.v1.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.set(index, value); + onChanged(); + } else { + metadataImportsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder setMetadataImports( + int index, com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.set(index, builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports(com.google.cloud.metastore.v1.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.add(value); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + int index, com.google.cloud.metastore.v1.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.add(index, value); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + int index, com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(index, builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder addAllMetadataImports( + java.lang.Iterable values) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metadataImports_); + onChanged(); + } else { + metadataImportsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder clearMetadataImports() { + if (metadataImportsBuilder_ == null) { + metadataImports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metadataImportsBuilder_.clear(); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public Builder removeMetadataImports(int index) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.remove(index); + onChanged(); + } else { + metadataImportsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1.MetadataImport.Builder getMetadataImportsBuilder( + int index) { + return getMetadataImportsFieldBuilder().getBuilder(index); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index) { + if (metadataImportsBuilder_ == null) { + return metadataImports_.get(index); } else { + return metadataImportsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public java.util.List + getMetadataImportsOrBuilderList() { + if (metadataImportsBuilder_ != null) { + return metadataImportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metadataImports_); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1.MetadataImport.Builder addMetadataImportsBuilder() { + return getMetadataImportsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1.MetadataImport.Builder addMetadataImportsBuilder( + int index) { + return getMetadataImportsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + public java.util.List + getMetadataImportsBuilderList() { + return getMetadataImportsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder> + getMetadataImportsFieldBuilder() { + if (metadataImportsBuilder_ == null) { + metadataImportsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder>( + metadataImports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + metadataImports_ = null; + } + return metadataImportsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListMetadataImportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListMetadataImportsResponse) + private static final com.google.cloud.metastore.v1.ListMetadataImportsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListMetadataImportsResponse(); + } + + public static com.google.cloud.metastore.v1.ListMetadataImportsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMetadataImportsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListMetadataImportsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponseOrBuilder.java new file mode 100644 index 000000000000..4de442028b2a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListMetadataImportsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ListMetadataImportsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListMetadataImportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + java.util.List + getMetadataImportsList(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + com.google.cloud.metastore.v1.MetadataImport getMetadataImports(int index); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + int getMetadataImportsCount(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + java.util.List + getMetadataImportsOrBuilderList(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataImport metadata_imports = 1; + */ + com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequest.java new file mode 100644 index 000000000000..78a509ad468e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequest.java @@ -0,0 +1,1238 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListServicesRequest} + */ +public final class ListServicesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListServicesRequest) + ListServicesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListServicesRequest.newBuilder() to construct. + private ListServicesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListServicesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListServicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListServicesRequest.class, com.google.cloud.metastore.v1.ListServicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of services to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ListServicesRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ListServicesRequest other = (com.google.cloud.metastore.v1.ListServicesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ListServicesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListServicesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListServicesRequest) + com.google.cloud.metastore.v1.ListServicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListServicesRequest.class, com.google.cloud.metastore.v1.ListServicesRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ListServicesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListServicesRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ListServicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListServicesRequest build() { + com.google.cloud.metastore.v1.ListServicesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListServicesRequest buildPartial() { + com.google.cloud.metastore.v1.ListServicesRequest result = new com.google.cloud.metastore.v1.ListServicesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ListServicesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ListServicesRequest) { + return mergeFrom((com.google.cloud.metastore.v1.ListServicesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ListServicesRequest other) { + if (other == com.google.cloud.metastore.v1.ListServicesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListServicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListServicesRequest) + private static final com.google.cloud.metastore.v1.ListServicesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListServicesRequest(); + } + + public static com.google.cloud.metastore.v1.ListServicesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListServicesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequestOrBuilder.java new file mode 100644 index 000000000000..c45616be1dcb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesRequestOrBuilder.java @@ -0,0 +1,122 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ListServicesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListServicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of services to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponse.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponse.java new file mode 100644 index 000000000000..799524aeb371 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListServicesResponse} + */ +public final class ListServicesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ListServicesResponse) + ListServicesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListServicesResponse.newBuilder() to construct. + private ListServicesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListServicesResponse() { + services_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListServicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListServicesResponse.class, com.google.cloud.metastore.v1.ListServicesResponse.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List services_; + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesList() { + return services_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + @java.lang.Override + public java.util.List + getServicesOrBuilderList() { + return services_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + @java.lang.Override + public int getServicesCount() { + return services_.size(); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Service getServices(int index) { + return services_.get(index); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.ServiceOrBuilder getServicesOrBuilder( + int index) { + return services_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < services_.size(); i++) { + output.writeMessage(1, services_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < services_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, services_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ListServicesResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ListServicesResponse other = (com.google.cloud.metastore.v1.ListServicesResponse) obj; + + if (!getServicesList() + .equals(other.getServicesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServicesCount() > 0) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServicesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ListServicesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ListServicesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ListServicesResponse) + com.google.cloud.metastore.v1.ListServicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ListServicesResponse.class, com.google.cloud.metastore.v1.ListServicesResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ListServicesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + } else { + services_ = null; + servicesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListServicesResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ListServicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListServicesResponse build() { + com.google.cloud.metastore.v1.ListServicesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListServicesResponse buildPartial() { + com.google.cloud.metastore.v1.ListServicesResponse result = new com.google.cloud.metastore.v1.ListServicesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.ListServicesResponse result) { + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.services_ = services_; + } else { + result.services_ = servicesBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ListServicesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ListServicesResponse) { + return mergeFrom((com.google.cloud.metastore.v1.ListServicesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ListServicesResponse other) { + if (other == com.google.cloud.metastore.v1.ListServicesResponse.getDefaultInstance()) return this; + if (servicesBuilder_ == null) { + if (!other.services_.isEmpty()) { + if (services_.isEmpty()) { + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServicesIsMutable(); + services_.addAll(other.services_); + } + onChanged(); + } + } else { + if (!other.services_.isEmpty()) { + if (servicesBuilder_.isEmpty()) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + servicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getServicesFieldBuilder() : null; + } else { + servicesBuilder_.addAllMessages(other.services_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1.Service m = + input.readMessage( + com.google.cloud.metastore.v1.Service.parser(), + extensionRegistry); + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(m); + } else { + servicesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List services_ = + java.util.Collections.emptyList(); + private void ensureServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + services_ = new java.util.ArrayList(services_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder> servicesBuilder_; + + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public java.util.List getServicesList() { + if (servicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(services_); + } else { + return servicesBuilder_.getMessageList(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public int getServicesCount() { + if (servicesBuilder_ == null) { + return services_.size(); + } else { + return servicesBuilder_.getCount(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public com.google.cloud.metastore.v1.Service getServices(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessage(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder setServices( + int index, com.google.cloud.metastore.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.set(index, value); + onChanged(); + } else { + servicesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder setServices( + int index, com.google.cloud.metastore.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.set(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder addServices(com.google.cloud.metastore.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(value); + onChanged(); + } else { + servicesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder addServices( + int index, com.google.cloud.metastore.v1.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(index, value); + onChanged(); + } else { + servicesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder addServices( + com.google.cloud.metastore.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder addServices( + int index, com.google.cloud.metastore.v1.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder addAllServices( + java.lang.Iterable values) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, services_); + onChanged(); + } else { + servicesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder clearServices() { + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servicesBuilder_.clear(); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public Builder removeServices(int index) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.remove(index); + onChanged(); + } else { + servicesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public com.google.cloud.metastore.v1.Service.Builder getServicesBuilder( + int index) { + return getServicesFieldBuilder().getBuilder(index); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public com.google.cloud.metastore.v1.ServiceOrBuilder getServicesOrBuilder( + int index) { + if (servicesBuilder_ == null) { + return services_.get(index); } else { + return servicesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public java.util.List + getServicesOrBuilderList() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(services_); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public com.google.cloud.metastore.v1.Service.Builder addServicesBuilder() { + return getServicesFieldBuilder().addBuilder( + com.google.cloud.metastore.v1.Service.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public com.google.cloud.metastore.v1.Service.Builder addServicesBuilder( + int index) { + return getServicesFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1.Service.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + public java.util.List + getServicesBuilderList() { + return getServicesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder> + getServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder>( + services_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + services_ = null; + } + return servicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ListServicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ListServicesResponse) + private static final com.google.cloud.metastore.v1.ListServicesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ListServicesResponse(); + } + + public static com.google.cloud.metastore.v1.ListServicesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ListServicesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponseOrBuilder.java new file mode 100644 index 000000000000..7ca01f0ae8c4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ListServicesResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ListServicesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ListServicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + java.util.List + getServicesList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + com.google.cloud.metastore.v1.Service getServices(int index); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + int getServicesCount(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + java.util.List + getServicesOrBuilderList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Service services = 1; + */ + com.google.cloud.metastore.v1.ServiceOrBuilder getServicesOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadata.java new file mode 100644 index 000000000000..55c16f5f1477 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadata.java @@ -0,0 +1,1605 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Metadata about the service in a location.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.LocationMetadata} + */ +public final class LocationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.LocationMetadata) + LocationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocationMetadata.newBuilder() to construct. + private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocationMetadata() { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.LocationMetadata.class, com.google.cloud.metastore.v1.LocationMetadata.Builder.class); + } + + public interface HiveMetastoreVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+     * Whether `version` will be chosen by the server if a metastore service is
+     * created with a `HiveMetastoreConfig` that omits the `version`.
+     * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + boolean getIsDefault(); + } + /** + *
+   * A specification of a supported version of the Hive Metastore software.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} + */ + public static final class HiveMetastoreVersion extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) + HiveMetastoreVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use HiveMetastoreVersion.newBuilder() to construct. + private HiveMetastoreVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HiveMetastoreVersion() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HiveMetastoreVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.class, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 2; + private boolean isDefault_ = false; + /** + *
+     * Whether `version` will be chosen by the server if a metastore service is
+     * created with a `HiveMetastoreConfig` that omits the `version`.
+     * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (isDefault_ != false) { + output.writeBool(2, isDefault_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isDefault_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion other = (com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (getIsDefault() + != other.getIsDefault()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsDefault()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A specification of a supported version of the Hive Metastore software.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.class, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + isDefault_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion build() { + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion buildPartial() { + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion result = new com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isDefault_ = isDefault_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) { + return mergeFrom((com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion other) { + if (other == com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + isDefault_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean isDefault_ ; + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000002); + isDefault_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion) + private static final com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion(); + } + + public static com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HiveMetastoreVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List supportedHiveMetastoreVersions_; + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public java.util.List getSupportedHiveMetastoreVersionsList() { + return supportedHiveMetastoreVersions_; + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList() { + return supportedHiveMetastoreVersions_; + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public int getSupportedHiveMetastoreVersionsCount() { + return supportedHiveMetastoreVersions_.size(); + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index) { + return supportedHiveMetastoreVersions_.get(index); + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index) { + return supportedHiveMetastoreVersions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { + output.writeMessage(1, supportedHiveMetastoreVersions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, supportedHiveMetastoreVersions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.LocationMetadata)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.LocationMetadata other = (com.google.cloud.metastore.v1.LocationMetadata) obj; + + if (!getSupportedHiveMetastoreVersionsList() + .equals(other.getSupportedHiveMetastoreVersionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSupportedHiveMetastoreVersionsCount() > 0) { + hash = (37 * hash) + SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedHiveMetastoreVersionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.LocationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata about the service in a location.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.LocationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.LocationMetadata) + com.google.cloud.metastore.v1.LocationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.LocationMetadata.class, com.google.cloud.metastore.v1.LocationMetadata.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.LocationMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + } else { + supportedHiveMetastoreVersions_ = null; + supportedHiveMetastoreVersionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_LocationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.LocationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata build() { + com.google.cloud.metastore.v1.LocationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata buildPartial() { + com.google.cloud.metastore.v1.LocationMetadata result = new com.google.cloud.metastore.v1.LocationMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.LocationMetadata result) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + supportedHiveMetastoreVersions_ = java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersions_; + } else { + result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1.LocationMetadata result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.LocationMetadata) { + return mergeFrom((com.google.cloud.metastore.v1.LocationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.LocationMetadata other) { + if (other == com.google.cloud.metastore.v1.LocationMetadata.getDefaultInstance()) return this; + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (!other.supportedHiveMetastoreVersions_.isEmpty()) { + if (supportedHiveMetastoreVersions_.isEmpty()) { + supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.addAll(other.supportedHiveMetastoreVersions_); + } + onChanged(); + } + } else { + if (!other.supportedHiveMetastoreVersions_.isEmpty()) { + if (supportedHiveMetastoreVersionsBuilder_.isEmpty()) { + supportedHiveMetastoreVersionsBuilder_.dispose(); + supportedHiveMetastoreVersionsBuilder_ = null; + supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + supportedHiveMetastoreVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSupportedHiveMetastoreVersionsFieldBuilder() : null; + } else { + supportedHiveMetastoreVersionsBuilder_.addAllMessages(other.supportedHiveMetastoreVersions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion m = + input.readMessage( + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.parser(), + extensionRegistry); + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(m); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List supportedHiveMetastoreVersions_ = + java.util.Collections.emptyList(); + private void ensureSupportedHiveMetastoreVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + supportedHiveMetastoreVersions_ = new java.util.ArrayList(supportedHiveMetastoreVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder> supportedHiveMetastoreVersionsBuilder_; + + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List getSupportedHiveMetastoreVersionsList() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + } else { + return supportedHiveMetastoreVersionsBuilder_.getMessageList(); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public int getSupportedHiveMetastoreVersionsCount() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.size(); + } else { + return supportedHiveMetastoreVersionsBuilder_.getCount(); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.get(index); + } else { + return supportedHiveMetastoreVersionsBuilder_.getMessage(index); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder setSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.set(index, value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder setSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions(com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(index, value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addAllSupportedHiveMetastoreVersions( + java.lang.Iterable values) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, supportedHiveMetastoreVersions_); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder clearSupportedHiveMetastoreVersions() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.clear(); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder removeSupportedHiveMetastoreVersions(int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.remove(index); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder getSupportedHiveMetastoreVersionsBuilder( + int index) { + return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilder(index); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.get(index); } else { + return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList() { + if (supportedHiveMetastoreVersionsBuilder_ != null) { + return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder addSupportedHiveMetastoreVersionsBuilder() { + return getSupportedHiveMetastoreVersionsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder addSupportedHiveMetastoreVersionsBuilder( + int index) { + return getSupportedHiveMetastoreVersionsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List + getSupportedHiveMetastoreVersionsBuilderList() { + return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder> + getSupportedHiveMetastoreVersionsFieldBuilder() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder>( + supportedHiveMetastoreVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + supportedHiveMetastoreVersions_ = null; + } + return supportedHiveMetastoreVersionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.LocationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.LocationMetadata) + private static final com.google.cloud.metastore.v1.LocationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.LocationMetadata(); + } + + public static com.google.cloud.metastore.v1.LocationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.LocationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadataOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadataOrBuilder.java new file mode 100644 index 000000000000..765cc6a13efa --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationMetadataOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface LocationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.LocationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + java.util.List + getSupportedHiveMetastoreVersionsList(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + int getSupportedHiveMetastoreVersionsCount(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + com.google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index); +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationName.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationName.java rename to owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/LocationName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindow.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindow.java new file mode 100644 index 000000000000..78dfd0821ec3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindow.java @@ -0,0 +1,769 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Maintenance window. This specifies when Dataproc Metastore
+ * may perform system maintenance operation to the service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MaintenanceWindow} + */ +public final class MaintenanceWindow extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MaintenanceWindow) + MaintenanceWindowOrBuilder { +private static final long serialVersionUID = 0L; + // Use MaintenanceWindow.newBuilder() to construct. + private MaintenanceWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MaintenanceWindow() { + dayOfWeek_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MaintenanceWindow(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MaintenanceWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MaintenanceWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MaintenanceWindow.class, com.google.cloud.metastore.v1.MaintenanceWindow.Builder.class); + } + + public static final int HOUR_OF_DAY_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value hourOfDay_; + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + @java.lang.Override + public boolean hasHourOfDay() { + return hourOfDay_ != null; + } + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getHourOfDay() { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + + public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; + private int dayOfWeek_ = 0; + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + @java.lang.Override public com.google.type.DayOfWeek getDayOfWeek() { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hourOfDay_ != null) { + output.writeMessage(1, getHourOfDay()); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + output.writeEnum(2, dayOfWeek_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hourOfDay_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHourOfDay()); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, dayOfWeek_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.MaintenanceWindow)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.MaintenanceWindow other = (com.google.cloud.metastore.v1.MaintenanceWindow) obj; + + if (hasHourOfDay() != other.hasHourOfDay()) return false; + if (hasHourOfDay()) { + if (!getHourOfDay() + .equals(other.getHourOfDay())) return false; + } + if (dayOfWeek_ != other.dayOfWeek_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHourOfDay()) { + hash = (37 * hash) + HOUR_OF_DAY_FIELD_NUMBER; + hash = (53 * hash) + getHourOfDay().hashCode(); + } + hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; + hash = (53 * hash) + dayOfWeek_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MaintenanceWindow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.MaintenanceWindow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Maintenance window. This specifies when Dataproc Metastore
+   * may perform system maintenance operation to the service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MaintenanceWindow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MaintenanceWindow) + com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MaintenanceWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MaintenanceWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MaintenanceWindow.class, com.google.cloud.metastore.v1.MaintenanceWindow.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.MaintenanceWindow.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hourOfDay_ = null; + if (hourOfDayBuilder_ != null) { + hourOfDayBuilder_.dispose(); + hourOfDayBuilder_ = null; + } + dayOfWeek_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MaintenanceWindow_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MaintenanceWindow getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MaintenanceWindow build() { + com.google.cloud.metastore.v1.MaintenanceWindow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MaintenanceWindow buildPartial() { + com.google.cloud.metastore.v1.MaintenanceWindow result = new com.google.cloud.metastore.v1.MaintenanceWindow(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.MaintenanceWindow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hourOfDay_ = hourOfDayBuilder_ == null + ? hourOfDay_ + : hourOfDayBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dayOfWeek_ = dayOfWeek_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.MaintenanceWindow) { + return mergeFrom((com.google.cloud.metastore.v1.MaintenanceWindow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.MaintenanceWindow other) { + if (other == com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance()) return this; + if (other.hasHourOfDay()) { + mergeHourOfDay(other.getHourOfDay()); + } + if (other.dayOfWeek_ != 0) { + setDayOfWeekValue(other.getDayOfWeekValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getHourOfDayFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + dayOfWeek_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value hourOfDay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> hourOfDayBuilder_; + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + public boolean hasHourOfDay() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + public com.google.protobuf.Int32Value getHourOfDay() { + if (hourOfDayBuilder_ == null) { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } else { + return hourOfDayBuilder_.getMessage(); + } + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder setHourOfDay(com.google.protobuf.Int32Value value) { + if (hourOfDayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hourOfDay_ = value; + } else { + hourOfDayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder setHourOfDay( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (hourOfDayBuilder_ == null) { + hourOfDay_ = builderForValue.build(); + } else { + hourOfDayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder mergeHourOfDay(com.google.protobuf.Int32Value value) { + if (hourOfDayBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + hourOfDay_ != null && + hourOfDay_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getHourOfDayBuilder().mergeFrom(value); + } else { + hourOfDay_ = value; + } + } else { + hourOfDayBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder clearHourOfDay() { + bitField0_ = (bitField0_ & ~0x00000001); + hourOfDay_ = null; + if (hourOfDayBuilder_ != null) { + hourOfDayBuilder_.dispose(); + hourOfDayBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public com.google.protobuf.Int32Value.Builder getHourOfDayBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHourOfDayFieldBuilder().getBuilder(); + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { + if (hourOfDayBuilder_ != null) { + return hourOfDayBuilder_.getMessageOrBuilder(); + } else { + return hourOfDay_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getHourOfDayFieldBuilder() { + if (hourOfDayBuilder_ == null) { + hourOfDayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getHourOfDay(), + getParentForChildren(), + isClean()); + hourOfDay_ = null; + } + return hourOfDayBuilder_; + } + + private int dayOfWeek_ = 0; + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @param value The enum numeric value on the wire for dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValue(int value) { + dayOfWeek_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDayOfWeek() { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @param value The dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeek(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dayOfWeek_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return This builder for chaining. + */ + public Builder clearDayOfWeek() { + bitField0_ = (bitField0_ & ~0x00000002); + dayOfWeek_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MaintenanceWindow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MaintenanceWindow) + private static final com.google.cloud.metastore.v1.MaintenanceWindow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MaintenanceWindow(); + } + + public static com.google.cloud.metastore.v1.MaintenanceWindow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaintenanceWindow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MaintenanceWindow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindowOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindowOrBuilder.java new file mode 100644 index 000000000000..4ef92c324d1c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MaintenanceWindowOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface MaintenanceWindowOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MaintenanceWindow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + boolean hasHourOfDay(); + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + com.google.protobuf.Int32Value getHourOfDay(); + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder(); + + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + int getDayOfWeekValue(); + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + com.google.type.DayOfWeek getDayOfWeek(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExport.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExport.java new file mode 100644 index 000000000000..599b4e175a73 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExport.java @@ -0,0 +1,1607 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * The details of a metadata export operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MetadataExport} + */ +public final class MetadataExport extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MetadataExport) + MetadataExportOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataExport.newBuilder() to construct. + private MetadataExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataExport() { + state_ = 0; + databaseDumpType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataExport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MetadataExport.class, com.google.cloud.metastore.v1.MetadataExport.Builder.class); + } + + /** + *
+   * The current state of the metadata export.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.MetadataExport.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata export is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata export is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata export completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata export failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The metadata export is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata export is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata export is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata export completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata export failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The metadata export is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetadataExport.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.MetadataExport.State) + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DESTINATION_GCS_URI(4), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 4: return DESTINATION_GCS_URI; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int DESTINATION_GCS_URI_FIELD_NUMBER = 4; + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + public boolean hasDestinationGcsUri() { + return destinationCase_ == 4; + } + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + public java.lang.String getDestinationGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 4) { + destination_ = s; + } + return s; + } + } + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + public com.google.protobuf.ByteString + getDestinationGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 4) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1.MetadataExport.State getState() { + com.google.cloud.metastore.v1.MetadataExport.State result = com.google.cloud.metastore.v1.MetadataExport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.MetadataExport.State.UNRECOGNIZED : result; + } + + public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 5; + private int databaseDumpType_ = 0; + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + @java.lang.Override public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (destinationCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destination_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, databaseDumpType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, state_); + } + if (destinationCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destination_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, databaseDumpType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.MetadataExport)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.MetadataExport other = (com.google.cloud.metastore.v1.MetadataExport) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (databaseDumpType_ != other.databaseDumpType_) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 4: + if (!getDestinationGcsUri() + .equals(other.getDestinationGcsUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseDumpType_; + switch (destinationCase_) { + case 4: + hash = (37 * hash) + DESTINATION_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationGcsUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.MetadataExport parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataExport parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataExport parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataExport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.MetadataExport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a metadata export operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MetadataExport} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MetadataExport) + com.google.cloud.metastore.v1.MetadataExportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MetadataExport.class, com.google.cloud.metastore.v1.MetadataExport.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.MetadataExport.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + databaseDumpType_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataExport_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataExport getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.MetadataExport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataExport build() { + com.google.cloud.metastore.v1.MetadataExport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataExport buildPartial() { + com.google.cloud.metastore.v1.MetadataExport result = new com.google.cloud.metastore.v1.MetadataExport(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.MetadataExport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.databaseDumpType_ = databaseDumpType_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1.MetadataExport result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.MetadataExport) { + return mergeFrom((com.google.cloud.metastore.v1.MetadataExport)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataExport other) { + if (other == com.google.cloud.metastore.v1.MetadataExport.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.databaseDumpType_ != 0) { + setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); + } + switch (other.getDestinationCase()) { + case DESTINATION_GCS_URI: { + destinationCase_ = 4; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 24: { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 4; + destination_ = s; + break; + } // case 34 + case 40: { + databaseDumpType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + @java.lang.Override + public boolean hasDestinationGcsUri() { + return destinationCase_ == 4; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + @java.lang.Override + public java.lang.String getDestinationGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 4) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 4) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The destinationGcsUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDestinationGcsUri() { + if (destinationCase_ == 4) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for destinationGcsUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataExport.State getState() { + com.google.cloud.metastore.v1.MetadataExport.State result = com.google.cloud.metastore.v1.MetadataExport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.MetadataExport.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1.MetadataExport.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private int databaseDumpType_ = 0; + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpTypeValue(int value) { + databaseDumpType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpType(com.google.cloud.metastore.v1.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + databaseDumpType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDatabaseDumpType() { + bitField0_ = (bitField0_ & ~0x00000010); + databaseDumpType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MetadataExport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MetadataExport) + private static final com.google.cloud.metastore.v1.MetadataExport DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MetadataExport(); + } + + public static com.google.cloud.metastore.v1.MetadataExport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataExport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataExport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExportOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExportOrBuilder.java new file mode 100644 index 000000000000..4be3620654fd --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataExportOrBuilder.java @@ -0,0 +1,141 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface MetadataExportOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MetadataExport) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + boolean hasDestinationGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + java.lang.String getDestinationGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + com.google.protobuf.ByteString + getDestinationGcsUriBytes(); + + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1.MetadataExport.State getState(); + + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + int getDatabaseDumpTypeValue(); + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getDatabaseDumpType(); + + public com.google.cloud.metastore.v1.MetadataExport.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImport.java new file mode 100644 index 000000000000..c5432042e408 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImport.java @@ -0,0 +1,3118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * A metastore resource that imports metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MetadataImport} + */ +public final class MetadataImport extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MetadataImport) + MetadataImportOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataImport.newBuilder() to construct. + private MetadataImport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataImport() { + name_ = ""; + description_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataImport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MetadataImport.class, com.google.cloud.metastore.v1.MetadataImport.Builder.class); + } + + /** + *
+   * The current state of the metadata import.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.MetadataImport.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata import is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata import is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata import completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata import is being updated.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + *
+     * The metadata import failed, and attempted metadata changes were rolled
+     * back.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata import is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata import is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata import completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata import is being updated.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + *
+     * The metadata import failed, and attempted metadata changes were rolled
+     * back.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return UPDATING; + case 4: return FAILED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetadataImport.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.MetadataImport.State) + } + + public interface DatabaseDumpOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MetadataImport.DatabaseDump) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Deprecated int getDatabaseTypeValue(); + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @return The databaseType. + */ + @java.lang.Deprecated com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType getDatabaseType(); + + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString + getGcsUriBytes(); + + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getType(); + } + /** + *
+   * A specification of the location of and metadata about a database dump from
+   * a relational database management system.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MetadataImport.DatabaseDump} + */ + public static final class DatabaseDump extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MetadataImport.DatabaseDump) + DatabaseDumpOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseDump.newBuilder() to construct. + private DatabaseDump(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DatabaseDump() { + databaseType_ = 0; + gcsUri_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DatabaseDump(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.class, com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder.class); + } + + /** + *
+     * The type of the database.
+     * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType} + */ + public enum DatabaseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * The type of the source database is unknown.
+       * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + DATABASE_TYPE_UNSPECIFIED(0), + /** + *
+       * The type of the source database is MySQL.
+       * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + UNRECOGNIZED(-1), + ; + + /** + *
+       * The type of the source database is unknown.
+       * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+       * The type of the source database is MySQL.
+       * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DatabaseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DatabaseType forNumber(int value) { + switch (value) { + case 0: return DATABASE_TYPE_UNSPECIFIED; + case 1: return MYSQL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DatabaseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseType findValueByNumber(int number) { + return DatabaseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDescriptor().getEnumTypes().get(0); + } + + private static final DatabaseType[] VALUES = values(); + + public static DatabaseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DatabaseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType) + } + + public static final int DATABASE_TYPE_FIELD_NUMBER = 1; + private int databaseType_ = 0; + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override @java.lang.Deprecated public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @return The databaseType. + */ + @java.lang.Override @java.lang.Deprecated public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType result = com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED : result; + } + + public static final int GCS_URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object gcsUri_ = ""; + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } + } + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 4; + private int type_ = 0; + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + @java.lang.Override public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getType() { + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (databaseType_ != com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, databaseType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsUri_); + } + if (type_ != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (databaseType_ != com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, databaseType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsUri_); + } + if (type_ != com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.MetadataImport.DatabaseDump)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump other = (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) obj; + + if (databaseType_ != other.databaseType_) return false; + if (!getGcsUri() + .equals(other.getGcsUri())) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseType_; + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.MetadataImport.DatabaseDump prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A specification of the location of and metadata about a database dump from
+     * a relational database management system.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MetadataImport.DatabaseDump} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MetadataImport.DatabaseDump) + com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.class, com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + databaseType_ = 0; + gcsUri_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump build() { + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump buildPartial() { + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump result = new com.google.cloud.metastore.v1.MetadataImport.DatabaseDump(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.MetadataImport.DatabaseDump result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.databaseType_ = databaseType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gcsUri_ = gcsUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) { + return mergeFrom((com.google.cloud.metastore.v1.MetadataImport.DatabaseDump)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataImport.DatabaseDump other) { + if (other == com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance()) return this; + if (other.databaseType_ != 0) { + setDatabaseTypeValue(other.getDatabaseTypeValue()); + } + if (!other.getGcsUri().isEmpty()) { + gcsUri_ = other.gcsUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + databaseType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + gcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 32: { + type_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int databaseType_ = 0; + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override @java.lang.Deprecated public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @param value The enum numeric value on the wire for databaseType to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setDatabaseTypeValue(int value) { + databaseType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @return The databaseType. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType result = com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED : result; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @param value The databaseType to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setDatabaseType(com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + databaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1/metastore.proto;l=588 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearDatabaseType() { + bitField0_ = (bitField0_ & ~0x00000001); + databaseType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object gcsUri_ = ""; + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString + getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gcsUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + gcsUri_ = getDefaultInstance().getGcsUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gcsUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.DatabaseDumpSpec.Type getType() { + com.google.cloud.metastore.v1.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.metastore.v1.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000004); + type_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MetadataImport.DatabaseDump) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MetadataImport.DatabaseDump) + private static final com.google.cloud.metastore.v1.MetadataImport.DatabaseDump DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MetadataImport.DatabaseDump(); + } + + public static com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseDump parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int metadataCase_ = 0; + private java.lang.Object metadata_; + public enum MetadataCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATABASE_DUMP(6), + METADATA_NOT_SET(0); + private final int value; + private MetadataCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetadataCase valueOf(int value) { + return forNumber(value); + } + + public static MetadataCase forNumber(int value) { + switch (value) { + case 6: return DATABASE_DUMP; + case 0: return METADATA_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public MetadataCase + getMetadataCase() { + return MetadataCase.forNumber( + metadataCase_); + } + + public static final int DATABASE_DUMP_FIELD_NUMBER = 6; + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + @java.lang.Override + public boolean hasDatabaseDump() { + return metadataCase_ == 6; + } + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDatabaseDump() { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); + } + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder() { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1.MetadataImport.State getState() { + com.google.cloud.metastore.v1.MetadataImport.State result = com.google.cloud.metastore.v1.MetadataImport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.MetadataImport.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (state_ != com.google.cloud.metastore.v1.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (metadataCase_ == 6) { + output.writeMessage(6, (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_); + } + if (endTime_ != null) { + output.writeMessage(7, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getUpdateTime()); + } + if (state_ != com.google.cloud.metastore.v1.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, state_); + } + if (metadataCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.MetadataImport)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.MetadataImport other = (com.google.cloud.metastore.v1.MetadataImport) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (!getMetadataCase().equals(other.getMetadataCase())) return false; + switch (metadataCase_) { + case 6: + if (!getDatabaseDump() + .equals(other.getDatabaseDump())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (metadataCase_) { + case 6: + hash = (37 * hash) + DATABASE_DUMP_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseDump().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.MetadataImport parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataImport parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataImport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.MetadataImport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A metastore resource that imports metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MetadataImport} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MetadataImport) + com.google.cloud.metastore.v1.MetadataImportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MetadataImport.class, com.google.cloud.metastore.v1.MetadataImport.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.MetadataImport.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (databaseDumpBuilder_ != null) { + databaseDumpBuilder_.clear(); + } + name_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + metadataCase_ = 0; + metadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataImport_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport build() { + com.google.cloud.metastore.v1.MetadataImport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport buildPartial() { + com.google.cloud.metastore.v1.MetadataImport result = new com.google.cloud.metastore.v1.MetadataImport(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.MetadataImport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1.MetadataImport result) { + result.metadataCase_ = metadataCase_; + result.metadata_ = this.metadata_; + if (metadataCase_ == 6 && + databaseDumpBuilder_ != null) { + result.metadata_ = databaseDumpBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.MetadataImport) { + return mergeFrom((com.google.cloud.metastore.v1.MetadataImport)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataImport other) { + if (other == com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getMetadataCase()) { + case DATABASE_DUMP: { + mergeDatabaseDump(other.getDatabaseDump()); + break; + } + case METADATA_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 40 + case 50: { + input.readMessage( + getDatabaseDumpFieldBuilder().getBuilder(), + extensionRegistry); + metadataCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int metadataCase_ = 0; + private java.lang.Object metadata_; + public MetadataCase + getMetadataCase() { + return MetadataCase.forNumber( + metadataCase_); + } + + public Builder clearMetadata() { + metadataCase_ = 0; + metadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder> databaseDumpBuilder_; + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + @java.lang.Override + public boolean hasDatabaseDump() { + return metadataCase_ == 6; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDatabaseDump() { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); + } else { + if (metadataCase_ == 6) { + return databaseDumpBuilder_.getMessage(); + } + return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); + } + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setDatabaseDump(com.google.cloud.metastore.v1.MetadataImport.DatabaseDump value) { + if (databaseDumpBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + databaseDumpBuilder_.setMessage(value); + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setDatabaseDump( + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder builderForValue) { + if (databaseDumpBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + databaseDumpBuilder_.setMessage(builderForValue.build()); + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder mergeDatabaseDump(com.google.cloud.metastore.v1.MetadataImport.DatabaseDump value) { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6 && + metadata_ != com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance()) { + metadata_ = com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.newBuilder((com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_) + .mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + if (metadataCase_ == 6) { + databaseDumpBuilder_.mergeFrom(value); + } else { + databaseDumpBuilder_.setMessage(value); + } + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearDatabaseDump() { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6) { + metadataCase_ = 0; + metadata_ = null; + onChanged(); + } + } else { + if (metadataCase_ == 6) { + metadataCase_ = 0; + metadata_ = null; + } + databaseDumpBuilder_.clear(); + } + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder getDatabaseDumpBuilder() { + return getDatabaseDumpFieldBuilder().getBuilder(); + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder() { + if ((metadataCase_ == 6) && (databaseDumpBuilder_ != null)) { + return databaseDumpBuilder_.getMessageOrBuilder(); + } else { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); + } + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder> + getDatabaseDumpFieldBuilder() { + if (databaseDumpBuilder_ == null) { + if (!(metadataCase_ == 6)) { + metadata_ = com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.getDefaultInstance(); + } + databaseDumpBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder>( + (com.google.cloud.metastore.v1.MetadataImport.DatabaseDump) metadata_, + getParentForChildren(), + isClean()); + metadata_ = null; + } + metadataCase_ = 6; + onChanged(); + return databaseDumpBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000020); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport.State getState() { + com.google.cloud.metastore.v1.MetadataImport.State result = com.google.cloud.metastore.v1.MetadataImport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.MetadataImport.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1.MetadataImport.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MetadataImport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MetadataImport) + private static final com.google.cloud.metastore.v1.MetadataImport DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MetadataImport(); + } + + public static com.google.cloud.metastore.v1.MetadataImport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataImport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportName.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportName.java rename to owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportOrBuilder.java new file mode 100644 index 000000000000..ed5b6e5f9eb8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataImportOrBuilder.java @@ -0,0 +1,180 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface MetadataImportOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MetadataImport) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + boolean hasDatabaseDump(); + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + com.google.cloud.metastore.v1.MetadataImport.DatabaseDump getDatabaseDump(); + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder(); + + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1.MetadataImport.State getState(); + + public com.google.cloud.metastore.v1.MetadataImport.MetadataCase getMetadataCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivity.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivity.java new file mode 100644 index 000000000000..9dc11e512b93 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivity.java @@ -0,0 +1,1304 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * The metadata management activities of the metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MetadataManagementActivity} + */ +public final class MetadataManagementActivity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.MetadataManagementActivity) + MetadataManagementActivityOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataManagementActivity.newBuilder() to construct. + private MetadataManagementActivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataManagementActivity() { + metadataExports_ = java.util.Collections.emptyList(); + restores_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataManagementActivity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataManagementActivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MetadataManagementActivity.class, com.google.cloud.metastore.v1.MetadataManagementActivity.Builder.class); + } + + public static final int METADATA_EXPORTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List metadataExports_; + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getMetadataExportsList() { + return metadataExports_; + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getMetadataExportsOrBuilderList() { + return metadataExports_; + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getMetadataExportsCount() { + return metadataExports_.size(); + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataExport getMetadataExports(int index) { + return metadataExports_.get(index); + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index) { + return metadataExports_.get(index); + } + + public static final int RESTORES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List restores_; + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getRestoresList() { + return restores_; + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getRestoresOrBuilderList() { + return restores_; + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getRestoresCount() { + return restores_.size(); + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Restore getRestores(int index) { + return restores_.get(index); + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.RestoreOrBuilder getRestoresOrBuilder( + int index) { + return restores_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < metadataExports_.size(); i++) { + output.writeMessage(1, metadataExports_.get(i)); + } + for (int i = 0; i < restores_.size(); i++) { + output.writeMessage(2, restores_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < metadataExports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metadataExports_.get(i)); + } + for (int i = 0; i < restores_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, restores_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.MetadataManagementActivity)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.MetadataManagementActivity other = (com.google.cloud.metastore.v1.MetadataManagementActivity) obj; + + if (!getMetadataExportsList() + .equals(other.getMetadataExportsList())) return false; + if (!getRestoresList() + .equals(other.getRestoresList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMetadataExportsCount() > 0) { + hash = (37 * hash) + METADATA_EXPORTS_FIELD_NUMBER; + hash = (53 * hash) + getMetadataExportsList().hashCode(); + } + if (getRestoresCount() > 0) { + hash = (37 * hash) + RESTORES_FIELD_NUMBER; + hash = (53 * hash) + getRestoresList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.MetadataManagementActivity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.MetadataManagementActivity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The metadata management activities of the metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MetadataManagementActivity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MetadataManagementActivity) + com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataManagementActivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MetadataManagementActivity.class, com.google.cloud.metastore.v1.MetadataManagementActivity.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.MetadataManagementActivity.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (metadataExportsBuilder_ == null) { + metadataExports_ = java.util.Collections.emptyList(); + } else { + metadataExports_ = null; + metadataExportsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (restoresBuilder_ == null) { + restores_ = java.util.Collections.emptyList(); + } else { + restores_ = null; + restoresBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataManagementActivity getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataManagementActivity build() { + com.google.cloud.metastore.v1.MetadataManagementActivity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataManagementActivity buildPartial() { + com.google.cloud.metastore.v1.MetadataManagementActivity result = new com.google.cloud.metastore.v1.MetadataManagementActivity(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.MetadataManagementActivity result) { + if (metadataExportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metadataExports_ = java.util.Collections.unmodifiableList(metadataExports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metadataExports_ = metadataExports_; + } else { + result.metadataExports_ = metadataExportsBuilder_.build(); + } + if (restoresBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + restores_ = java.util.Collections.unmodifiableList(restores_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.restores_ = restores_; + } else { + result.restores_ = restoresBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1.MetadataManagementActivity result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.MetadataManagementActivity) { + return mergeFrom((com.google.cloud.metastore.v1.MetadataManagementActivity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataManagementActivity other) { + if (other == com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance()) return this; + if (metadataExportsBuilder_ == null) { + if (!other.metadataExports_.isEmpty()) { + if (metadataExports_.isEmpty()) { + metadataExports_ = other.metadataExports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetadataExportsIsMutable(); + metadataExports_.addAll(other.metadataExports_); + } + onChanged(); + } + } else { + if (!other.metadataExports_.isEmpty()) { + if (metadataExportsBuilder_.isEmpty()) { + metadataExportsBuilder_.dispose(); + metadataExportsBuilder_ = null; + metadataExports_ = other.metadataExports_; + bitField0_ = (bitField0_ & ~0x00000001); + metadataExportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMetadataExportsFieldBuilder() : null; + } else { + metadataExportsBuilder_.addAllMessages(other.metadataExports_); + } + } + } + if (restoresBuilder_ == null) { + if (!other.restores_.isEmpty()) { + if (restores_.isEmpty()) { + restores_ = other.restores_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRestoresIsMutable(); + restores_.addAll(other.restores_); + } + onChanged(); + } + } else { + if (!other.restores_.isEmpty()) { + if (restoresBuilder_.isEmpty()) { + restoresBuilder_.dispose(); + restoresBuilder_ = null; + restores_ = other.restores_; + bitField0_ = (bitField0_ & ~0x00000002); + restoresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRestoresFieldBuilder() : null; + } else { + restoresBuilder_.addAllMessages(other.restores_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1.MetadataExport m = + input.readMessage( + com.google.cloud.metastore.v1.MetadataExport.parser(), + extensionRegistry); + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(m); + } else { + metadataExportsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.google.cloud.metastore.v1.Restore m = + input.readMessage( + com.google.cloud.metastore.v1.Restore.parser(), + extensionRegistry); + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(m); + } else { + restoresBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List metadataExports_ = + java.util.Collections.emptyList(); + private void ensureMetadataExportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metadataExports_ = new java.util.ArrayList(metadataExports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataExport, com.google.cloud.metastore.v1.MetadataExport.Builder, com.google.cloud.metastore.v1.MetadataExportOrBuilder> metadataExportsBuilder_; + + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getMetadataExportsList() { + if (metadataExportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metadataExports_); + } else { + return metadataExportsBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getMetadataExportsCount() { + if (metadataExportsBuilder_ == null) { + return metadataExports_.size(); + } else { + return metadataExportsBuilder_.getCount(); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.MetadataExport getMetadataExports(int index) { + if (metadataExportsBuilder_ == null) { + return metadataExports_.get(index); + } else { + return metadataExportsBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataExports( + int index, com.google.cloud.metastore.v1.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.set(index, value); + onChanged(); + } else { + metadataExportsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataExports( + int index, com.google.cloud.metastore.v1.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.set(index, builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports(com.google.cloud.metastore.v1.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.add(value); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + int index, com.google.cloud.metastore.v1.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.add(index, value); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + com.google.cloud.metastore.v1.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + int index, com.google.cloud.metastore.v1.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(index, builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllMetadataExports( + java.lang.Iterable values) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metadataExports_); + onChanged(); + } else { + metadataExportsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearMetadataExports() { + if (metadataExportsBuilder_ == null) { + metadataExports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metadataExportsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeMetadataExports(int index) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.remove(index); + onChanged(); + } else { + metadataExportsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.MetadataExport.Builder getMetadataExportsBuilder( + int index) { + return getMetadataExportsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index) { + if (metadataExportsBuilder_ == null) { + return metadataExports_.get(index); } else { + return metadataExportsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getMetadataExportsOrBuilderList() { + if (metadataExportsBuilder_ != null) { + return metadataExportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metadataExports_); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.MetadataExport.Builder addMetadataExportsBuilder() { + return getMetadataExportsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1.MetadataExport.getDefaultInstance()); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.MetadataExport.Builder addMetadataExportsBuilder( + int index) { + return getMetadataExportsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1.MetadataExport.getDefaultInstance()); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getMetadataExportsBuilderList() { + return getMetadataExportsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataExport, com.google.cloud.metastore.v1.MetadataExport.Builder, com.google.cloud.metastore.v1.MetadataExportOrBuilder> + getMetadataExportsFieldBuilder() { + if (metadataExportsBuilder_ == null) { + metadataExportsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataExport, com.google.cloud.metastore.v1.MetadataExport.Builder, com.google.cloud.metastore.v1.MetadataExportOrBuilder>( + metadataExports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + metadataExports_ = null; + } + return metadataExportsBuilder_; + } + + private java.util.List restores_ = + java.util.Collections.emptyList(); + private void ensureRestoresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + restores_ = new java.util.ArrayList(restores_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Restore, com.google.cloud.metastore.v1.Restore.Builder, com.google.cloud.metastore.v1.RestoreOrBuilder> restoresBuilder_; + + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getRestoresList() { + if (restoresBuilder_ == null) { + return java.util.Collections.unmodifiableList(restores_); + } else { + return restoresBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getRestoresCount() { + if (restoresBuilder_ == null) { + return restores_.size(); + } else { + return restoresBuilder_.getCount(); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.Restore getRestores(int index) { + if (restoresBuilder_ == null) { + return restores_.get(index); + } else { + return restoresBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRestores( + int index, com.google.cloud.metastore.v1.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.set(index, value); + onChanged(); + } else { + restoresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRestores( + int index, com.google.cloud.metastore.v1.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.set(index, builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores(com.google.cloud.metastore.v1.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.add(value); + onChanged(); + } else { + restoresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + int index, com.google.cloud.metastore.v1.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.add(index, value); + onChanged(); + } else { + restoresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + com.google.cloud.metastore.v1.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + int index, com.google.cloud.metastore.v1.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(index, builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllRestores( + java.lang.Iterable values) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, restores_); + onChanged(); + } else { + restoresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearRestores() { + if (restoresBuilder_ == null) { + restores_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + restoresBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeRestores(int index) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.remove(index); + onChanged(); + } else { + restoresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.Restore.Builder getRestoresBuilder( + int index) { + return getRestoresFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.RestoreOrBuilder getRestoresOrBuilder( + int index) { + if (restoresBuilder_ == null) { + return restores_.get(index); } else { + return restoresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getRestoresOrBuilderList() { + if (restoresBuilder_ != null) { + return restoresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(restores_); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.Restore.Builder addRestoresBuilder() { + return getRestoresFieldBuilder().addBuilder( + com.google.cloud.metastore.v1.Restore.getDefaultInstance()); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.Restore.Builder addRestoresBuilder( + int index) { + return getRestoresFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1.Restore.getDefaultInstance()); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getRestoresBuilderList() { + return getRestoresFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Restore, com.google.cloud.metastore.v1.Restore.Builder, com.google.cloud.metastore.v1.RestoreOrBuilder> + getRestoresFieldBuilder() { + if (restoresBuilder_ == null) { + restoresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.Restore, com.google.cloud.metastore.v1.Restore.Builder, com.google.cloud.metastore.v1.RestoreOrBuilder>( + restores_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + restores_ = null; + } + return restoresBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.MetadataManagementActivity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MetadataManagementActivity) + private static final com.google.cloud.metastore.v1.MetadataManagementActivity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MetadataManagementActivity(); + } + + public static com.google.cloud.metastore.v1.MetadataManagementActivity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataManagementActivity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataManagementActivity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivityOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivityOrBuilder.java new file mode 100644 index 000000000000..a143799b9811 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetadataManagementActivityOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface MetadataManagementActivityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MetadataManagementActivity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getMetadataExportsList(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1.MetadataExport getMetadataExports(int index); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getMetadataExportsCount(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getMetadataExportsOrBuilderList(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index); + + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getRestoresList(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1.Restore getRestores(int index); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getRestoresCount(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getRestoresOrBuilderList(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1.RestoreOrBuilder getRestoresOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreFederationProto.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreFederationProto.java new file mode 100644 index 000000000000..03bbdb4d3ecd --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreFederationProto.java @@ -0,0 +1,265 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public final class MetastoreFederationProto { + private MetastoreFederationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_Federation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_Federation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_BackendMetastore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ListFederationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ListFederationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_GetFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_CreateFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_UpdateFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_DeleteFederationRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/metastore/v1/metastore_fe" + + "deration.proto\022\031google.cloud.metastore.v" + + "1\032\034google/api/annotations.proto\032\027google/" + + "api/client.proto\032\037google/api/field_behav" + + "ior.proto\032\031google/api/resource.proto\032)go" + + "ogle/cloud/metastore/v1/metastore.proto\032" + + "#google/longrunning/operations.proto\032\033go" + + "ogle/protobuf/empty.proto\032 google/protob" + + "uf/field_mask.proto\032\037google/protobuf/tim" + + "estamp.proto\"\253\006\n\nFederation\022\021\n\004name\030\001 \001(" + + "\tB\003\340A\005\0224\n\013create_time\030\002 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\0224\n\013update_time\030\003 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\022A\n\006la" + + "bels\030\004 \003(\01321.google.cloud.metastore.v1.F" + + "ederation.LabelsEntry\022\024\n\007version\030\005 \001(\tB\003" + + "\340A\005\022X\n\022backend_metastores\030\006 \003(\0132<.google" + + ".cloud.metastore.v1.Federation.BackendMe" + + "tastoresEntry\022\031\n\014endpoint_uri\030\007 \001(\tB\003\340A\003" + + "\022?\n\005state\030\010 \001(\0162+.google.cloud.metastore" + + ".v1.Federation.StateB\003\340A\003\022\032\n\rstate_messa" + + "ge\030\t \001(\tB\003\340A\003\022\020\n\003uid\030\n \001(\tB\003\340A\003\032-\n\013Label" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032e" + + "\n\026BackendMetastoresEntry\022\013\n\003key\030\001 \001(\005\022:\n" + + "\005value\030\002 \001(\0132+.google.cloud.metastore.v1" + + ".BackendMetastore:\0028\001\"_\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022" + + "\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\t\n\005ERROR\020\005:j" + + "\352Ag\n#metastore.googleapis.com/Federation" + + "\022@projects/{project}/locations/{location" + + "}/federations/{federation}\"\274\001\n\020BackendMe" + + "tastore\022\014\n\004name\030\001 \001(\t\022Q\n\016metastore_type\030" + + "\002 \001(\01629.google.cloud.metastore.v1.Backen" + + "dMetastore.MetastoreType\"G\n\rMetastoreTyp" + + "e\022\036\n\032METASTORE_TYPE_UNSPECIFIED\020\000\022\026\n\022DAT" + + "APROC_METASTORE\020\003\"\262\001\n\026ListFederationsReq" + + "uest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#metastore." + + "googleapis.com/Federation\022\026\n\tpage_size\030\002" + + " \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006fi" + + "lter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\203" + + "\001\n\027ListFederationsResponse\022:\n\013federation" + + "s\030\001 \003(\0132%.google.cloud.metastore.v1.Fede" + + "ration\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unrea" + + "chable\030\003 \003(\t\"Q\n\024GetFederationRequest\0229\n\004" + + "name\030\001 \001(\tB+\340A\002\372A%\n#metastore.googleapis" + + ".com/Federation\"\313\001\n\027CreateFederationRequ" + + "est\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#metastore.g" + + "oogleapis.com/Federation\022\032\n\rfederation_i" + + "d\030\002 \001(\tB\003\340A\002\022>\n\nfederation\030\003 \001(\0132%.googl" + + "e.cloud.metastore.v1.FederationB\003\340A\002\022\027\n\n" + + "request_id\030\004 \001(\tB\003\340A\001\"\250\001\n\027UpdateFederati" + + "onRequest\0224\n\013update_mask\030\001 \001(\0132\032.google." + + "protobuf.FieldMaskB\003\340A\002\022>\n\nfederation\030\002 " + + "\001(\0132%.google.cloud.metastore.v1.Federati" + + "onB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"m\n\027Dele" + + "teFederationRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A" + + "%\n#metastore.googleapis.com/Federation\022\027" + + "\n\nrequest_id\030\002 \001(\tB\003\340A\0012\334\t\n\033DataprocMeta" + + "storeFederation\022\272\001\n\017ListFederations\0221.go" + + "ogle.cloud.metastore.v1.ListFederationsR" + + "equest\0322.google.cloud.metastore.v1.ListF" + + "ederationsResponse\"@\202\323\344\223\0021\022//v1/{parent=" + + "projects/*/locations/*}/federations\332A\006pa" + + "rent\022\247\001\n\rGetFederation\022/.google.cloud.me" + + "tastore.v1.GetFederationRequest\032%.google" + + ".cloud.metastore.v1.Federation\">\202\323\344\223\0021\022/" + + "/v1/{name=projects/*/locations/*/federat" + + "ions/*}\332A\004name\022\211\002\n\020CreateFederation\0222.go" + + "ogle.cloud.metastore.v1.CreateFederation" + + "Request\032\035.google.longrunning.Operation\"\241" + + "\001\202\323\344\223\002=\"//v1/{parent=projects/*/location" + + "s/*}/federations:\nfederation\332A\037parent,fe" + + "deration,federation_id\312A9\n\nFederation\022+g" + + "oogle.cloud.metastore.v1.OperationMetada" + + "ta\022\213\002\n\020UpdateFederation\0222.google.cloud.m" + + "etastore.v1.UpdateFederationRequest\032\035.go" + + "ogle.longrunning.Operation\"\243\001\202\323\344\223\002H2:/v1" + + "/{federation.name=projects/*/locations/*" + + "/federations/*}:\nfederation\332A\026federation" + + ",update_mask\312A9\n\nFederation\022+google.clou" + + "d.metastore.v1.OperationMetadata\022\355\001\n\020Del" + + "eteFederation\0222.google.cloud.metastore.v" + + "1.DeleteFederationRequest\032\035.google.longr" + + "unning.Operation\"\205\001\202\323\344\223\0021*//v1/{name=pro" + + "jects/*/locations/*/federations/*}\332A\004nam" + + "e\312AD\n\025google.protobuf.Empty\022+google.clou" + + "d.metastore.v1.OperationMetadata\032L\312A\030met" + + "astore.googleapis.com\322A.https://www.goog" + + "leapis.com/auth/cloud-platformBx\n\035com.go" + + "ogle.cloud.metastore.v1B\030MetastoreFedera" + + "tionProtoP\001Z;cloud.google.com/go/metasto" + + "re/apiv1/metastorepb;metastorepbb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.metastore.v1.MetastoreProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_metastore_v1_Federation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_metastore_v1_Federation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_Federation_descriptor, + new java.lang.String[] { "Name", "CreateTime", "UpdateTime", "Labels", "Version", "BackendMetastores", "EndpointUri", "State", "StateMessage", "Uid", }); + internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_descriptor = + internal_static_google_cloud_metastore_v1_Federation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_Federation_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_descriptor = + internal_static_google_cloud_metastore_v1_Federation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_Federation_BackendMetastoresEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_metastore_v1_BackendMetastore_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_BackendMetastore_descriptor, + new java.lang.String[] { "Name", "MetastoreType", }); + internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_metastore_v1_ListFederationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_ListFederationsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); + internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_metastore_v1_ListFederationsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_ListFederationsResponse_descriptor, + new java.lang.String[] { "Federations", "NextPageToken", "Unreachable", }); + internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_metastore_v1_GetFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_GetFederationRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_metastore_v1_CreateFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_CreateFederationRequest_descriptor, + new java.lang.String[] { "Parent", "FederationId", "Federation", "RequestId", }); + internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_metastore_v1_UpdateFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor, + new java.lang.String[] { "UpdateMask", "Federation", "RequestId", }); + internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_metastore_v1_DeleteFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1_DeleteFederationRequest_descriptor, + new java.lang.String[] { "Name", "RequestId", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.metastore.v1.MetastoreProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreProto.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreProto.java new file mode 100644 index 000000000000..9d0711ad1eaa --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MetastoreProto.java @@ -0,0 +1,878 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public final class MetastoreProto { + private MetastoreProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_Service_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_Service_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_Service_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_Service_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_MaintenanceWindow_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_MaintenanceWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_ConfigOverridesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_ConfigOverridesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_HiveMetastoreConfig_AuxiliaryVersionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_KerberosConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_KerberosConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_Secret_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_Secret_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_EncryptionConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_AuxiliaryVersionConfig_ConfigOverridesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_NetworkConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_TelemetryConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_TelemetryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_MetadataManagementActivity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_MetadataManagementActivity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_MetadataImport_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_MetadataImport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_MetadataImport_DatabaseDump_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_MetadataExport_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_MetadataExport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_Backup_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_Backup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_Restore_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_Restore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ScalingConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ScalingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ListServicesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ListServicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ListServicesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ListServicesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_GetServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_GetServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_CreateServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_CreateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_UpdateServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_UpdateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_DeleteServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_DeleteServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ListMetadataImportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ListMetadataImportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_GetMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_CreateMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ListBackupsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ListBackupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ListBackupsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ListBackupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_GetBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_GetBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_CreateBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_CreateBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_DeleteBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_DeleteBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ExportMetadataRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ExportMetadataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_RestoreServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_RestoreServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_LocationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_LocationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/metastore/v1/metastore.pr" + + "oto\022\031google.cloud.metastore.v1\032\034google/a" + + "pi/annotations.proto\032\027google/api/client." + + "proto\032\037google/api/field_behavior.proto\032\031" + + "google/api/resource.proto\032#google/longru" + + "nning/operations.proto\032\033google/protobuf/" + + "empty.proto\032 google/protobuf/field_mask." + + "proto\032\037google/protobuf/timestamp.proto\032\036" + + "google/protobuf/wrappers.proto\032\033google/t" + + "ype/dayofweek.proto\"\223\r\n\007Service\022O\n\025hive_" + + "metastore_config\030\005 \001(\0132..google.cloud.me" + + "tastore.v1.HiveMetastoreConfigH\000\022\021\n\004name" + + "\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030\002 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\0224\n\013update_time" + + "\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + ">\n\006labels\030\004 \003(\0132..google.cloud.metastore" + + ".v1.Service.LabelsEntry\0227\n\007network\030\007 \001(\t" + + "B&\340A\005\372A \n\036compute.googleapis.com/Network" + + "\022\031\n\014endpoint_uri\030\010 \001(\tB\003\340A\003\022\014\n\004port\030\t \001(" + + "\005\022<\n\005state\030\n \001(\0162(.google.cloud.metastor" + + "e.v1.Service.StateB\003\340A\003\022\032\n\rstate_message" + + "\030\013 \001(\tB\003\340A\003\022\035\n\020artifact_gcs_uri\030\014 \001(\tB\003\340" + + "A\003\0225\n\004tier\030\r \001(\0162\'.google.cloud.metastor" + + "e.v1.Service.Tier\022H\n\022maintenance_window\030" + + "\017 \001(\0132,.google.cloud.metastore.v1.Mainte" + + "nanceWindow\022\020\n\003uid\030\020 \001(\tB\003\340A\003\022`\n\034metadat" + + "a_management_activity\030\021 \001(\01325.google.clo" + + "ud.metastore.v1.MetadataManagementActivi" + + "tyB\003\340A\003\022O\n\017release_channel\030\023 \001(\01621.googl" + + "e.cloud.metastore.v1.Service.ReleaseChan" + + "nelB\003\340A\005\022K\n\021encryption_config\030\024 \001(\0132+.go" + + "ogle.cloud.metastore.v1.EncryptionConfig" + + "B\003\340A\005\022@\n\016network_config\030\025 \001(\0132(.google.c" + + "loud.metastore.v1.NetworkConfig\022K\n\rdatab" + + "ase_type\030\026 \001(\0162/.google.cloud.metastore." + + "v1.Service.DatabaseTypeB\003\340A\005\022D\n\020telemetr" + + "y_config\030\027 \001(\0132*.google.cloud.metastore." + + "v1.TelemetryConfig\022@\n\016scaling_config\030\030 \001" + + "(\0132(.google.cloud.metastore.v1.ScalingCo" + + "nfig\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"~\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\016\n\nSUSPEND" + + "ING\020\003\022\r\n\tSUSPENDED\020\004\022\014\n\010UPDATING\020\005\022\014\n\010DE" + + "LETING\020\006\022\t\n\005ERROR\020\007\";\n\004Tier\022\024\n\020TIER_UNSP" + + "ECIFIED\020\000\022\r\n\tDEVELOPER\020\001\022\016\n\nENTERPRISE\020\003" + + "\"I\n\016ReleaseChannel\022\037\n\033RELEASE_CHANNEL_UN" + + "SPECIFIED\020\000\022\n\n\006CANARY\020\001\022\n\n\006STABLE\020\002\"E\n\014D" + + "atabaseType\022\035\n\031DATABASE_TYPE_UNSPECIFIED" + + "\020\000\022\t\n\005MYSQL\020\001\022\013\n\007SPANNER\020\002:a\352A^\n metasto" + + "re.googleapis.com/Service\022:projects/{pro" + + "ject}/locations/{location}/services/{ser" + + "vice}B\022\n\020metastore_config\"r\n\021Maintenance" + + "Window\0220\n\013hour_of_day\030\001 \001(\0132\033.google.pro" + + "tobuf.Int32Value\022+\n\013day_of_week\030\002 \001(\0162\026." + + "google.type.DayOfWeek\"\326\003\n\023HiveMetastoreC" + + "onfig\022\024\n\007version\030\001 \001(\tB\003\340A\005\022]\n\020config_ov" + + "errides\030\002 \003(\0132C.google.cloud.metastore.v" + + "1.HiveMetastoreConfig.ConfigOverridesEnt" + + "ry\022B\n\017kerberos_config\030\003 \001(\0132).google.clo" + + "ud.metastore.v1.KerberosConfig\022a\n\022auxili" + + "ary_versions\030\005 \003(\0132E.google.cloud.metast" + + "ore.v1.HiveMetastoreConfig.AuxiliaryVers" + + "ionsEntry\0326\n\024ConfigOverridesEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032k\n\026AuxiliaryVe" + + "rsionsEntry\022\013\n\003key\030\001 \001(\t\022@\n\005value\030\002 \001(\0132" + + "1.google.cloud.metastore.v1.AuxiliaryVer" + + "sionConfig:\0028\001\"s\n\016KerberosConfig\0221\n\006keyt" + + "ab\030\001 \001(\0132!.google.cloud.metastore.v1.Sec" + + "ret\022\021\n\tprincipal\030\002 \001(\t\022\033\n\023krb5_config_gc" + + "s_uri\030\003 \001(\t\")\n\006Secret\022\026\n\014cloud_secret\030\002 " + + "\001(\tH\000B\007\n\005value\"#\n\020EncryptionConfig\022\017\n\007km" + + "s_key\030\001 \001(\t\"\212\002\n\026AuxiliaryVersionConfig\022\017" + + "\n\007version\030\001 \001(\t\022`\n\020config_overrides\030\002 \003(" + + "\0132F.google.cloud.metastore.v1.AuxiliaryV" + + "ersionConfig.ConfigOverridesEntry\022E\n\016net" + + "work_config\030\003 \001(\0132(.google.cloud.metasto" + + "re.v1.NetworkConfigB\003\340A\003\0326\n\024ConfigOverri" + + "desEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\"\322\001\n\rNetworkConfig\022I\n\tconsumers\030\001 \003(\01321." + + "google.cloud.metastore.v1.NetworkConfig." + + "ConsumerB\003\340A\005\032v\n\010Consumer\022?\n\nsubnetwork\030" + + "\001 \001(\tB)\340A\005\372A#\n!compute.googleapis.com/Su" + + "bnetworkH\000\022\031\n\014endpoint_uri\030\003 \001(\tB\003\340A\003B\016\n" + + "\014vpc_resource\"\232\001\n\017TelemetryConfig\022H\n\nlog" + + "_format\030\001 \001(\01624.google.cloud.metastore.v" + + "1.TelemetryConfig.LogFormat\"=\n\tLogFormat" + + "\022\032\n\026LOG_FORMAT_UNSPECIFIED\020\000\022\n\n\006LEGACY\020\001" + + "\022\010\n\004JSON\020\002\"\241\001\n\032MetadataManagementActivit" + + "y\022H\n\020metadata_exports\030\001 \003(\0132).google.clo" + + "ud.metastore.v1.MetadataExportB\003\340A\003\0229\n\010r" + + "estores\030\002 \003(\0132\".google.cloud.metastore.v" + + "1.RestoreB\003\340A\003\"\343\006\n\016MetadataImport\022T\n\rdat" + + "abase_dump\030\006 \001(\01326.google.cloud.metastor" + + "e.v1.MetadataImport.DatabaseDumpB\003\340A\005H\000\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\005\022\023\n\013description\030\002 \001(\t\022" + + "4\n\013create_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0224\n\013update_time\030\004 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\0221\n\010end_time\030" + + "\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022C" + + "\n\005state\030\005 \001(\0162/.google.cloud.metastore.v" + + "1.MetadataImport.StateB\003\340A\003\032\376\001\n\014Database" + + "Dump\022^\n\rdatabase_type\030\001 \001(\0162C.google.clo" + + "ud.metastore.v1.MetadataImport.DatabaseD" + + "ump.DatabaseTypeB\002\030\001\022\017\n\007gcs_uri\030\002 \001(\t\022C\n" + + "\004type\030\004 \001(\01620.google.cloud.metastore.v1." + + "DatabaseDumpSpec.TypeB\003\340A\001\"8\n\014DatabaseTy" + + "pe\022\035\n\031DATABASE_TYPE_UNSPECIFIED\020\000\022\t\n\005MYS" + + "QL\020\001\"T\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007" + + "RUNNING\020\001\022\r\n\tSUCCEEDED\020\002\022\014\n\010UPDATING\020\003\022\n" + + "\n\006FAILED\020\004:\213\001\352A\207\001\n\'metastore.googleapis." + + "com/MetadataImport\022\\projects/{project}/l" + + "ocations/{location}/services/{service}/m" + + "etadataImports/{metadata_import}B\n\n\010meta" + + "data\"\232\003\n\016MetadataExport\022\"\n\023destination_g" + + "cs_uri\030\004 \001(\tB\003\340A\003H\000\0223\n\nstart_time\030\001 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0221\n\010end_" + + "time\030\002 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\022C\n\005state\030\003 \001(\0162/.google.cloud.metast" + + "ore.v1.MetadataExport.StateB\003\340A\003\022Q\n\022data" + + "base_dump_type\030\005 \001(\01620.google.cloud.meta" + + "store.v1.DatabaseDumpSpec.TypeB\003\340A\003\"U\n\005S" + + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001" + + "\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED" + + "\020\004B\r\n\013destination\"\220\004\n\006Backup\022\021\n\004name\030\001 \001" + + "(\tB\003\340A\005\0224\n\013create_time\030\002 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\0221\n\010end_time\030\003 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\022;\n\005stat" + + "e\030\004 \001(\0162\'.google.cloud.metastore.v1.Back" + + "up.StateB\003\340A\003\022A\n\020service_revision\030\005 \001(\0132" + + "\".google.cloud.metastore.v1.ServiceB\003\340A\003" + + "\022\023\n\013description\030\006 \001(\t\022\037\n\022restoring_servi" + + "ces\030\007 \003(\tB\003\340A\003\"a\n\005State\022\025\n\021STATE_UNSPECI" + + "FIED\020\000\022\014\n\010CREATING\020\001\022\014\n\010DELETING\020\002\022\n\n\006AC" + + "TIVE\020\003\022\n\n\006FAILED\020\004\022\r\n\tRESTORING\020\005:q\352An\n\037" + + "metastore.googleapis.com/Backup\022Kproject" + + "s/{project}/locations/{location}/service" + + "s/{service}/backups/{backup}\"\342\003\n\007Restore" + + "\0223\n\nstart_time\030\001 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\003\022<\n\005state\030\003 \001(\0162" + + "(.google.cloud.metastore.v1.Restore.Stat" + + "eB\003\340A\003\0227\n\006backup\030\004 \001(\tB\'\340A\003\372A!\n\037metastor" + + "e.googleapis.com/Backup\022A\n\004type\030\005 \001(\0162.." + + "google.cloud.metastore.v1.Restore.Restor" + + "eTypeB\003\340A\003\022\024\n\007details\030\006 \001(\tB\003\340A\003\"U\n\005Stat" + + "e\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n" + + "\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED\020\004\"" + + "H\n\013RestoreType\022\034\n\030RESTORE_TYPE_UNSPECIFI" + + "ED\020\000\022\010\n\004FULL\020\001\022\021\n\rMETADATA_ONLY\020\002\"\375\001\n\rSc" + + "alingConfig\022N\n\rinstance_size\030\001 \001(\01625.goo" + + "gle.cloud.metastore.v1.ScalingConfig.Ins" + + "tanceSizeH\000\022\030\n\016scaling_factor\030\002 \001(\002H\000\"q\n" + + "\014InstanceSize\022\035\n\031INSTANCE_SIZE_UNSPECIFI" + + "ED\020\000\022\017\n\013EXTRA_SMALL\020\001\022\t\n\005SMALL\020\002\022\n\n\006MEDI" + + "UM\020\003\022\t\n\005LARGE\020\004\022\017\n\013EXTRA_LARGE\020\005B\017\n\rscal" + + "ing_model\"\254\001\n\023ListServicesRequest\0228\n\006par" + + "ent\030\001 \001(\tB(\340A\002\372A\"\022 metastore.googleapis." + + "com/Service\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\np" + + "age_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A" + + "\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"z\n\024ListServices" + + "Response\0224\n\010services\030\001 \003(\0132\".google.clou" + + "d.metastore.v1.Service\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"K\n\021GetServi" + + "ceRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n metasto" + + "re.googleapis.com/Service\"\274\001\n\024CreateServ" + + "iceRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 meta" + + "store.googleapis.com/Service\022\027\n\nservice_" + + "id\030\002 \001(\tB\003\340A\002\0228\n\007service\030\003 \001(\0132\".google." + + "cloud.metastore.v1.ServiceB\003\340A\002\022\027\n\nreque" + + "st_id\030\004 \001(\tB\003\340A\001\"\237\001\n\024UpdateServiceReques" + + "t\0224\n\013update_mask\030\001 \001(\0132\032.google.protobuf" + + ".FieldMaskB\003\340A\002\0228\n\007service\030\002 \001(\0132\".googl" + + "e.cloud.metastore.v1.ServiceB\003\340A\002\022\027\n\nreq" + + "uest_id\030\003 \001(\tB\003\340A\001\"g\n\024DeleteServiceReque" + + "st\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n metastore.goog" + + "leapis.com/Service\022\027\n\nrequest_id\030\002 \001(\tB\003" + + "\340A\001\"\272\001\n\032ListMetadataImportsRequest\022?\n\006pa" + + "rent\030\001 \001(\tB/\340A\002\372A)\022\'metastore.googleapis" + + ".com/MetadataImport\022\026\n\tpage_size\030\002 \001(\005B\003" + + "\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004" + + " \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\220\001\n\033Lis" + + "tMetadataImportsResponse\022C\n\020metadata_imp" + + "orts\030\001 \003(\0132).google.cloud.metastore.v1.M" + + "etadataImport\022\027\n\017next_page_token\030\002 \001(\t\022\023" + + "\n\013unreachable\030\003 \003(\t\"Y\n\030GetMetadataImport" + + "Request\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'metastore" + + ".googleapis.com/MetadataImport\"\341\001\n\033Creat" + + "eMetadataImportRequest\022?\n\006parent\030\001 \001(\tB/" + + "\340A\002\372A)\022\'metastore.googleapis.com/Metadat" + + "aImport\022\037\n\022metadata_import_id\030\002 \001(\tB\003\340A\002" + + "\022G\n\017metadata_import\030\003 \001(\0132).google.cloud" + + ".metastore.v1.MetadataImportB\003\340A\002\022\027\n\nreq" + + "uest_id\030\004 \001(\tB\003\340A\001\"\265\001\n\033UpdateMetadataImp" + + "ortRequest\0224\n\013update_mask\030\001 \001(\0132\032.google" + + ".protobuf.FieldMaskB\003\340A\002\022G\n\017metadata_imp" + + "ort\030\002 \001(\0132).google.cloud.metastore.v1.Me" + + "tadataImportB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340" + + "A\001\"\252\001\n\022ListBackupsRequest\0227\n\006parent\030\001 \001(" + + "\tB\'\340A\002\372A!\022\037metastore.googleapis.com/Back" + + "up\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token" + + "\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010orde" + + "r_by\030\005 \001(\tB\003\340A\001\"w\n\023ListBackupsResponse\0222" + + "\n\007backups\030\001 \003(\0132!.google.cloud.metastore" + + ".v1.Backup\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013u" + + "nreachable\030\003 \003(\t\"I\n\020GetBackupRequest\0225\n\004" + + "name\030\001 \001(\tB\'\340A\002\372A!\n\037metastore.googleapis" + + ".com/Backup\"\267\001\n\023CreateBackupRequest\0227\n\006p" + + "arent\030\001 \001(\tB\'\340A\002\372A!\022\037metastore.googleapi" + + "s.com/Backup\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\0226\n\006" + + "backup\030\003 \001(\0132!.google.cloud.metastore.v1" + + ".BackupB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"e\n" + + "\023DeleteBackupRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372" + + "A!\n\037metastore.googleapis.com/Backup\022\027\n\nr" + + "equest_id\030\002 \001(\tB\003\340A\001\"\357\001\n\025ExportMetadataR" + + "equest\022 \n\026destination_gcs_folder\030\002 \001(\tH\000" + + "\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n metastore.goo" + + "gleapis.com/Service\022\027\n\nrequest_id\030\003 \001(\tB" + + "\003\340A\001\022Q\n\022database_dump_type\030\004 \001(\01620.googl" + + "e.cloud.metastore.v1.DatabaseDumpSpec.Ty" + + "peB\003\340A\001B\r\n\013destination\"\357\001\n\025RestoreServic" + + "eRequest\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n metas" + + "tore.googleapis.com/Service\0227\n\006backup\030\002 " + + "\001(\tB\'\340A\002\372A!\n\037metastore.googleapis.com/Ba" + + "ckup\022I\n\014restore_type\030\003 \001(\0162..google.clou" + + "d.metastore.v1.Restore.RestoreTypeB\003\340A\001\022" + + "\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\200\002\n\021OperationMe" + + "tadata\0224\n\013create_time\030\001 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\003\022\023\n\006targe" + + "t\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003\022\033\n\016statu" + + "s_message\030\005 \001(\tB\003\340A\003\022#\n\026requested_cancel" + + "lation\030\006 \001(\010B\003\340A\003\022\030\n\013api_version\030\007 \001(\tB\003" + + "\340A\003\"\274\001\n\020LocationMetadata\022k\n!supported_hi" + + "ve_metastore_versions\030\001 \003(\0132@.google.clo" + + "ud.metastore.v1.LocationMetadata.HiveMet" + + "astoreVersion\032;\n\024HiveMetastoreVersion\022\017\n" + + "\007version\030\001 \001(\t\022\022\n\nis_default\030\002 \001(\010\"E\n\020Da" + + "tabaseDumpSpec\"1\n\004Type\022\024\n\020TYPE_UNSPECIFI" + + "ED\020\000\022\t\n\005MYSQL\020\001\022\010\n\004AVRO\020\0022\274\033\n\021DataprocMe" + + "tastore\022\256\001\n\014ListServices\022..google.cloud." + + "metastore.v1.ListServicesRequest\032/.googl" + + "e.cloud.metastore.v1.ListServicesRespons" + + "e\"=\202\323\344\223\002.\022,/v1/{parent=projects/*/locati" + + "ons/*}/services\332A\006parent\022\233\001\n\nGetService\022" + + ",.google.cloud.metastore.v1.GetServiceRe" + + "quest\032\".google.cloud.metastore.v1.Servic" + + "e\";\202\323\344\223\002.\022,/v1/{name=projects/*/location" + + "s/*/services/*}\332A\004name\022\364\001\n\rCreateService" + + "\022/.google.cloud.metastore.v1.CreateServi" + + "ceRequest\032\035.google.longrunning.Operation" + + "\"\222\001\202\323\344\223\0027\",/v1/{parent=projects/*/locati" + + "ons/*}/services:\007service\332A\031parent,servic" + + "e,service_id\312A6\n\007Service\022+google.cloud.m" + + "etastore.v1.OperationMetadata\022\366\001\n\rUpdate" + + "Service\022/.google.cloud.metastore.v1.Upda" + + "teServiceRequest\032\035.google.longrunning.Op" + + "eration\"\224\001\202\323\344\223\002?24/v1/{service.name=proj" + + "ects/*/locations/*/services/*}:\007service\332" + + "A\023service,update_mask\312A6\n\007Service\022+googl" + + "e.cloud.metastore.v1.OperationMetadata\022\344" + + "\001\n\rDeleteService\022/.google.cloud.metastor" + + "e.v1.DeleteServiceRequest\032\035.google.longr" + + "unning.Operation\"\202\001\202\323\344\223\002.*,/v1/{name=pro" + + "jects/*/locations/*/services/*}\332A\004name\312A" + + "D\n\025google.protobuf.Empty\022+google.cloud.m" + + "etastore.v1.OperationMetadata\022\325\001\n\023ListMe" + + "tadataImports\0225.google.cloud.metastore.v" + + "1.ListMetadataImportsRequest\0326.google.cl" + + "oud.metastore.v1.ListMetadataImportsResp" + + "onse\"O\202\323\344\223\002@\022>/v1/{parent=projects/*/loc" + + "ations/*/services/*}/metadataImports\332A\006p" + + "arent\022\302\001\n\021GetMetadataImport\0223.google.clo" + + "ud.metastore.v1.GetMetadataImportRequest" + + "\032).google.cloud.metastore.v1.MetadataImp" + + "ort\"M\202\323\344\223\002@\022>/v1/{name=projects/*/locati" + + "ons/*/services/*/metadataImports/*}\332A\004na" + + "me\022\263\002\n\024CreateMetadataImport\0226.google.clo" + + "ud.metastore.v1.CreateMetadataImportRequ" + + "est\032\035.google.longrunning.Operation\"\303\001\202\323\344" + + "\223\002Q\">/v1/{parent=projects/*/locations/*/" + + "services/*}/metadataImports:\017metadata_im" + + "port\332A)parent,metadata_import,metadata_i" + + "mport_id\312A=\n\016MetadataImport\022+google.clou" + + "d.metastore.v1.OperationMetadata\022\265\002\n\024Upd" + + "ateMetadataImport\0226.google.cloud.metasto" + + "re.v1.UpdateMetadataImportRequest\032\035.goog" + + "le.longrunning.Operation\"\305\001\202\323\344\223\002a2N/v1/{" + + "metadata_import.name=projects/*/location" + + "s/*/services/*/metadataImports/*}:\017metad" + + "ata_import\332A\033metadata_import,update_mask" + + "\312A=\n\016MetadataImport\022+google.cloud.metast" + + "ore.v1.OperationMetadata\022\355\001\n\016ExportMetad" + + "ata\0220.google.cloud.metastore.v1.ExportMe" + + "tadataRequest\032\035.google.longrunning.Opera" + + "tion\"\211\001\202\323\344\223\002C\">/v1/{service=projects/*/l" + + "ocations/*/services/*}:exportMetadata:\001*" + + "\312A=\n\016MetadataExport\022+google.cloud.metast" + + "ore.v1.OperationMetadata\022\360\001\n\016RestoreServ" + + "ice\0220.google.cloud.metastore.v1.RestoreS" + + "erviceRequest\032\035.google.longrunning.Opera" + + "tion\"\214\001\202\323\344\223\002<\"7/v1/{service=projects/*/l" + + "ocations/*/services/*}:restore:\001*\332A\016serv" + + "ice,backup\312A6\n\007Restore\022+google.cloud.met" + + "astore.v1.OperationMetadata\022\265\001\n\013ListBack" + + "ups\022-.google.cloud.metastore.v1.ListBack" + + "upsRequest\032..google.cloud.metastore.v1.L" + + "istBackupsResponse\"G\202\323\344\223\0028\0226/v1/{parent=" + + "projects/*/locations/*/services/*}/backu" + + "ps\332A\006parent\022\242\001\n\tGetBackup\022+.google.cloud" + + ".metastore.v1.GetBackupRequest\032!.google." + + "cloud.metastore.v1.Backup\"E\202\323\344\223\0028\0226/v1/{" + + "name=projects/*/locations/*/services/*/b" + + "ackups/*}\332A\004name\022\370\001\n\014CreateBackup\022..goog" + + "le.cloud.metastore.v1.CreateBackupReques" + + "t\032\035.google.longrunning.Operation\"\230\001\202\323\344\223\002" + + "@\"6/v1/{parent=projects/*/locations/*/se" + + "rvices/*}/backups:\006backup\332A\027parent,backu" + + "p,backup_id\312A5\n\006Backup\022+google.cloud.met" + + "astore.v1.OperationMetadata\022\354\001\n\014DeleteBa" + + "ckup\022..google.cloud.metastore.v1.DeleteB" + + "ackupRequest\032\035.google.longrunning.Operat" + + "ion\"\214\001\202\323\344\223\0028*6/v1/{name=projects/*/locat" + + "ions/*/services/*/backups/*}\332A\004name\312AD\n\025" + + "google.protobuf.Empty\022+google.cloud.meta" + + "store.v1.OperationMetadata\032L\312A\030metastore" + + ".googleapis.com\322A.https://www.googleapis" + + ".com/auth/cloud-platformB\226\003\n\035com.google." + + "cloud.metastore.v1B\016MetastoreProtoP\001Z;cl" + + "oud.google.com/go/metastore/apiv1/metast" + + "orepb;metastorepb\312\002\031Google\\Cloud\\Metasto" + + "re\\V1\352AN\n\036compute.googleapis.com/Network" + + "\022,projects/{project}/global/networks/{ne" + + "twork}\352Aa\n!compute.googleapis.com/Subnet" + + "work\022 + * Network configuration for the Dataproc Metastore service. + * + * + * Protobuf type {@code google.cloud.metastore.v1.NetworkConfig} + */ +public final class NetworkConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.NetworkConfig) + NetworkConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use NetworkConfig.newBuilder() to construct. + private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NetworkConfig() { + consumers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NetworkConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.NetworkConfig.class, com.google.cloud.metastore.v1.NetworkConfig.Builder.class); + } + + public interface ConsumerOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.NetworkConfig.Consumer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + boolean hasSubnetwork(); + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString + getSubnetworkBytes(); + + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + public com.google.cloud.metastore.v1.NetworkConfig.Consumer.VpcResourceCase getVpcResourceCase(); + } + /** + *
+   * Contains information of the customer's network configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.NetworkConfig.Consumer} + */ + public static final class Consumer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.NetworkConfig.Consumer) + ConsumerOrBuilder { + private static final long serialVersionUID = 0L; + // Use Consumer.newBuilder() to construct. + private Consumer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Consumer() { + endpointUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Consumer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.NetworkConfig.Consumer.class, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder.class); + } + + private int vpcResourceCase_ = 0; + private java.lang.Object vpcResource_; + public enum VpcResourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUBNETWORK(1), + VPCRESOURCE_NOT_SET(0); + private final int value; + private VpcResourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VpcResourceCase valueOf(int value) { + return forNumber(value); + } + + public static VpcResourceCase forNumber(int value) { + switch (value) { + case 1: return SUBNETWORK; + case 0: return VPCRESOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public VpcResourceCase + getVpcResourceCase() { + return VpcResourceCase.forNumber( + vpcResourceCase_); + } + + public static final int SUBNETWORK_FIELD_NUMBER = 1; + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + public boolean hasSubnetwork() { + return vpcResourceCase_ == 1; + } + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (vpcResourceCase_ == 1) { + vpcResource_ = s; + } + return s; + } + } + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString + getSubnetworkBytes() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (vpcResourceCase_ == 1) { + vpcResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (vpcResourceCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vpcResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (vpcResourceCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vpcResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.NetworkConfig.Consumer)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.NetworkConfig.Consumer other = (com.google.cloud.metastore.v1.NetworkConfig.Consumer) obj; + + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (!getVpcResourceCase().equals(other.getVpcResourceCase())) return false; + switch (vpcResourceCase_) { + case 1: + if (!getSubnetwork() + .equals(other.getSubnetwork())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + switch (vpcResourceCase_) { + case 1: + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.NetworkConfig.Consumer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Contains information of the customer's network configurations.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.NetworkConfig.Consumer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.NetworkConfig.Consumer) + com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.NetworkConfig.Consumer.class, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.NetworkConfig.Consumer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointUri_ = ""; + vpcResourceCase_ = 0; + vpcResource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig.Consumer getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.NetworkConfig.Consumer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig.Consumer build() { + com.google.cloud.metastore.v1.NetworkConfig.Consumer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig.Consumer buildPartial() { + com.google.cloud.metastore.v1.NetworkConfig.Consumer result = new com.google.cloud.metastore.v1.NetworkConfig.Consumer(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.NetworkConfig.Consumer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endpointUri_ = endpointUri_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1.NetworkConfig.Consumer result) { + result.vpcResourceCase_ = vpcResourceCase_; + result.vpcResource_ = this.vpcResource_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.NetworkConfig.Consumer) { + return mergeFrom((com.google.cloud.metastore.v1.NetworkConfig.Consumer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.NetworkConfig.Consumer other) { + if (other == com.google.cloud.metastore.v1.NetworkConfig.Consumer.getDefaultInstance()) return this; + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getVpcResourceCase()) { + case SUBNETWORK: { + vpcResourceCase_ = 1; + vpcResource_ = other.vpcResource_; + onChanged(); + break; + } + case VPCRESOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + vpcResourceCase_ = 1; + vpcResource_ = s; + break; + } // case 10 + case 26: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int vpcResourceCase_ = 0; + private java.lang.Object vpcResource_; + public VpcResourceCase + getVpcResourceCase() { + return VpcResourceCase.forNumber( + vpcResourceCase_); + } + + public Builder clearVpcResource() { + vpcResourceCase_ = 0; + vpcResource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + @java.lang.Override + public boolean hasSubnetwork() { + return vpcResourceCase_ == 1; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (vpcResourceCase_ == 1) { + vpcResource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubnetworkBytes() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (vpcResourceCase_ == 1) { + vpcResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + vpcResourceCase_ = 1; + vpcResource_ = value; + onChanged(); + return this; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + if (vpcResourceCase_ == 1) { + vpcResourceCase_ = 0; + vpcResource_ = null; + onChanged(); + } + return this; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + vpcResourceCase_ = 1; + vpcResource_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.NetworkConfig.Consumer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.NetworkConfig.Consumer) + private static final com.google.cloud.metastore.v1.NetworkConfig.Consumer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.NetworkConfig.Consumer(); + } + + public static com.google.cloud.metastore.v1.NetworkConfig.Consumer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Consumer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig.Consumer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CONSUMERS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List consumers_; + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public java.util.List getConsumersList() { + return consumers_; + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public java.util.List + getConsumersOrBuilderList() { + return consumers_; + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public int getConsumersCount() { + return consumers_.size(); + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig.Consumer getConsumers(int index) { + return consumers_.get(index); + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index) { + return consumers_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < consumers_.size(); i++) { + output.writeMessage(1, consumers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < consumers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, consumers_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.NetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.NetworkConfig other = (com.google.cloud.metastore.v1.NetworkConfig) obj; + + if (!getConsumersList() + .equals(other.getConsumersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConsumersCount() > 0) { + hash = (37 * hash) + CONSUMERS_FIELD_NUMBER; + hash = (53 * hash) + getConsumersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.NetworkConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Network configuration for the Dataproc Metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.NetworkConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.NetworkConfig) + com.google.cloud.metastore.v1.NetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.NetworkConfig.class, com.google.cloud.metastore.v1.NetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.NetworkConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (consumersBuilder_ == null) { + consumers_ = java.util.Collections.emptyList(); + } else { + consumers_ = null; + consumersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_NetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig build() { + com.google.cloud.metastore.v1.NetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig buildPartial() { + com.google.cloud.metastore.v1.NetworkConfig result = new com.google.cloud.metastore.v1.NetworkConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1.NetworkConfig result) { + if (consumersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + consumers_ = java.util.Collections.unmodifiableList(consumers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.consumers_ = consumers_; + } else { + result.consumers_ = consumersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1.NetworkConfig result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.NetworkConfig) { + return mergeFrom((com.google.cloud.metastore.v1.NetworkConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.NetworkConfig other) { + if (other == com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance()) return this; + if (consumersBuilder_ == null) { + if (!other.consumers_.isEmpty()) { + if (consumers_.isEmpty()) { + consumers_ = other.consumers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConsumersIsMutable(); + consumers_.addAll(other.consumers_); + } + onChanged(); + } + } else { + if (!other.consumers_.isEmpty()) { + if (consumersBuilder_.isEmpty()) { + consumersBuilder_.dispose(); + consumersBuilder_ = null; + consumers_ = other.consumers_; + bitField0_ = (bitField0_ & ~0x00000001); + consumersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConsumersFieldBuilder() : null; + } else { + consumersBuilder_.addAllMessages(other.consumers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1.NetworkConfig.Consumer m = + input.readMessage( + com.google.cloud.metastore.v1.NetworkConfig.Consumer.parser(), + extensionRegistry); + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(m); + } else { + consumersBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List consumers_ = + java.util.Collections.emptyList(); + private void ensureConsumersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + consumers_ = new java.util.ArrayList(consumers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig.Consumer, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder> consumersBuilder_; + + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List getConsumersList() { + if (consumersBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumers_); + } else { + return consumersBuilder_.getMessageList(); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public int getConsumersCount() { + if (consumersBuilder_ == null) { + return consumers_.size(); + } else { + return consumersBuilder_.getCount(); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1.NetworkConfig.Consumer getConsumers(int index) { + if (consumersBuilder_ == null) { + return consumers_.get(index); + } else { + return consumersBuilder_.getMessage(index); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setConsumers( + int index, com.google.cloud.metastore.v1.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.set(index, value); + onChanged(); + } else { + consumersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setConsumers( + int index, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.set(index, builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers(com.google.cloud.metastore.v1.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.add(value); + onChanged(); + } else { + consumersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + int index, com.google.cloud.metastore.v1.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.add(index, value); + onChanged(); + } else { + consumersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + int index, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(index, builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addAllConsumers( + java.lang.Iterable values) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumers_); + onChanged(); + } else { + consumersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearConsumers() { + if (consumersBuilder_ == null) { + consumers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + consumersBuilder_.clear(); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder removeConsumers(int index) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.remove(index); + onChanged(); + } else { + consumersBuilder_.remove(index); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder getConsumersBuilder( + int index) { + return getConsumersFieldBuilder().getBuilder(index); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index) { + if (consumersBuilder_ == null) { + return consumers_.get(index); } else { + return consumersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List + getConsumersOrBuilderList() { + if (consumersBuilder_ != null) { + return consumersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumers_); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder addConsumersBuilder() { + return getConsumersFieldBuilder().addBuilder( + com.google.cloud.metastore.v1.NetworkConfig.Consumer.getDefaultInstance()); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder addConsumersBuilder( + int index) { + return getConsumersFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1.NetworkConfig.Consumer.getDefaultInstance()); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List + getConsumersBuilderList() { + return getConsumersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig.Consumer, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder> + getConsumersFieldBuilder() { + if (consumersBuilder_ == null) { + consumersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig.Consumer, com.google.cloud.metastore.v1.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder>( + consumers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + consumers_ = null; + } + return consumersBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.NetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.NetworkConfig) + private static final com.google.cloud.metastore.v1.NetworkConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.NetworkConfig(); + } + + public static com.google.cloud.metastore.v1.NetworkConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/NetworkConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/NetworkConfigOrBuilder.java new file mode 100644 index 000000000000..cec7680f228f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/NetworkConfigOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface NetworkConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.NetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + java.util.List + getConsumersList(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1.NetworkConfig.Consumer getConsumers(int index); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + int getConsumersCount(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + java.util.List + getConsumersOrBuilderList(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadata.java new file mode 100644 index 000000000000..531d72ea3484 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadata.java @@ -0,0 +1,1629 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Represents the metadata of a long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.OperationMetadata.class, com.google.cloud.metastore.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + *
+   * Output only. Identifies whether the caller has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.OperationMetadata other = (com.google.cloud.metastore.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getTarget() + .equals(other.getTarget())) return false; + if (!getVerb() + .equals(other.getVerb())) return false; + if (!getStatusMessage() + .equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() + != other.getRequestedCancellation()) return false; + if (!getApiVersion() + .equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the metadata of a long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.OperationMetadata) + com.google.cloud.metastore.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.OperationMetadata.class, com.google.cloud.metastore.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.OperationMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.OperationMetadata build() { + com.google.cloud.metastore.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.OperationMetadata buildPartial() { + com.google.cloud.metastore.v1.OperationMetadata result = new com.google.cloud.metastore.v1.OperationMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.metastore.v1.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.OperationMetadata other) { + if (other == com.google.cloud.metastore.v1.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString + getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_ ; + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString + getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.OperationMetadata) + private static final com.google.cloud.metastore.v1.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.OperationMetadata(); + } + + public static com.google.cloud.metastore.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..f9fb4153c12d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,157 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + java.lang.String getTarget(); + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + java.lang.String getVerb(); + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + com.google.protobuf.ByteString + getVerbBytes(); + + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString + getStatusMessageBytes(); + + /** + *
+   * Output only. Identifies whether the caller has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString + getApiVersionBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Restore.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Restore.java new file mode 100644 index 000000000000..0345fb419857 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Restore.java @@ -0,0 +1,1791 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * The details of a metadata restore operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Restore} + */ +public final class Restore extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Restore) + RestoreOrBuilder { +private static final long serialVersionUID = 0L; + // Use Restore.newBuilder() to construct. + private Restore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Restore() { + state_ = 0; + backup_ = ""; + type_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Restore(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Restore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Restore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Restore.class, com.google.cloud.metastore.v1.Restore.Builder.class); + } + + /** + *
+   * The current state of the restore.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.Restore.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata restore is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata restore is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata restore completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata restore failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The metadata restore is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata restore is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata restore is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata restore completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata restore failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The metadata restore is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.Restore.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Restore.State) + } + + /** + *
+   * The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.Restore.RestoreType} + */ + public enum RestoreType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The restore type is unknown.
+     * 
+ * + * RESTORE_TYPE_UNSPECIFIED = 0; + */ + RESTORE_TYPE_UNSPECIFIED(0), + /** + *
+     * The service's metadata and configuration are restored.
+     * 
+ * + * FULL = 1; + */ + FULL(1), + /** + *
+     * Only the service's metadata is restored.
+     * 
+ * + * METADATA_ONLY = 2; + */ + METADATA_ONLY(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The restore type is unknown.
+     * 
+ * + * RESTORE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESTORE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The service's metadata and configuration are restored.
+     * 
+ * + * FULL = 1; + */ + public static final int FULL_VALUE = 1; + /** + *
+     * Only the service's metadata is restored.
+     * 
+ * + * METADATA_ONLY = 2; + */ + public static final int METADATA_ONLY_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RestoreType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RestoreType forNumber(int value) { + switch (value) { + case 0: return RESTORE_TYPE_UNSPECIFIED; + case 1: return FULL; + case 2: return METADATA_ONLY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + RestoreType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RestoreType findValueByNumber(int number) { + return RestoreType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.Restore.getDescriptor().getEnumTypes().get(1); + } + + private static final RestoreType[] VALUES = values(); + + public static RestoreType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RestoreType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Restore.RestoreType) + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Restore.State getState() { + com.google.cloud.metastore.v1.Restore.State result = com.google.cloud.metastore.v1.Restore.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.Restore.State.UNRECOGNIZED : result; + } + + public static final int BACKUP_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object backup_ = ""; + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + @java.lang.Override + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } + } + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 5; + private int type_ = 0; + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Restore.RestoreType getType() { + com.google.cloud.metastore.v1.Restore.RestoreType result = com.google.cloud.metastore.v1.Restore.RestoreType.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1.Restore.RestoreType.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1.Restore.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, backup_); + } + if (type_ != com.google.cloud.metastore.v1.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, details_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1.Restore.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, backup_); + } + if (type_ != com.google.cloud.metastore.v1.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, details_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.Restore)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.Restore other = (com.google.cloud.metastore.v1.Restore) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (!getBackup() + .equals(other.getBackup())) return false; + if (type_ != other.type_) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.Restore parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Restore parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Restore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Restore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Restore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Restore parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Restore parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Restore parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Restore parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Restore parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Restore parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Restore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.Restore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a metadata restore operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Restore} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Restore) + com.google.cloud.metastore.v1.RestoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Restore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Restore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Restore.class, com.google.cloud.metastore.v1.Restore.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.Restore.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + backup_ = ""; + type_ = 0; + details_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Restore_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Restore getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.Restore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Restore build() { + com.google.cloud.metastore.v1.Restore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Restore buildPartial() { + com.google.cloud.metastore.v1.Restore result = new com.google.cloud.metastore.v1.Restore(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.Restore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backup_ = backup_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.details_ = details_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.Restore) { + return mergeFrom((com.google.cloud.metastore.v1.Restore)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.Restore other) { + if (other == com.google.cloud.metastore.v1.Restore.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getBackup().isEmpty()) { + backup_ = other.backup_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + backup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + type_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Restore.State getState() { + com.google.cloud.metastore.v1.Restore.State result = com.google.cloud.metastore.v1.Restore.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.Restore.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1.Restore.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object backup_ = ""; + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @param value The backup to set. + * @return This builder for chaining. + */ + public Builder setBackup( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backup_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearBackup() { + backup_ = getDefaultInstance().getBackup(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @param value The bytes for backup to set. + * @return This builder for chaining. + */ + public Builder setBackupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backup_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Restore.RestoreType getType() { + com.google.cloud.metastore.v1.Restore.RestoreType result = com.google.cloud.metastore.v1.Restore.RestoreType.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1.Restore.RestoreType.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.metastore.v1.Restore.RestoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000010); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + details_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Restore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Restore) + private static final com.google.cloud.metastore.v1.Restore DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Restore(); + } + + public static com.google.cloud.metastore.v1.Restore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Restore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Restore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreOrBuilder.java new file mode 100644 index 000000000000..29805bb81b7e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreOrBuilder.java @@ -0,0 +1,147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface RestoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Restore) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1.Restore.State getState(); + + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + java.lang.String getBackup(); + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + com.google.protobuf.ByteString + getBackupBytes(); + + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + com.google.cloud.metastore.v1.Restore.RestoreType getType(); + + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + java.lang.String getDetails(); + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + com.google.protobuf.ByteString + getDetailsBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequest.java new file mode 100644 index 000000000000..a39b525b3a86 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequest.java @@ -0,0 +1,1121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for [DataprocMetastore.Restore][].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.RestoreServiceRequest} + */ +public final class RestoreServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.RestoreServiceRequest) + RestoreServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RestoreServiceRequest.newBuilder() to construct. + private RestoreServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RestoreServiceRequest() { + service_ = ""; + backup_ = ""; + restoreType_ = 0; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RestoreServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_RestoreServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.RestoreServiceRequest.class, com.google.cloud.metastore.v1.RestoreServiceRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + @java.lang.Override + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } + } + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESTORE_TYPE_FIELD_NUMBER = 3; + private int restoreType_ = 0; + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + @java.lang.Override public int getRestoreTypeValue() { + return restoreType_; + } + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Restore.RestoreType getRestoreType() { + com.google.cloud.metastore.v1.Restore.RestoreType result = com.google.cloud.metastore.v1.Restore.RestoreType.forNumber(restoreType_); + return result == null ? com.google.cloud.metastore.v1.Restore.RestoreType.UNRECOGNIZED : result; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backup_); + } + if (restoreType_ != com.google.cloud.metastore.v1.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, restoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backup_); + } + if (restoreType_ != com.google.cloud.metastore.v1.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, restoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.RestoreServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.RestoreServiceRequest other = (com.google.cloud.metastore.v1.RestoreServiceRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getBackup() + .equals(other.getBackup())) return false; + if (restoreType_ != other.restoreType_) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + hash = (37 * hash) + RESTORE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + restoreType_; + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.RestoreServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.RestoreServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for [DataprocMetastore.Restore][].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.RestoreServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.RestoreServiceRequest) + com.google.cloud.metastore.v1.RestoreServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_RestoreServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.RestoreServiceRequest.class, com.google.cloud.metastore.v1.RestoreServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.RestoreServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + backup_ = ""; + restoreType_ = 0; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.RestoreServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.RestoreServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.RestoreServiceRequest build() { + com.google.cloud.metastore.v1.RestoreServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.RestoreServiceRequest buildPartial() { + com.google.cloud.metastore.v1.RestoreServiceRequest result = new com.google.cloud.metastore.v1.RestoreServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.RestoreServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backup_ = backup_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.restoreType_ = restoreType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.RestoreServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1.RestoreServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.RestoreServiceRequest other) { + if (other == com.google.cloud.metastore.v1.RestoreServiceRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackup().isEmpty()) { + backup_ = other.backup_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.restoreType_ != 0) { + setRestoreTypeValue(other.getRestoreTypeValue()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + backup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + restoreType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The backup to set. + * @return This builder for chaining. + */ + public Builder setBackup( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearBackup() { + backup_ = getDefaultInstance().getBackup(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for backup to set. + * @return This builder for chaining. + */ + public Builder setBackupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int restoreType_ = 0; + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + @java.lang.Override public int getRestoreTypeValue() { + return restoreType_; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for restoreType to set. + * @return This builder for chaining. + */ + public Builder setRestoreTypeValue(int value) { + restoreType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Restore.RestoreType getRestoreType() { + com.google.cloud.metastore.v1.Restore.RestoreType result = com.google.cloud.metastore.v1.Restore.RestoreType.forNumber(restoreType_); + return result == null ? com.google.cloud.metastore.v1.Restore.RestoreType.UNRECOGNIZED : result; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The restoreType to set. + * @return This builder for chaining. + */ + public Builder setRestoreType(com.google.cloud.metastore.v1.Restore.RestoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + restoreType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRestoreType() { + bitField0_ = (bitField0_ & ~0x00000004); + restoreType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.RestoreServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.RestoreServiceRequest) + private static final com.google.cloud.metastore.v1.RestoreServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.RestoreServiceRequest(); + } + + public static com.google.cloud.metastore.v1.RestoreServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.RestoreServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequestOrBuilder.java new file mode 100644 index 000000000000..f9052b583788 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/RestoreServiceRequestOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface RestoreServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.RestoreServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + java.lang.String getBackup(); + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + com.google.protobuf.ByteString + getBackupBytes(); + + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + int getRestoreTypeValue(); + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + com.google.cloud.metastore.v1.Restore.RestoreType getRestoreType(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ScalingConfig.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ScalingConfig.java new file mode 100644 index 000000000000..e8d6fc098457 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ScalingConfig.java @@ -0,0 +1,982 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Represents the scaling configuration of a metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ScalingConfig} + */ +public final class ScalingConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ScalingConfig) + ScalingConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ScalingConfig.newBuilder() to construct. + private ScalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ScalingConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ScalingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ScalingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ScalingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ScalingConfig.class, com.google.cloud.metastore.v1.ScalingConfig.Builder.class); + } + + /** + *
+   * Metastore instance sizes.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.ScalingConfig.InstanceSize} + */ + public enum InstanceSize + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified instance size
+     * 
+ * + * INSTANCE_SIZE_UNSPECIFIED = 0; + */ + INSTANCE_SIZE_UNSPECIFIED(0), + /** + *
+     * Extra small instance size, maps to a scaling factor of 0.1.
+     * 
+ * + * EXTRA_SMALL = 1; + */ + EXTRA_SMALL(1), + /** + *
+     * Small instance size, maps to a scaling factor of 0.5.
+     * 
+ * + * SMALL = 2; + */ + SMALL(2), + /** + *
+     * Medium instance size, maps to a scaling factor of 1.0.
+     * 
+ * + * MEDIUM = 3; + */ + MEDIUM(3), + /** + *
+     * Large instance size, maps to a scaling factor of 3.0.
+     * 
+ * + * LARGE = 4; + */ + LARGE(4), + /** + *
+     * Extra large instance size, maps to a scaling factor of 6.0.
+     * 
+ * + * EXTRA_LARGE = 5; + */ + EXTRA_LARGE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified instance size
+     * 
+ * + * INSTANCE_SIZE_UNSPECIFIED = 0; + */ + public static final int INSTANCE_SIZE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Extra small instance size, maps to a scaling factor of 0.1.
+     * 
+ * + * EXTRA_SMALL = 1; + */ + public static final int EXTRA_SMALL_VALUE = 1; + /** + *
+     * Small instance size, maps to a scaling factor of 0.5.
+     * 
+ * + * SMALL = 2; + */ + public static final int SMALL_VALUE = 2; + /** + *
+     * Medium instance size, maps to a scaling factor of 1.0.
+     * 
+ * + * MEDIUM = 3; + */ + public static final int MEDIUM_VALUE = 3; + /** + *
+     * Large instance size, maps to a scaling factor of 3.0.
+     * 
+ * + * LARGE = 4; + */ + public static final int LARGE_VALUE = 4; + /** + *
+     * Extra large instance size, maps to a scaling factor of 6.0.
+     * 
+ * + * EXTRA_LARGE = 5; + */ + public static final int EXTRA_LARGE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InstanceSize valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static InstanceSize forNumber(int value) { + switch (value) { + case 0: return INSTANCE_SIZE_UNSPECIFIED; + case 1: return EXTRA_SMALL; + case 2: return SMALL; + case 3: return MEDIUM; + case 4: return LARGE; + case 5: return EXTRA_LARGE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + InstanceSize> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InstanceSize findValueByNumber(int number) { + return InstanceSize.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.ScalingConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final InstanceSize[] VALUES = values(); + + public static InstanceSize valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private InstanceSize(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.ScalingConfig.InstanceSize) + } + + private int scalingModelCase_ = 0; + private java.lang.Object scalingModel_; + public enum ScalingModelCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSTANCE_SIZE(1), + SCALING_FACTOR(2), + SCALINGMODEL_NOT_SET(0); + private final int value; + private ScalingModelCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ScalingModelCase valueOf(int value) { + return forNumber(value); + } + + public static ScalingModelCase forNumber(int value) { + switch (value) { + case 1: return INSTANCE_SIZE; + case 2: return SCALING_FACTOR; + case 0: return SCALINGMODEL_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ScalingModelCase + getScalingModelCase() { + return ScalingModelCase.forNumber( + scalingModelCase_); + } + + public static final int INSTANCE_SIZE_FIELD_NUMBER = 1; + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + public boolean hasInstanceSize() { + return scalingModelCase_ == 1; + } + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + public int getInstanceSizeValue() { + if (scalingModelCase_ == 1) { + return (java.lang.Integer) scalingModel_; + } + return 0; + } + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + public com.google.cloud.metastore.v1.ScalingConfig.InstanceSize getInstanceSize() { + if (scalingModelCase_ == 1) { + com.google.cloud.metastore.v1.ScalingConfig.InstanceSize result = com.google.cloud.metastore.v1.ScalingConfig.InstanceSize.forNumber( + (java.lang.Integer) scalingModel_); + return result == null ? com.google.cloud.metastore.v1.ScalingConfig.InstanceSize.UNRECOGNIZED : result; + } + return com.google.cloud.metastore.v1.ScalingConfig.InstanceSize.INSTANCE_SIZE_UNSPECIFIED; + } + + public static final int SCALING_FACTOR_FIELD_NUMBER = 2; + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + @java.lang.Override + public boolean hasScalingFactor() { + return scalingModelCase_ == 2; + } + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + @java.lang.Override + public float getScalingFactor() { + if (scalingModelCase_ == 2) { + return (java.lang.Float) scalingModel_; + } + return 0F; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (scalingModelCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) scalingModel_)); + } + if (scalingModelCase_ == 2) { + output.writeFloat( + 2, (float)((java.lang.Float) scalingModel_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scalingModelCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, ((java.lang.Integer) scalingModel_)); + } + if (scalingModelCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize( + 2, (float)((java.lang.Float) scalingModel_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.ScalingConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ScalingConfig other = (com.google.cloud.metastore.v1.ScalingConfig) obj; + + if (!getScalingModelCase().equals(other.getScalingModelCase())) return false; + switch (scalingModelCase_) { + case 1: + if (getInstanceSizeValue() + != other.getInstanceSizeValue()) return false; + break; + case 2: + if (java.lang.Float.floatToIntBits(getScalingFactor()) + != java.lang.Float.floatToIntBits( + other.getScalingFactor())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (scalingModelCase_) { + case 1: + hash = (37 * hash) + INSTANCE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceSizeValue(); + break; + case 2: + hash = (37 * hash) + SCALING_FACTOR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScalingFactor()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.ScalingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.ScalingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the scaling configuration of a metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ScalingConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ScalingConfig) + com.google.cloud.metastore.v1.ScalingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ScalingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ScalingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ScalingConfig.class, com.google.cloud.metastore.v1.ScalingConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ScalingConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scalingModelCase_ = 0; + scalingModel_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_ScalingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ScalingConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ScalingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ScalingConfig build() { + com.google.cloud.metastore.v1.ScalingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ScalingConfig buildPartial() { + com.google.cloud.metastore.v1.ScalingConfig result = new com.google.cloud.metastore.v1.ScalingConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ScalingConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1.ScalingConfig result) { + result.scalingModelCase_ = scalingModelCase_; + result.scalingModel_ = this.scalingModel_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.ScalingConfig) { + return mergeFrom((com.google.cloud.metastore.v1.ScalingConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ScalingConfig other) { + if (other == com.google.cloud.metastore.v1.ScalingConfig.getDefaultInstance()) return this; + switch (other.getScalingModelCase()) { + case INSTANCE_SIZE: { + setInstanceSizeValue(other.getInstanceSizeValue()); + break; + } + case SCALING_FACTOR: { + setScalingFactor(other.getScalingFactor()); + break; + } + case SCALINGMODEL_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + scalingModelCase_ = 1; + scalingModel_ = rawValue; + break; + } // case 8 + case 21: { + scalingModel_ = input.readFloat(); + scalingModelCase_ = 2; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int scalingModelCase_ = 0; + private java.lang.Object scalingModel_; + public ScalingModelCase + getScalingModelCase() { + return ScalingModelCase.forNumber( + scalingModelCase_); + } + + public Builder clearScalingModel() { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + @java.lang.Override + public boolean hasInstanceSize() { + return scalingModelCase_ == 1; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + @java.lang.Override + public int getInstanceSizeValue() { + if (scalingModelCase_ == 1) { + return ((java.lang.Integer) scalingModel_).intValue(); + } + return 0; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @param value The enum numeric value on the wire for instanceSize to set. + * @return This builder for chaining. + */ + public Builder setInstanceSizeValue(int value) { + scalingModelCase_ = 1; + scalingModel_ = value; + onChanged(); + return this; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.ScalingConfig.InstanceSize getInstanceSize() { + if (scalingModelCase_ == 1) { + com.google.cloud.metastore.v1.ScalingConfig.InstanceSize result = com.google.cloud.metastore.v1.ScalingConfig.InstanceSize.forNumber( + (java.lang.Integer) scalingModel_); + return result == null ? com.google.cloud.metastore.v1.ScalingConfig.InstanceSize.UNRECOGNIZED : result; + } + return com.google.cloud.metastore.v1.ScalingConfig.InstanceSize.INSTANCE_SIZE_UNSPECIFIED; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @param value The instanceSize to set. + * @return This builder for chaining. + */ + public Builder setInstanceSize(com.google.cloud.metastore.v1.ScalingConfig.InstanceSize value) { + if (value == null) { + throw new NullPointerException(); + } + scalingModelCase_ = 1; + scalingModel_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return This builder for chaining. + */ + public Builder clearInstanceSize() { + if (scalingModelCase_ == 1) { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + public boolean hasScalingFactor() { + return scalingModelCase_ == 2; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + public float getScalingFactor() { + if (scalingModelCase_ == 2) { + return (java.lang.Float) scalingModel_; + } + return 0F; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @param value The scalingFactor to set. + * @return This builder for chaining. + */ + public Builder setScalingFactor(float value) { + + scalingModelCase_ = 2; + scalingModel_ = value; + onChanged(); + return this; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return This builder for chaining. + */ + public Builder clearScalingFactor() { + if (scalingModelCase_ == 2) { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.ScalingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ScalingConfig) + private static final com.google.cloud.metastore.v1.ScalingConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ScalingConfig(); + } + + public static com.google.cloud.metastore.v1.ScalingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ScalingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ScalingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ScalingConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ScalingConfigOrBuilder.java new file mode 100644 index 000000000000..e5ab0cf8bacd --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ScalingConfigOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ScalingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ScalingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + boolean hasInstanceSize(); + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + int getInstanceSizeValue(); + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + com.google.cloud.metastore.v1.ScalingConfig.InstanceSize getInstanceSize(); + + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + boolean hasScalingFactor(); + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + float getScalingFactor(); + + public com.google.cloud.metastore.v1.ScalingConfig.ScalingModelCase getScalingModelCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Secret.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Secret.java new file mode 100644 index 000000000000..6ddf82b24f6c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Secret.java @@ -0,0 +1,717 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * A securely stored value.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Secret} + */ +public final class Secret extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Secret) + SecretOrBuilder { +private static final long serialVersionUID = 0L; + // Use Secret.newBuilder() to construct. + private Secret(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Secret() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Secret(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Secret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Secret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Secret.class, com.google.cloud.metastore.v1.Secret.Builder.class); + } + + private int valueCase_ = 0; + private java.lang.Object value_; + public enum ValueCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_SECRET(2), + VALUE_NOT_SET(0); + private final int value; + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 2: return CLOUD_SECRET; + case 0: return VALUE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public static final int CLOUD_SECRET_FIELD_NUMBER = 2; + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + public boolean hasCloudSecret() { + return valueCase_ == 2; + } + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + public java.lang.String getCloudSecret() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } + } + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + public com.google.protobuf.ByteString + getCloudSecretBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.Secret)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.Secret other = (com.google.cloud.metastore.v1.Secret) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (!getCloudSecret() + .equals(other.getCloudSecret())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 2: + hash = (37 * hash) + CLOUD_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getCloudSecret().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.Secret parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Secret parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Secret parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Secret parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Secret parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Secret parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Secret parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Secret parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Secret parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Secret parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Secret parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Secret parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.Secret prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A securely stored value.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Secret} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Secret) + com.google.cloud.metastore.v1.SecretOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Secret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Secret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Secret.class, com.google.cloud.metastore.v1.Secret.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.Secret.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Secret_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Secret getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.Secret.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Secret build() { + com.google.cloud.metastore.v1.Secret result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Secret buildPartial() { + com.google.cloud.metastore.v1.Secret result = new com.google.cloud.metastore.v1.Secret(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.Secret result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1.Secret result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.Secret) { + return mergeFrom((com.google.cloud.metastore.v1.Secret)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.Secret other) { + if (other == com.google.cloud.metastore.v1.Secret.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case CLOUD_SECRET: { + valueCase_ = 2; + value_ = other.value_; + onChanged(); + break; + } + case VALUE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 2; + value_ = s; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int valueCase_ = 0; + private java.lang.Object value_; + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + @java.lang.Override + public boolean hasCloudSecret() { + return valueCase_ == 2; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + @java.lang.Override + public java.lang.String getCloudSecret() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCloudSecretBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @param value The cloudSecret to set. + * @return This builder for chaining. + */ + public Builder setCloudSecret( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return This builder for chaining. + */ + public Builder clearCloudSecret() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @param value The bytes for cloudSecret to set. + * @return This builder for chaining. + */ + public Builder setCloudSecretBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Secret) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Secret) + private static final com.google.cloud.metastore.v1.Secret DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Secret(); + } + + public static com.google.cloud.metastore.v1.Secret getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Secret parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Secret getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/SecretOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/SecretOrBuilder.java new file mode 100644 index 000000000000..72abd993fdd5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/SecretOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface SecretOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Secret) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + boolean hasCloudSecret(); + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + java.lang.String getCloudSecret(); + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + com.google.protobuf.ByteString + getCloudSecretBytes(); + + public com.google.cloud.metastore.v1.Secret.ValueCase getValueCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Service.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Service.java new file mode 100644 index 000000000000..d1fa3fb4d0fd --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/Service.java @@ -0,0 +1,5278 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * A managed metastore service that serves metadata queries.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Service} + */ +public final class Service extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.Service) + ServiceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Service() { + name_ = ""; + network_ = ""; + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + artifactGcsUri_ = ""; + tier_ = 0; + uid_ = ""; + releaseChannel_ = 0; + databaseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Service(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Service_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Service.class, com.google.cloud.metastore.v1.Service.Builder.class); + } + + /** + *
+   * The current state of the metastore service.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.Service.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metastore service is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metastore service is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The metastore service is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + *
+     * The metastore service is entering suspension. Its query-serving
+     * availability may cease unexpectedly.
+     * 
+ * + * SUSPENDING = 3; + */ + SUSPENDING(3), + /** + *
+     * The metastore service is suspended and unable to serve queries.
+     * 
+ * + * SUSPENDED = 4; + */ + SUSPENDED(4), + /** + *
+     * The metastore service is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 5; + */ + UPDATING(5), + /** + *
+     * The metastore service is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + DELETING(6), + /** + *
+     * The metastore service has encountered an error and cannot be used. The
+     * metastore service should be deleted.
+     * 
+ * + * ERROR = 7; + */ + ERROR(7), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metastore service is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metastore service is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The metastore service is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + *
+     * The metastore service is entering suspension. Its query-serving
+     * availability may cease unexpectedly.
+     * 
+ * + * SUSPENDING = 3; + */ + public static final int SUSPENDING_VALUE = 3; + /** + *
+     * The metastore service is suspended and unable to serve queries.
+     * 
+ * + * SUSPENDED = 4; + */ + public static final int SUSPENDED_VALUE = 4; + /** + *
+     * The metastore service is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 5; + */ + public static final int UPDATING_VALUE = 5; + /** + *
+     * The metastore service is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + public static final int DELETING_VALUE = 6; + /** + *
+     * The metastore service has encountered an error and cannot be used. The
+     * metastore service should be deleted.
+     * 
+ * + * ERROR = 7; + */ + public static final int ERROR_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return ACTIVE; + case 3: return SUSPENDING; + case 4: return SUSPENDED; + case 5: return UPDATING; + case 6: return DELETING; + case 7: return ERROR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.Service.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Service.State) + } + + /** + *
+   * Available service tiers.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.Service.Tier} + */ + public enum Tier + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The tier is not set.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + TIER_UNSPECIFIED(0), + /** + *
+     * The developer tier provides limited scalability and no fault tolerance.
+     * Good for low-cost proof-of-concept.
+     * 
+ * + * DEVELOPER = 1; + */ + DEVELOPER(1), + /** + *
+     * The enterprise tier provides multi-zone high availability, and sufficient
+     * scalability for enterprise-level Dataproc Metastore workloads.
+     * 
+ * + * ENTERPRISE = 3; + */ + ENTERPRISE(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The tier is not set.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + public static final int TIER_UNSPECIFIED_VALUE = 0; + /** + *
+     * The developer tier provides limited scalability and no fault tolerance.
+     * Good for low-cost proof-of-concept.
+     * 
+ * + * DEVELOPER = 1; + */ + public static final int DEVELOPER_VALUE = 1; + /** + *
+     * The enterprise tier provides multi-zone high availability, and sufficient
+     * scalability for enterprise-level Dataproc Metastore workloads.
+     * 
+ * + * ENTERPRISE = 3; + */ + public static final int ENTERPRISE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Tier valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Tier forNumber(int value) { + switch (value) { + case 0: return TIER_UNSPECIFIED; + case 1: return DEVELOPER; + case 3: return ENTERPRISE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Tier> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Tier findValueByNumber(int number) { + return Tier.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.Service.getDescriptor().getEnumTypes().get(1); + } + + private static final Tier[] VALUES = values(); + + public static Tier valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Tier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Service.Tier) + } + + /** + *
+   * Release channels bundle features of varying levels of stability. Newer
+   * features may be introduced initially into less stable release channels and
+   * can be automatically promoted into more stable release channels.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.Service.ReleaseChannel} + */ + public enum ReleaseChannel + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Release channel is not specified.
+     * 
+ * + * RELEASE_CHANNEL_UNSPECIFIED = 0; + */ + RELEASE_CHANNEL_UNSPECIFIED(0), + /** + *
+     * The `CANARY` release channel contains the newest features, which may be
+     * unstable and subject to unresolved issues with no known workarounds.
+     * Services using the `CANARY` release channel are not subject to any SLAs.
+     * 
+ * + * CANARY = 1; + */ + CANARY(1), + /** + *
+     * The `STABLE` release channel contains features that are considered stable
+     * and have been validated for production use.
+     * 
+ * + * STABLE = 2; + */ + STABLE(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Release channel is not specified.
+     * 
+ * + * RELEASE_CHANNEL_UNSPECIFIED = 0; + */ + public static final int RELEASE_CHANNEL_UNSPECIFIED_VALUE = 0; + /** + *
+     * The `CANARY` release channel contains the newest features, which may be
+     * unstable and subject to unresolved issues with no known workarounds.
+     * Services using the `CANARY` release channel are not subject to any SLAs.
+     * 
+ * + * CANARY = 1; + */ + public static final int CANARY_VALUE = 1; + /** + *
+     * The `STABLE` release channel contains features that are considered stable
+     * and have been validated for production use.
+     * 
+ * + * STABLE = 2; + */ + public static final int STABLE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReleaseChannel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ReleaseChannel forNumber(int value) { + switch (value) { + case 0: return RELEASE_CHANNEL_UNSPECIFIED; + case 1: return CANARY; + case 2: return STABLE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ReleaseChannel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReleaseChannel findValueByNumber(int number) { + return ReleaseChannel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.Service.getDescriptor().getEnumTypes().get(2); + } + + private static final ReleaseChannel[] VALUES = values(); + + public static ReleaseChannel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ReleaseChannel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Service.ReleaseChannel) + } + + /** + *
+   * The backend database type for the metastore service.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.Service.DatabaseType} + */ + public enum DatabaseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The DATABASE_TYPE is not set.
+     * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + DATABASE_TYPE_UNSPECIFIED(0), + /** + *
+     * MySQL is used to persist the metastore data.
+     * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + /** + *
+     * Spanner is used to persist the metastore data.
+     * 
+ * + * SPANNER = 2; + */ + SPANNER(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The DATABASE_TYPE is not set.
+     * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * MySQL is used to persist the metastore data.
+     * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + /** + *
+     * Spanner is used to persist the metastore data.
+     * 
+ * + * SPANNER = 2; + */ + public static final int SPANNER_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DatabaseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DatabaseType forNumber(int value) { + switch (value) { + case 0: return DATABASE_TYPE_UNSPECIFIED; + case 1: return MYSQL; + case 2: return SPANNER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DatabaseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseType findValueByNumber(int number) { + return DatabaseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.Service.getDescriptor().getEnumTypes().get(3); + } + + private static final DatabaseType[] VALUES = values(); + + public static DatabaseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DatabaseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.Service.DatabaseType) + } + + private int metastoreConfigCase_ = 0; + private java.lang.Object metastoreConfig_; + public enum MetastoreConfigCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HIVE_METASTORE_CONFIG(5), + METASTORECONFIG_NOT_SET(0); + private final int value; + private MetastoreConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetastoreConfigCase valueOf(int value) { + return forNumber(value); + } + + public static MetastoreConfigCase forNumber(int value) { + switch (value) { + case 5: return HIVE_METASTORE_CONFIG; + case 0: return METASTORECONFIG_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public MetastoreConfigCase + getMetastoreConfigCase() { + return MetastoreConfigCase.forNumber( + metastoreConfigCase_); + } + + public static final int HIVE_METASTORE_CONFIG_FIELD_NUMBER = 5; + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + @java.lang.Override + public boolean hasHiveMetastoreConfig() { + return metastoreConfigCase_ == 5; + } + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfig getHiveMetastoreConfig() { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); + } + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder() { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Service_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 9; + private int port_ = 0; + /** + *
+   * The TCP port at which the metastore service is reached. Default: 9083.
+   * 
+ * + * int32 port = 9; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Service.State getState() { + com.google.cloud.metastore.v1.Service.State result = com.google.cloud.metastore.v1.Service.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.Service.State.UNRECOGNIZED : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object stateMessage_ = ""; + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_GCS_URI_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object artifactGcsUri_ = ""; + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + @java.lang.Override + public java.lang.String getArtifactGcsUri() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactGcsUri_ = s; + return s; + } + } + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArtifactGcsUriBytes() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIER_FIELD_NUMBER = 13; + private int tier_ = 0; + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + @java.lang.Override public int getTierValue() { + return tier_; + } + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @return The tier. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Service.Tier getTier() { + com.google.cloud.metastore.v1.Service.Tier result = com.google.cloud.metastore.v1.Service.Tier.forNumber(tier_); + return result == null ? com.google.cloud.metastore.v1.Service.Tier.UNRECOGNIZED : result; + } + + public static final int MAINTENANCE_WINDOW_FIELD_NUMBER = 15; + private com.google.cloud.metastore.v1.MaintenanceWindow maintenanceWindow_; + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + @java.lang.Override + public boolean hasMaintenanceWindow() { + return maintenanceWindow_ != null; + } + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder() { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + + public static final int UID_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER = 17; + private com.google.cloud.metastore.v1.MetadataManagementActivity metadataManagementActivity_; + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + @java.lang.Override + public boolean hasMetadataManagementActivity() { + return metadataManagementActivity_ != null; + } + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataManagementActivity getMetadataManagementActivity() { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder() { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + + public static final int RELEASE_CHANNEL_FIELD_NUMBER = 19; + private int releaseChannel_ = 0; + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + @java.lang.Override public int getReleaseChannelValue() { + return releaseChannel_; + } + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Service.ReleaseChannel getReleaseChannel() { + com.google.cloud.metastore.v1.Service.ReleaseChannel result = com.google.cloud.metastore.v1.Service.ReleaseChannel.forNumber(releaseChannel_); + return result == null ? com.google.cloud.metastore.v1.Service.ReleaseChannel.UNRECOGNIZED : result; + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.metastore.v1.EncryptionConfig encryptionConfig_; + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 21; + private com.google.cloud.metastore.v1.NetworkConfig networkConfig_; + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig() { + return networkConfig_ == null ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() : networkConfig_; + } + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return networkConfig_ == null ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() : networkConfig_; + } + + public static final int DATABASE_TYPE_FIELD_NUMBER = 22; + private int databaseType_ = 0; + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + @java.lang.Override public com.google.cloud.metastore.v1.Service.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1.Service.DatabaseType result = com.google.cloud.metastore.v1.Service.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1.Service.DatabaseType.UNRECOGNIZED : result; + } + + public static final int TELEMETRY_CONFIG_FIELD_NUMBER = 23; + private com.google.cloud.metastore.v1.TelemetryConfig telemetryConfig_; + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + @java.lang.Override + public boolean hasTelemetryConfig() { + return telemetryConfig_ != null; + } + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.TelemetryConfig getTelemetryConfig() { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + + public static final int SCALING_CONFIG_FIELD_NUMBER = 24; + private com.google.cloud.metastore.v1.ScalingConfig scalingConfig_; + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + @java.lang.Override + public boolean hasScalingConfig() { + return scalingConfig_ != null; + } + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.ScalingConfig getScalingConfig() { + return scalingConfig_ == null ? com.google.cloud.metastore.v1.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.ScalingConfigOrBuilder getScalingConfigOrBuilder() { + return scalingConfig_ == null ? com.google.cloud.metastore.v1.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 4); + if (metastoreConfigCase_ == 5) { + output.writeMessage(5, (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpointUri_); + } + if (port_ != 0) { + output.writeInt32(9, port_); + } + if (state_ != com.google.cloud.metastore.v1.Service.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, artifactGcsUri_); + } + if (tier_ != com.google.cloud.metastore.v1.Service.Tier.TIER_UNSPECIFIED.getNumber()) { + output.writeEnum(13, tier_); + } + if (maintenanceWindow_ != null) { + output.writeMessage(15, getMaintenanceWindow()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, uid_); + } + if (metadataManagementActivity_ != null) { + output.writeMessage(17, getMetadataManagementActivity()); + } + if (releaseChannel_ != com.google.cloud.metastore.v1.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED.getNumber()) { + output.writeEnum(19, releaseChannel_); + } + if (encryptionConfig_ != null) { + output.writeMessage(20, getEncryptionConfig()); + } + if (networkConfig_ != null) { + output.writeMessage(21, getNetworkConfig()); + } + if (databaseType_ != com.google.cloud.metastore.v1.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(22, databaseType_); + } + if (telemetryConfig_ != null) { + output.writeMessage(23, getTelemetryConfig()); + } + if (scalingConfig_ != null) { + output.writeMessage(24, getScalingConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels__); + } + if (metastoreConfigCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpointUri_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, port_); + } + if (state_ != com.google.cloud.metastore.v1.Service.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, artifactGcsUri_); + } + if (tier_ != com.google.cloud.metastore.v1.Service.Tier.TIER_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, tier_); + } + if (maintenanceWindow_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getMaintenanceWindow()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, uid_); + } + if (metadataManagementActivity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getMetadataManagementActivity()); + } + if (releaseChannel_ != com.google.cloud.metastore.v1.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(19, releaseChannel_); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getEncryptionConfig()); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getNetworkConfig()); + } + if (databaseType_ != com.google.cloud.metastore.v1.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(22, databaseType_); + } + if (telemetryConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getTelemetryConfig()); + } + if (scalingConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getScalingConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.Service)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.Service other = (com.google.cloud.metastore.v1.Service) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getNetwork() + .equals(other.getNetwork())) return false; + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (getPort() + != other.getPort()) return false; + if (state_ != other.state_) return false; + if (!getStateMessage() + .equals(other.getStateMessage())) return false; + if (!getArtifactGcsUri() + .equals(other.getArtifactGcsUri())) return false; + if (tier_ != other.tier_) return false; + if (hasMaintenanceWindow() != other.hasMaintenanceWindow()) return false; + if (hasMaintenanceWindow()) { + if (!getMaintenanceWindow() + .equals(other.getMaintenanceWindow())) return false; + } + if (!getUid() + .equals(other.getUid())) return false; + if (hasMetadataManagementActivity() != other.hasMetadataManagementActivity()) return false; + if (hasMetadataManagementActivity()) { + if (!getMetadataManagementActivity() + .equals(other.getMetadataManagementActivity())) return false; + } + if (releaseChannel_ != other.releaseChannel_) return false; + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig() + .equals(other.getEncryptionConfig())) return false; + } + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig() + .equals(other.getNetworkConfig())) return false; + } + if (databaseType_ != other.databaseType_) return false; + if (hasTelemetryConfig() != other.hasTelemetryConfig()) return false; + if (hasTelemetryConfig()) { + if (!getTelemetryConfig() + .equals(other.getTelemetryConfig())) return false; + } + if (hasScalingConfig() != other.hasScalingConfig()) return false; + if (hasScalingConfig()) { + if (!getScalingConfig() + .equals(other.getScalingConfig())) return false; + } + if (!getMetastoreConfigCase().equals(other.getMetastoreConfigCase())) return false; + switch (metastoreConfigCase_) { + case 5: + if (!getHiveMetastoreConfig() + .equals(other.getHiveMetastoreConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (37 * hash) + ARTIFACT_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactGcsUri().hashCode(); + hash = (37 * hash) + TIER_FIELD_NUMBER; + hash = (53 * hash) + tier_; + if (hasMaintenanceWindow()) { + hash = (37 * hash) + MAINTENANCE_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getMaintenanceWindow().hashCode(); + } + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasMetadataManagementActivity()) { + hash = (37 * hash) + METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER; + hash = (53 * hash) + getMetadataManagementActivity().hashCode(); + } + hash = (37 * hash) + RELEASE_CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + releaseChannel_; + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseType_; + if (hasTelemetryConfig()) { + hash = (37 * hash) + TELEMETRY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTelemetryConfig().hashCode(); + } + if (hasScalingConfig()) { + hash = (37 * hash) + SCALING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getScalingConfig().hashCode(); + } + switch (metastoreConfigCase_) { + case 5: + hash = (37 * hash) + HIVE_METASTORE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getHiveMetastoreConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.Service parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Service parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Service parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Service parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Service parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.Service parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Service parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Service parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Service parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Service parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.Service parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.Service parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.Service prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A managed metastore service that serves metadata queries.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.Service} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.Service) + com.google.cloud.metastore.v1.ServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Service_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.Service.class, com.google.cloud.metastore.v1.Service.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.Service.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (hiveMetastoreConfigBuilder_ != null) { + hiveMetastoreConfigBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + network_ = ""; + endpointUri_ = ""; + port_ = 0; + state_ = 0; + stateMessage_ = ""; + artifactGcsUri_ = ""; + tier_ = 0; + maintenanceWindow_ = null; + if (maintenanceWindowBuilder_ != null) { + maintenanceWindowBuilder_.dispose(); + maintenanceWindowBuilder_ = null; + } + uid_ = ""; + metadataManagementActivity_ = null; + if (metadataManagementActivityBuilder_ != null) { + metadataManagementActivityBuilder_.dispose(); + metadataManagementActivityBuilder_ = null; + } + releaseChannel_ = 0; + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + databaseType_ = 0; + telemetryConfig_ = null; + if (telemetryConfigBuilder_ != null) { + telemetryConfigBuilder_.dispose(); + telemetryConfigBuilder_ = null; + } + scalingConfig_ = null; + if (scalingConfigBuilder_ != null) { + scalingConfigBuilder_.dispose(); + scalingConfigBuilder_ = null; + } + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_Service_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Service getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.Service.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Service build() { + com.google.cloud.metastore.v1.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Service buildPartial() { + com.google.cloud.metastore.v1.Service result = new com.google.cloud.metastore.v1.Service(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.Service result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endpointUri_ = endpointUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.port_ = port_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.stateMessage_ = stateMessage_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.artifactGcsUri_ = artifactGcsUri_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.tier_ = tier_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.maintenanceWindow_ = maintenanceWindowBuilder_ == null + ? maintenanceWindow_ + : maintenanceWindowBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.metadataManagementActivity_ = metadataManagementActivityBuilder_ == null + ? metadataManagementActivity_ + : metadataManagementActivityBuilder_.build(); + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.releaseChannel_ = releaseChannel_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.encryptionConfig_ = encryptionConfigBuilder_ == null + ? encryptionConfig_ + : encryptionConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.networkConfig_ = networkConfigBuilder_ == null + ? networkConfig_ + : networkConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.databaseType_ = databaseType_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.telemetryConfig_ = telemetryConfigBuilder_ == null + ? telemetryConfig_ + : telemetryConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.scalingConfig_ = scalingConfigBuilder_ == null + ? scalingConfig_ + : scalingConfigBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1.Service result) { + result.metastoreConfigCase_ = metastoreConfigCase_; + result.metastoreConfig_ = this.metastoreConfig_; + if (metastoreConfigCase_ == 5 && + hiveMetastoreConfigBuilder_ != null) { + result.metastoreConfig_ = hiveMetastoreConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.Service) { + return mergeFrom((com.google.cloud.metastore.v1.Service)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.Service other) { + if (other == com.google.cloud.metastore.v1.Service.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getArtifactGcsUri().isEmpty()) { + artifactGcsUri_ = other.artifactGcsUri_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.tier_ != 0) { + setTierValue(other.getTierValue()); + } + if (other.hasMaintenanceWindow()) { + mergeMaintenanceWindow(other.getMaintenanceWindow()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.hasMetadataManagementActivity()) { + mergeMetadataManagementActivity(other.getMetadataManagementActivity()); + } + if (other.releaseChannel_ != 0) { + setReleaseChannelValue(other.getReleaseChannelValue()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + if (other.databaseType_ != 0) { + setDatabaseTypeValue(other.getDatabaseTypeValue()); + } + if (other.hasTelemetryConfig()) { + mergeTelemetryConfig(other.getTelemetryConfig()); + } + if (other.hasScalingConfig()) { + mergeScalingConfig(other.getScalingConfig()); + } + switch (other.getMetastoreConfigCase()) { + case HIVE_METASTORE_CONFIG: { + mergeHiveMetastoreConfig(other.getHiveMetastoreConfig()); + break; + } + case METASTORECONFIG_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: { + input.readMessage( + getHiveMetastoreConfigFieldBuilder().getBuilder(), + extensionRegistry); + metastoreConfigCase_ = 5; + break; + } // case 42 + case 58: { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 72: { + port_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 90: { + stateMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: { + artifactGcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 104: { + tier_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 104 + case 122: { + input.readMessage( + getMaintenanceWindowFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 122 + case 130: { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 130 + case 138: { + input.readMessage( + getMetadataManagementActivityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 138 + case 152: { + releaseChannel_ = input.readEnum(); + bitField0_ |= 0x00008000; + break; + } // case 152 + case 162: { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 162 + case 170: { + input.readMessage( + getNetworkConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 170 + case 176: { + databaseType_ = input.readEnum(); + bitField0_ |= 0x00040000; + break; + } // case 176 + case 186: { + input.readMessage( + getTelemetryConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 186 + case 194: { + input.readMessage( + getScalingConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 194 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int metastoreConfigCase_ = 0; + private java.lang.Object metastoreConfig_; + public MetastoreConfigCase + getMetastoreConfigCase() { + return MetastoreConfigCase.forNumber( + metastoreConfigCase_); + } + + public Builder clearMetastoreConfig() { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.HiveMetastoreConfig, com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder> hiveMetastoreConfigBuilder_; + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + @java.lang.Override + public boolean hasHiveMetastoreConfig() { + return metastoreConfigCase_ == 5; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfig getHiveMetastoreConfig() { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); + } else { + if (metastoreConfigCase_ == 5) { + return hiveMetastoreConfigBuilder_.getMessage(); + } + return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); + } + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder setHiveMetastoreConfig(com.google.cloud.metastore.v1.HiveMetastoreConfig value) { + if (hiveMetastoreConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metastoreConfig_ = value; + onChanged(); + } else { + hiveMetastoreConfigBuilder_.setMessage(value); + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder setHiveMetastoreConfig( + com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder builderForValue) { + if (hiveMetastoreConfigBuilder_ == null) { + metastoreConfig_ = builderForValue.build(); + onChanged(); + } else { + hiveMetastoreConfigBuilder_.setMessage(builderForValue.build()); + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder mergeHiveMetastoreConfig(com.google.cloud.metastore.v1.HiveMetastoreConfig value) { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5 && + metastoreConfig_ != com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance()) { + metastoreConfig_ = com.google.cloud.metastore.v1.HiveMetastoreConfig.newBuilder((com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_) + .mergeFrom(value).buildPartial(); + } else { + metastoreConfig_ = value; + } + onChanged(); + } else { + if (metastoreConfigCase_ == 5) { + hiveMetastoreConfigBuilder_.mergeFrom(value); + } else { + hiveMetastoreConfigBuilder_.setMessage(value); + } + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder clearHiveMetastoreConfig() { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5) { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + onChanged(); + } + } else { + if (metastoreConfigCase_ == 5) { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + } + hiveMetastoreConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + public com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder getHiveMetastoreConfigBuilder() { + return getHiveMetastoreConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder() { + if ((metastoreConfigCase_ == 5) && (hiveMetastoreConfigBuilder_ != null)) { + return hiveMetastoreConfigBuilder_.getMessageOrBuilder(); + } else { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); + } + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.HiveMetastoreConfig, com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder> + getHiveMetastoreConfigFieldBuilder() { + if (hiveMetastoreConfigBuilder_ == null) { + if (!(metastoreConfigCase_ == 5)) { + metastoreConfig_ = com.google.cloud.metastore.v1.HiveMetastoreConfig.getDefaultInstance(); + } + hiveMetastoreConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.HiveMetastoreConfig, com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder>( + (com.google.cloud.metastore.v1.HiveMetastoreConfig) metastoreConfig_, + getParentForChildren(), + isClean()); + metastoreConfig_ = null; + } + metastoreConfigCase_ = 5; + onChanged(); + return hiveMetastoreConfigBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object network_ = ""; + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + public com.google.protobuf.ByteString + getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int port_ ; + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000080); + port_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Service.State getState() { + com.google.cloud.metastore.v1.Service.State result = com.google.cloud.metastore.v1.Service.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1.Service.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1.Service.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + stateMessage_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + stateMessage_ = getDefaultInstance().getStateMessage(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + stateMessage_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object artifactGcsUri_ = ""; + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + public java.lang.String getArtifactGcsUri() { + java.lang.Object ref = artifactGcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactGcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + public com.google.protobuf.ByteString + getArtifactGcsUriBytes() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The artifactGcsUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + artifactGcsUri_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearArtifactGcsUri() { + artifactGcsUri_ = getDefaultInstance().getArtifactGcsUri(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for artifactGcsUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + artifactGcsUri_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private int tier_ = 0; + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + @java.lang.Override public int getTierValue() { + return tier_; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @param value The enum numeric value on the wire for tier to set. + * @return This builder for chaining. + */ + public Builder setTierValue(int value) { + tier_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @return The tier. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Service.Tier getTier() { + com.google.cloud.metastore.v1.Service.Tier result = com.google.cloud.metastore.v1.Service.Tier.forNumber(tier_); + return result == null ? com.google.cloud.metastore.v1.Service.Tier.UNRECOGNIZED : result; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @param value The tier to set. + * @return This builder for chaining. + */ + public Builder setTier(com.google.cloud.metastore.v1.Service.Tier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + tier_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @return This builder for chaining. + */ + public Builder clearTier() { + bitField0_ = (bitField0_ & ~0x00000800); + tier_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.MaintenanceWindow maintenanceWindow_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MaintenanceWindow, com.google.cloud.metastore.v1.MaintenanceWindow.Builder, com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder> maintenanceWindowBuilder_; + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + public boolean hasMaintenanceWindow() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + public com.google.cloud.metastore.v1.MaintenanceWindow getMaintenanceWindow() { + if (maintenanceWindowBuilder_ == null) { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } else { + return maintenanceWindowBuilder_.getMessage(); + } + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + public Builder setMaintenanceWindow(com.google.cloud.metastore.v1.MaintenanceWindow value) { + if (maintenanceWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maintenanceWindow_ = value; + } else { + maintenanceWindowBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + public Builder setMaintenanceWindow( + com.google.cloud.metastore.v1.MaintenanceWindow.Builder builderForValue) { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindow_ = builderForValue.build(); + } else { + maintenanceWindowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + public Builder mergeMaintenanceWindow(com.google.cloud.metastore.v1.MaintenanceWindow value) { + if (maintenanceWindowBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) && + maintenanceWindow_ != null && + maintenanceWindow_ != com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance()) { + getMaintenanceWindowBuilder().mergeFrom(value); + } else { + maintenanceWindow_ = value; + } + } else { + maintenanceWindowBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + public Builder clearMaintenanceWindow() { + bitField0_ = (bitField0_ & ~0x00001000); + maintenanceWindow_ = null; + if (maintenanceWindowBuilder_ != null) { + maintenanceWindowBuilder_.dispose(); + maintenanceWindowBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + public com.google.cloud.metastore.v1.MaintenanceWindow.Builder getMaintenanceWindowBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getMaintenanceWindowFieldBuilder().getBuilder(); + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + public com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder() { + if (maintenanceWindowBuilder_ != null) { + return maintenanceWindowBuilder_.getMessageOrBuilder(); + } else { + return maintenanceWindow_ == null ? + com.google.cloud.metastore.v1.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MaintenanceWindow, com.google.cloud.metastore.v1.MaintenanceWindow.Builder, com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder> + getMaintenanceWindowFieldBuilder() { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MaintenanceWindow, com.google.cloud.metastore.v1.MaintenanceWindow.Builder, com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder>( + getMaintenanceWindow(), + getParentForChildren(), + isClean()); + maintenanceWindow_ = null; + } + return maintenanceWindowBuilder_; + } + + private java.lang.Object uid_ = ""; + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uid_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.MetadataManagementActivity metadataManagementActivity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataManagementActivity, com.google.cloud.metastore.v1.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder> metadataManagementActivityBuilder_; + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + public boolean hasMetadataManagementActivity() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + public com.google.cloud.metastore.v1.MetadataManagementActivity getMetadataManagementActivity() { + if (metadataManagementActivityBuilder_ == null) { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } else { + return metadataManagementActivityBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataManagementActivity(com.google.cloud.metastore.v1.MetadataManagementActivity value) { + if (metadataManagementActivityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataManagementActivity_ = value; + } else { + metadataManagementActivityBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataManagementActivity( + com.google.cloud.metastore.v1.MetadataManagementActivity.Builder builderForValue) { + if (metadataManagementActivityBuilder_ == null) { + metadataManagementActivity_ = builderForValue.build(); + } else { + metadataManagementActivityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeMetadataManagementActivity(com.google.cloud.metastore.v1.MetadataManagementActivity value) { + if (metadataManagementActivityBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) && + metadataManagementActivity_ != null && + metadataManagementActivity_ != com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance()) { + getMetadataManagementActivityBuilder().mergeFrom(value); + } else { + metadataManagementActivity_ = value; + } + } else { + metadataManagementActivityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearMetadataManagementActivity() { + bitField0_ = (bitField0_ & ~0x00004000); + metadataManagementActivity_ = null; + if (metadataManagementActivityBuilder_ != null) { + metadataManagementActivityBuilder_.dispose(); + metadataManagementActivityBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.MetadataManagementActivity.Builder getMetadataManagementActivityBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getMetadataManagementActivityFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder() { + if (metadataManagementActivityBuilder_ != null) { + return metadataManagementActivityBuilder_.getMessageOrBuilder(); + } else { + return metadataManagementActivity_ == null ? + com.google.cloud.metastore.v1.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataManagementActivity, com.google.cloud.metastore.v1.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder> + getMetadataManagementActivityFieldBuilder() { + if (metadataManagementActivityBuilder_ == null) { + metadataManagementActivityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataManagementActivity, com.google.cloud.metastore.v1.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder>( + getMetadataManagementActivity(), + getParentForChildren(), + isClean()); + metadataManagementActivity_ = null; + } + return metadataManagementActivityBuilder_; + } + + private int releaseChannel_ = 0; + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + @java.lang.Override public int getReleaseChannelValue() { + return releaseChannel_; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The enum numeric value on the wire for releaseChannel to set. + * @return This builder for chaining. + */ + public Builder setReleaseChannelValue(int value) { + releaseChannel_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Service.ReleaseChannel getReleaseChannel() { + com.google.cloud.metastore.v1.Service.ReleaseChannel result = com.google.cloud.metastore.v1.Service.ReleaseChannel.forNumber(releaseChannel_); + return result == null ? com.google.cloud.metastore.v1.Service.ReleaseChannel.UNRECOGNIZED : result; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The releaseChannel to set. + * @return This builder for chaining. + */ + public Builder setReleaseChannel(com.google.cloud.metastore.v1.Service.ReleaseChannel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00008000; + releaseChannel_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearReleaseChannel() { + bitField0_ = (bitField0_ & ~0x00008000); + releaseChannel_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.EncryptionConfig, com.google.cloud.metastore.v1.EncryptionConfig.Builder, com.google.cloud.metastore.v1.EncryptionConfigOrBuilder> encryptionConfigBuilder_; + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + public com.google.cloud.metastore.v1.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setEncryptionConfig(com.google.cloud.metastore.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setEncryptionConfig( + com.google.cloud.metastore.v1.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder mergeEncryptionConfig(com.google.cloud.metastore.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) && + encryptionConfig_ != null && + encryptionConfig_ != com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00010000); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1.EncryptionConfig.Builder getEncryptionConfigBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null ? + com.google.cloud.metastore.v1.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.EncryptionConfig, com.google.cloud.metastore.v1.EncryptionConfig.Builder, com.google.cloud.metastore.v1.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.EncryptionConfig, com.google.cloud.metastore.v1.EncryptionConfig.Builder, com.google.cloud.metastore.v1.EncryptionConfigOrBuilder>( + getEncryptionConfig(), + getParentForChildren(), + isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private com.google.cloud.metastore.v1.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig, com.google.cloud.metastore.v1.NetworkConfig.Builder, com.google.cloud.metastore.v1.NetworkConfigOrBuilder> networkConfigBuilder_; + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + public com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null ? com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + public Builder setNetworkConfig(com.google.cloud.metastore.v1.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + } else { + networkConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + public Builder setNetworkConfig( + com.google.cloud.metastore.v1.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + public Builder mergeNetworkConfig(com.google.cloud.metastore.v1.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + networkConfig_ != null && + networkConfig_ != com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance()) { + getNetworkConfigBuilder().mergeFrom(value); + } else { + networkConfig_ = value; + } + } else { + networkConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x00020000); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + public com.google.cloud.metastore.v1.NetworkConfig.Builder getNetworkConfigBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + public com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null ? + com.google.cloud.metastore.v1.NetworkConfig.getDefaultInstance() : networkConfig_; + } + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig, com.google.cloud.metastore.v1.NetworkConfig.Builder, com.google.cloud.metastore.v1.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.NetworkConfig, com.google.cloud.metastore.v1.NetworkConfig.Builder, com.google.cloud.metastore.v1.NetworkConfigOrBuilder>( + getNetworkConfig(), + getParentForChildren(), + isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + + private int databaseType_ = 0; + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The enum numeric value on the wire for databaseType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseTypeValue(int value) { + databaseType_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Service.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1.Service.DatabaseType result = com.google.cloud.metastore.v1.Service.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1.Service.DatabaseType.UNRECOGNIZED : result; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The databaseType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseType(com.google.cloud.metastore.v1.Service.DatabaseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00040000; + databaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearDatabaseType() { + bitField0_ = (bitField0_ & ~0x00040000); + databaseType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1.TelemetryConfig telemetryConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.TelemetryConfig, com.google.cloud.metastore.v1.TelemetryConfig.Builder, com.google.cloud.metastore.v1.TelemetryConfigOrBuilder> telemetryConfigBuilder_; + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + public boolean hasTelemetryConfig() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + public com.google.cloud.metastore.v1.TelemetryConfig getTelemetryConfig() { + if (telemetryConfigBuilder_ == null) { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } else { + return telemetryConfigBuilder_.getMessage(); + } + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + public Builder setTelemetryConfig(com.google.cloud.metastore.v1.TelemetryConfig value) { + if (telemetryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + telemetryConfig_ = value; + } else { + telemetryConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + public Builder setTelemetryConfig( + com.google.cloud.metastore.v1.TelemetryConfig.Builder builderForValue) { + if (telemetryConfigBuilder_ == null) { + telemetryConfig_ = builderForValue.build(); + } else { + telemetryConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + public Builder mergeTelemetryConfig(com.google.cloud.metastore.v1.TelemetryConfig value) { + if (telemetryConfigBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) && + telemetryConfig_ != null && + telemetryConfig_ != com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance()) { + getTelemetryConfigBuilder().mergeFrom(value); + } else { + telemetryConfig_ = value; + } + } else { + telemetryConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + public Builder clearTelemetryConfig() { + bitField0_ = (bitField0_ & ~0x00080000); + telemetryConfig_ = null; + if (telemetryConfigBuilder_ != null) { + telemetryConfigBuilder_.dispose(); + telemetryConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + public com.google.cloud.metastore.v1.TelemetryConfig.Builder getTelemetryConfigBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getTelemetryConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + public com.google.cloud.metastore.v1.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { + if (telemetryConfigBuilder_ != null) { + return telemetryConfigBuilder_.getMessageOrBuilder(); + } else { + return telemetryConfig_ == null ? + com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.TelemetryConfig, com.google.cloud.metastore.v1.TelemetryConfig.Builder, com.google.cloud.metastore.v1.TelemetryConfigOrBuilder> + getTelemetryConfigFieldBuilder() { + if (telemetryConfigBuilder_ == null) { + telemetryConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.TelemetryConfig, com.google.cloud.metastore.v1.TelemetryConfig.Builder, com.google.cloud.metastore.v1.TelemetryConfigOrBuilder>( + getTelemetryConfig(), + getParentForChildren(), + isClean()); + telemetryConfig_ = null; + } + return telemetryConfigBuilder_; + } + + private com.google.cloud.metastore.v1.ScalingConfig scalingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.ScalingConfig, com.google.cloud.metastore.v1.ScalingConfig.Builder, com.google.cloud.metastore.v1.ScalingConfigOrBuilder> scalingConfigBuilder_; + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + public boolean hasScalingConfig() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + public com.google.cloud.metastore.v1.ScalingConfig getScalingConfig() { + if (scalingConfigBuilder_ == null) { + return scalingConfig_ == null ? com.google.cloud.metastore.v1.ScalingConfig.getDefaultInstance() : scalingConfig_; + } else { + return scalingConfigBuilder_.getMessage(); + } + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + public Builder setScalingConfig(com.google.cloud.metastore.v1.ScalingConfig value) { + if (scalingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scalingConfig_ = value; + } else { + scalingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + public Builder setScalingConfig( + com.google.cloud.metastore.v1.ScalingConfig.Builder builderForValue) { + if (scalingConfigBuilder_ == null) { + scalingConfig_ = builderForValue.build(); + } else { + scalingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + public Builder mergeScalingConfig(com.google.cloud.metastore.v1.ScalingConfig value) { + if (scalingConfigBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) && + scalingConfig_ != null && + scalingConfig_ != com.google.cloud.metastore.v1.ScalingConfig.getDefaultInstance()) { + getScalingConfigBuilder().mergeFrom(value); + } else { + scalingConfig_ = value; + } + } else { + scalingConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + public Builder clearScalingConfig() { + bitField0_ = (bitField0_ & ~0x00100000); + scalingConfig_ = null; + if (scalingConfigBuilder_ != null) { + scalingConfigBuilder_.dispose(); + scalingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + public com.google.cloud.metastore.v1.ScalingConfig.Builder getScalingConfigBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getScalingConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + public com.google.cloud.metastore.v1.ScalingConfigOrBuilder getScalingConfigOrBuilder() { + if (scalingConfigBuilder_ != null) { + return scalingConfigBuilder_.getMessageOrBuilder(); + } else { + return scalingConfig_ == null ? + com.google.cloud.metastore.v1.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.ScalingConfig, com.google.cloud.metastore.v1.ScalingConfig.Builder, com.google.cloud.metastore.v1.ScalingConfigOrBuilder> + getScalingConfigFieldBuilder() { + if (scalingConfigBuilder_ == null) { + scalingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.ScalingConfig, com.google.cloud.metastore.v1.ScalingConfig.Builder, com.google.cloud.metastore.v1.ScalingConfigOrBuilder>( + getScalingConfig(), + getParentForChildren(), + isClean()); + scalingConfig_ = null; + } + return scalingConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.Service) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.Service) + private static final com.google.cloud.metastore.v1.Service DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.Service(); + } + + public static com.google.cloud.metastore.v1.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Service parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceName.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceName.java rename to owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceOrBuilder.java new file mode 100644 index 000000000000..c840dc9842d9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ServiceOrBuilder.java @@ -0,0 +1,551 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ServiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.Service) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + boolean hasHiveMetastoreConfig(); + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + com.google.cloud.metastore.v1.HiveMetastoreConfig getHiveMetastoreConfig(); + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig hive_metastore_config = 5; + */ + com.google.cloud.metastore.v1.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder(); + + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + java.lang.String getNetwork(); + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + com.google.protobuf.ByteString + getNetworkBytes(); + + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + /** + *
+   * The TCP port at which the metastore service is reached. Default: 9083.
+   * 
+ * + * int32 port = 9; + * @return The port. + */ + int getPort(); + + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1.Service.State getState(); + + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString + getStateMessageBytes(); + + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + java.lang.String getArtifactGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + com.google.protobuf.ByteString + getArtifactGcsUriBytes(); + + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + int getTierValue(); + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1.Service.Tier tier = 13; + * @return The tier. + */ + com.google.cloud.metastore.v1.Service.Tier getTier(); + + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + boolean hasMaintenanceWindow(); + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + com.google.cloud.metastore.v1.MaintenanceWindow getMaintenanceWindow(); + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1.MaintenanceWindow maintenance_window = 15; + */ + com.google.cloud.metastore.v1.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder(); + + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + java.lang.String getUid(); + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); + + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + boolean hasMetadataManagementActivity(); + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + com.google.cloud.metastore.v1.MetadataManagementActivity getMetadataManagementActivity(); + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder(); + + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + int getReleaseChannelValue(); + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + com.google.cloud.metastore.v1.Service.ReleaseChannel getReleaseChannel(); + + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + com.google.cloud.metastore.v1.EncryptionConfig getEncryptionConfig(); + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); + + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + com.google.cloud.metastore.v1.NetworkConfig getNetworkConfig(); + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.NetworkConfig network_config = 21; + */ + com.google.cloud.metastore.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); + + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + int getDatabaseTypeValue(); + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + com.google.cloud.metastore.v1.Service.DatabaseType getDatabaseType(); + + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + boolean hasTelemetryConfig(); + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + com.google.cloud.metastore.v1.TelemetryConfig getTelemetryConfig(); + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig telemetry_config = 23; + */ + com.google.cloud.metastore.v1.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder(); + + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + boolean hasScalingConfig(); + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + com.google.cloud.metastore.v1.ScalingConfig getScalingConfig(); + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1.ScalingConfig scaling_config = 24; + */ + com.google.cloud.metastore.v1.ScalingConfigOrBuilder getScalingConfigOrBuilder(); + + public com.google.cloud.metastore.v1.Service.MetastoreConfigCase getMetastoreConfigCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfig.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfig.java new file mode 100644 index 000000000000..f6a27030cd5b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfig.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Telemetry Configuration for the Dataproc Metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.TelemetryConfig} + */ +public final class TelemetryConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.TelemetryConfig) + TelemetryConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use TelemetryConfig.newBuilder() to construct. + private TelemetryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TelemetryConfig() { + logFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TelemetryConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_TelemetryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_TelemetryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.TelemetryConfig.class, com.google.cloud.metastore.v1.TelemetryConfig.Builder.class); + } + + /** + * Protobuf enum {@code google.cloud.metastore.v1.TelemetryConfig.LogFormat} + */ + public enum LogFormat + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The LOG_FORMAT is not set.
+     * 
+ * + * LOG_FORMAT_UNSPECIFIED = 0; + */ + LOG_FORMAT_UNSPECIFIED(0), + /** + *
+     * Logging output uses the legacy `textPayload` format.
+     * 
+ * + * LEGACY = 1; + */ + LEGACY(1), + /** + *
+     * Logging output uses the `jsonPayload` format.
+     * 
+ * + * JSON = 2; + */ + JSON(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The LOG_FORMAT is not set.
+     * 
+ * + * LOG_FORMAT_UNSPECIFIED = 0; + */ + public static final int LOG_FORMAT_UNSPECIFIED_VALUE = 0; + /** + *
+     * Logging output uses the legacy `textPayload` format.
+     * 
+ * + * LEGACY = 1; + */ + public static final int LEGACY_VALUE = 1; + /** + *
+     * Logging output uses the `jsonPayload` format.
+     * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LogFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LogFormat forNumber(int value) { + switch (value) { + case 0: return LOG_FORMAT_UNSPECIFIED; + case 1: return LEGACY; + case 2: return JSON; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LogFormat> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LogFormat findValueByNumber(int number) { + return LogFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1.TelemetryConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final LogFormat[] VALUES = values(); + + public static LogFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LogFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1.TelemetryConfig.LogFormat) + } + + public static final int LOG_FORMAT_FIELD_NUMBER = 1; + private int logFormat_ = 0; + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + @java.lang.Override public int getLogFormatValue() { + return logFormat_; + } + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + @java.lang.Override public com.google.cloud.metastore.v1.TelemetryConfig.LogFormat getLogFormat() { + com.google.cloud.metastore.v1.TelemetryConfig.LogFormat result = com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.forNumber(logFormat_); + return result == null ? com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (logFormat_ != com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED.getNumber()) { + output.writeEnum(1, logFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (logFormat_ != com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, logFormat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.TelemetryConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.TelemetryConfig other = (com.google.cloud.metastore.v1.TelemetryConfig) obj; + + if (logFormat_ != other.logFormat_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOG_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + logFormat_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.TelemetryConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.TelemetryConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Telemetry Configuration for the Dataproc Metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.TelemetryConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.TelemetryConfig) + com.google.cloud.metastore.v1.TelemetryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_TelemetryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_TelemetryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.TelemetryConfig.class, com.google.cloud.metastore.v1.TelemetryConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.TelemetryConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + logFormat_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_TelemetryConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.TelemetryConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.TelemetryConfig build() { + com.google.cloud.metastore.v1.TelemetryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.TelemetryConfig buildPartial() { + com.google.cloud.metastore.v1.TelemetryConfig result = new com.google.cloud.metastore.v1.TelemetryConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.TelemetryConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.logFormat_ = logFormat_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.TelemetryConfig) { + return mergeFrom((com.google.cloud.metastore.v1.TelemetryConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.TelemetryConfig other) { + if (other == com.google.cloud.metastore.v1.TelemetryConfig.getDefaultInstance()) return this; + if (other.logFormat_ != 0) { + setLogFormatValue(other.getLogFormatValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + logFormat_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int logFormat_ = 0; + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + @java.lang.Override public int getLogFormatValue() { + return logFormat_; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @param value The enum numeric value on the wire for logFormat to set. + * @return This builder for chaining. + */ + public Builder setLogFormatValue(int value) { + logFormat_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.TelemetryConfig.LogFormat getLogFormat() { + com.google.cloud.metastore.v1.TelemetryConfig.LogFormat result = com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.forNumber(logFormat_); + return result == null ? com.google.cloud.metastore.v1.TelemetryConfig.LogFormat.UNRECOGNIZED : result; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @param value The logFormat to set. + * @return This builder for chaining. + */ + public Builder setLogFormat(com.google.cloud.metastore.v1.TelemetryConfig.LogFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + logFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @return This builder for chaining. + */ + public Builder clearLogFormat() { + bitField0_ = (bitField0_ & ~0x00000001); + logFormat_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.TelemetryConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.TelemetryConfig) + private static final com.google.cloud.metastore.v1.TelemetryConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.TelemetryConfig(); + } + + public static com.google.cloud.metastore.v1.TelemetryConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TelemetryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.TelemetryConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfigOrBuilder.java new file mode 100644 index 000000000000..f82fd1363b8d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/TelemetryConfigOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface TelemetryConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.TelemetryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + int getLogFormatValue(); + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + com.google.cloud.metastore.v1.TelemetryConfig.LogFormat getLogFormat(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequest.java new file mode 100644 index 000000000000..d057e2f16288 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequest.java @@ -0,0 +1,1173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for UpdateFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.UpdateFederationRequest} + */ +public final class UpdateFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.UpdateFederationRequest) + UpdateFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateFederationRequest.newBuilder() to construct. + private UpdateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateFederationRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_UpdateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.UpdateFederationRequest.class, com.google.cloud.metastore.v1.UpdateFederationRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int FEDERATION_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1.Federation federation_; + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + @java.lang.Override + public boolean hasFederation() { + return federation_ != null; + } + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Federation getFederation() { + return federation_ == null ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() : federation_; + } + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder() { + return federation_ == null ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() : federation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (federation_ != null) { + output.writeMessage(2, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (federation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.UpdateFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.UpdateFederationRequest other = (com.google.cloud.metastore.v1.UpdateFederationRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasFederation() != other.hasFederation()) return false; + if (hasFederation()) { + if (!getFederation() + .equals(other.getFederation())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasFederation()) { + hash = (37 * hash) + FEDERATION_FIELD_NUMBER; + hash = (53 * hash) + getFederation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.UpdateFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.UpdateFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.UpdateFederationRequest) + com.google.cloud.metastore.v1.UpdateFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_UpdateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.UpdateFederationRequest.class, com.google.cloud.metastore.v1.UpdateFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.UpdateFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreFederationProto.internal_static_google_cloud_metastore_v1_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.UpdateFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateFederationRequest build() { + com.google.cloud.metastore.v1.UpdateFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateFederationRequest buildPartial() { + com.google.cloud.metastore.v1.UpdateFederationRequest result = new com.google.cloud.metastore.v1.UpdateFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.UpdateFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.federation_ = federationBuilder_ == null + ? federation_ + : federationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.UpdateFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1.UpdateFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.UpdateFederationRequest other) { + if (other == com.google.cloud.metastore.v1.UpdateFederationRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasFederation()) { + mergeFederation(other.getFederation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getFederationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1.Federation federation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder> federationBuilder_; + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + public boolean hasFederation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + public com.google.cloud.metastore.v1.Federation getFederation() { + if (federationBuilder_ == null) { + return federation_ == null ? com.google.cloud.metastore.v1.Federation.getDefaultInstance() : federation_; + } else { + return federationBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation(com.google.cloud.metastore.v1.Federation value) { + if (federationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + federation_ = value; + } else { + federationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation( + com.google.cloud.metastore.v1.Federation.Builder builderForValue) { + if (federationBuilder_ == null) { + federation_ = builderForValue.build(); + } else { + federationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFederation(com.google.cloud.metastore.v1.Federation value) { + if (federationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + federation_ != null && + federation_ != com.google.cloud.metastore.v1.Federation.getDefaultInstance()) { + getFederationBuilder().mergeFrom(value); + } else { + federation_ = value; + } + } else { + federationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFederation() { + bitField0_ = (bitField0_ & ~0x00000002); + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.Federation.Builder getFederationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFederationFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder() { + if (federationBuilder_ != null) { + return federationBuilder_.getMessageOrBuilder(); + } else { + return federation_ == null ? + com.google.cloud.metastore.v1.Federation.getDefaultInstance() : federation_; + } + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder> + getFederationFieldBuilder() { + if (federationBuilder_ == null) { + federationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Federation, com.google.cloud.metastore.v1.Federation.Builder, com.google.cloud.metastore.v1.FederationOrBuilder>( + getFederation(), + getParentForChildren(), + isClean()); + federation_ = null; + } + return federationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.UpdateFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.UpdateFederationRequest) + private static final com.google.cloud.metastore.v1.UpdateFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.UpdateFederationRequest(); + } + + public static com.google.cloud.metastore.v1.UpdateFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequestOrBuilder.java new file mode 100644 index 000000000000..164af5facf01 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateFederationRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore_federation.proto + +package com.google.cloud.metastore.v1; + +public interface UpdateFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.UpdateFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + boolean hasFederation(); + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + com.google.cloud.metastore.v1.Federation getFederation(); + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1.FederationOrBuilder getFederationOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequest.java new file mode 100644 index 000000000000..1689fd2847ae --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.UpdateMetadataImportRequest} + */ +public final class UpdateMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.UpdateMetadataImportRequest) + UpdateMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateMetadataImportRequest.newBuilder() to construct. + private UpdateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateMetadataImportRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.UpdateMetadataImportRequest.class, com.google.cloud.metastore.v1.UpdateMetadataImportRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int METADATA_IMPORT_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1.MetadataImport metadataImport_; + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + @java.lang.Override + public boolean hasMetadataImport() { + return metadataImport_ != null; + } + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImport getMetadataImport() { + return metadataImport_ == null ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() : metadataImport_; + } + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder() { + return metadataImport_ == null ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() : metadataImport_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (metadataImport_ != null) { + output.writeMessage(2, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (metadataImport_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.UpdateMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.UpdateMetadataImportRequest other = (com.google.cloud.metastore.v1.UpdateMetadataImportRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasMetadataImport() != other.hasMetadataImport()) return false; + if (hasMetadataImport()) { + if (!getMetadataImport() + .equals(other.getMetadataImport())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasMetadataImport()) { + hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImport().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.UpdateMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.UpdateMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.UpdateMetadataImportRequest) + com.google.cloud.metastore.v1.UpdateMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.UpdateMetadataImportRequest.class, com.google.cloud.metastore.v1.UpdateMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.UpdateMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.UpdateMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateMetadataImportRequest build() { + com.google.cloud.metastore.v1.UpdateMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1.UpdateMetadataImportRequest result = new com.google.cloud.metastore.v1.UpdateMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.UpdateMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataImport_ = metadataImportBuilder_ == null + ? metadataImport_ + : metadataImportBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.UpdateMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1.UpdateMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.UpdateMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1.UpdateMetadataImportRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasMetadataImport()) { + mergeMetadataImport(other.getMetadataImport()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getMetadataImportFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1.MetadataImport metadataImport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder> metadataImportBuilder_; + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + public boolean hasMetadataImport() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + public com.google.cloud.metastore.v1.MetadataImport getMetadataImport() { + if (metadataImportBuilder_ == null) { + return metadataImport_ == null ? com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() : metadataImport_; + } else { + return metadataImportBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport(com.google.cloud.metastore.v1.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataImport_ = value; + } else { + metadataImportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport( + com.google.cloud.metastore.v1.MetadataImport.Builder builderForValue) { + if (metadataImportBuilder_ == null) { + metadataImport_ = builderForValue.build(); + } else { + metadataImportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeMetadataImport(com.google.cloud.metastore.v1.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadataImport_ != null && + metadataImport_ != com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance()) { + getMetadataImportBuilder().mergeFrom(value); + } else { + metadataImport_ = value; + } + } else { + metadataImportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearMetadataImport() { + bitField0_ = (bitField0_ & ~0x00000002); + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.MetadataImport.Builder getMetadataImportBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataImportFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder() { + if (metadataImportBuilder_ != null) { + return metadataImportBuilder_.getMessageOrBuilder(); + } else { + return metadataImport_ == null ? + com.google.cloud.metastore.v1.MetadataImport.getDefaultInstance() : metadataImport_; + } + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder> + getMetadataImportFieldBuilder() { + if (metadataImportBuilder_ == null) { + metadataImportBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.MetadataImport, com.google.cloud.metastore.v1.MetadataImport.Builder, com.google.cloud.metastore.v1.MetadataImportOrBuilder>( + getMetadataImport(), + getParentForChildren(), + isClean()); + metadataImport_ = null; + } + return metadataImportBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.UpdateMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.UpdateMetadataImportRequest) + private static final com.google.cloud.metastore.v1.UpdateMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.UpdateMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1.UpdateMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..2999d336da87 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateMetadataImportRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface UpdateMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.UpdateMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + boolean hasMetadataImport(); + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + com.google.cloud.metastore.v1.MetadataImport getMetadataImport(); + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1.MetadataImportOrBuilder getMetadataImportOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequest.java new file mode 100644 index 000000000000..964fe3d82e89 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + *
+ * Request message for
+ * [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.UpdateServiceRequest} + */ +public final class UpdateServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.UpdateServiceRequest) + UpdateServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateServiceRequest.newBuilder() to construct. + private UpdateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateServiceRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.UpdateServiceRequest.class, com.google.cloud.metastore.v1.UpdateServiceRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SERVICE_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1.Service service_; + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.Service getService() { + return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; + } + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder() { + return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (service_ != null) { + output.writeMessage(2, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (service_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1.UpdateServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.UpdateServiceRequest other = (com.google.cloud.metastore.v1.UpdateServiceRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService() + .equals(other.getService())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1.UpdateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1.UpdateServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.UpdateServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.UpdateServiceRequest) + com.google.cloud.metastore.v1.UpdateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.UpdateServiceRequest.class, com.google.cloud.metastore.v1.UpdateServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.UpdateServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1.MetastoreProto.internal_static_google_cloud_metastore_v1_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.UpdateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateServiceRequest build() { + com.google.cloud.metastore.v1.UpdateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateServiceRequest buildPartial() { + com.google.cloud.metastore.v1.UpdateServiceRequest result = new com.google.cloud.metastore.v1.UpdateServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.UpdateServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.service_ = serviceBuilder_ == null + ? service_ + : serviceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1.UpdateServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1.UpdateServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.UpdateServiceRequest other) { + if (other == com.google.cloud.metastore.v1.UpdateServiceRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getServiceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1.Service service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder> serviceBuilder_; + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + public boolean hasService() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + public com.google.cloud.metastore.v1.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null ? com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService(com.google.cloud.metastore.v1.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + } else { + serviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService( + com.google.cloud.metastore.v1.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeService(com.google.cloud.metastore.v1.Service value) { + if (serviceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + service_ != null && + service_ != com.google.cloud.metastore.v1.Service.getDefaultInstance()) { + getServiceBuilder().mergeFrom(value); + } else { + service_ = value; + } + } else { + serviceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000002); + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.Service.Builder getServiceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null ? + com.google.cloud.metastore.v1.Service.getDefaultInstance() : service_; + } + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1.Service, com.google.cloud.metastore.v1.Service.Builder, com.google.cloud.metastore.v1.ServiceOrBuilder>( + getService(), + getParentForChildren(), + isClean()); + service_ = null; + } + return serviceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1.UpdateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.UpdateServiceRequest) + private static final com.google.cloud.metastore.v1.UpdateServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.UpdateServiceRequest(); + } + + public static com.google.cloud.metastore.v1.UpdateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.UpdateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequestOrBuilder.java new file mode 100644 index 000000000000..f6b94af51f48 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/UpdateServiceRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface UpdateServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.UpdateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + boolean hasService(); + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + com.google.cloud.metastore.v1.Service getService(); + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1.ServiceOrBuilder getServiceOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore.proto b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore.proto new file mode 100644 index 000000000000..703538155886 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore.proto @@ -0,0 +1,1443 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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. + +syntax = "proto3"; + +package google.cloud.metastore.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/dayofweek.proto"; + +option go_package = "cloud.google.com/go/metastore/apiv1/metastorepb;metastorepb"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreProto"; +option java_package = "com.google.cloud.metastore.v1"; +option php_namespace = "Google\\Cloud\\Metastore\\V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Subnetwork" + pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" +}; +option (google.api.resource_definition) = { + type: "dataplex.googleapis.com/Lake" + pattern: "projects/{project}/locations/{location}/lakes/{lake}" +}; + +// 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: +// +// * The service works with a collection of Google Cloud projects, named: +// `/projects/*` +// * Each project has a collection of available locations, named: `/locations/*` +// (a location must refer to a Google Cloud `region`) +// * Each location has a collection of services, named: `/services/*` +// * Dataproc Metastore services are resources with names of the form: +// +// `/projects/{project_number}/locations/{location_id}/services/{service_id}`. +service DataprocMetastore { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists services in a project and location. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/services" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single service. + rpc GetService(GetServiceRequest) returns (Service) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/services/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore service in a project and location. + rpc CreateService(CreateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/services" + body: "service" + }; + option (google.api.method_signature) = "parent,service,service_id"; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Updates the parameters of a single service. + rpc UpdateService(UpdateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{service.name=projects/*/locations/*/services/*}" + body: "service" + }; + option (google.api.method_signature) = "service,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Deletes a single service. + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/services/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Lists imports in a service. + rpc ListMetadataImports(ListMetadataImportsRequest) + returns (ListMetadataImportsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single import. + rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/services/*/metadataImports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new MetadataImport in a given project and location. + rpc CreateMetadataImport(CreateMetadataImportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports" + body: "metadata_import" + }; + option (google.api.method_signature) = + "parent,metadata_import,metadata_import_id"; + option (google.longrunning.operation_info) = { + response_type: "MetadataImport" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Updates a single import. + // Only the description field of MetadataImport is supported to be updated. + rpc UpdateMetadataImport(UpdateMetadataImportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}" + body: "metadata_import" + }; + option (google.api.method_signature) = "metadata_import,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MetadataImport" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Exports metadata from a service. + rpc ExportMetadata(ExportMetadataRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{service=projects/*/locations/*/services/*}:exportMetadata" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MetadataExport" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Restores a service from a backup. + rpc RestoreService(RestoreServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{service=projects/*/locations/*/services/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "service,backup"; + option (google.longrunning.operation_info) = { + response_type: "Restore" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Lists backups in a service. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/services/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/services/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new backup in a given project and location. + rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/services/*}/backups" + body: "backup" + }; + option (google.api.method_signature) = "parent,backup,backup_id"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Deletes a single backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/services/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } +} + +// A managed metastore service that serves metadata queries. +message Service { + option (google.api.resource) = { + type: "metastore.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/services/{service}" + }; + + // The current state of the metastore service. + enum State { + // The state of the metastore service is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore service is in the process of being created. + CREATING = 1; + + // The metastore service is running and ready to serve queries. + ACTIVE = 2; + + // The metastore service is entering suspension. Its query-serving + // availability may cease unexpectedly. + SUSPENDING = 3; + + // The metastore service is suspended and unable to serve queries. + SUSPENDED = 4; + + // The metastore service is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 5; + + // The metastore service is undergoing deletion. It cannot be used. + DELETING = 6; + + // The metastore service has encountered an error and cannot be used. The + // metastore service should be deleted. + ERROR = 7; + } + + // Available service tiers. + enum Tier { + // The tier is not set. + TIER_UNSPECIFIED = 0; + + // The developer tier provides limited scalability and no fault tolerance. + // Good for low-cost proof-of-concept. + DEVELOPER = 1; + + // The enterprise tier provides multi-zone high availability, and sufficient + // scalability for enterprise-level Dataproc Metastore workloads. + ENTERPRISE = 3; + } + + // Release channels bundle features of varying levels of stability. Newer + // features may be introduced initially into less stable release channels and + // can be automatically promoted into more stable release channels. + enum ReleaseChannel { + // Release channel is not specified. + RELEASE_CHANNEL_UNSPECIFIED = 0; + + // The `CANARY` release channel contains the newest features, which may be + // unstable and subject to unresolved issues with no known workarounds. + // Services using the `CANARY` release channel are not subject to any SLAs. + CANARY = 1; + + // The `STABLE` release channel contains features that are considered stable + // and have been validated for production use. + STABLE = 2; + } + + // The backend database type for the metastore service. + enum DatabaseType { + // The DATABASE_TYPE is not set. + DATABASE_TYPE_UNSPECIFIED = 0; + + // MySQL is used to persist the metastore data. + MYSQL = 1; + + // Spanner is used to persist the metastore data. + SPANNER = 2; + } + + // Configuration properties specific to the underlying metastore service + // technology (the software that serves metastore queries). + oneof metastore_config { + // Configuration information specific to running Hive metastore + // software as the metastore service. + HiveMetastoreConfig hive_metastore_config = 5; + } + + // Immutable. The relative resource name of the metastore service, in the + // following format: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore service was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore service was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore service. + map labels = 4; + + // Immutable. The relative resource name of the VPC network on which the + // instance can be accessed. It is specified in the following form: + // + // `projects/{project_number}/global/networks/{network_id}`. + string network = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Output only. The URI of the endpoint used to access the metastore service. + string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The TCP port at which the metastore service is reached. Default: 9083. + int32 port = 9; + + // Output only. The current state of the metastore service. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the + // metastore service, if available. + string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A Cloud Storage URI (starting with `gs://`) that specifies + // where artifacts related to the metastore service are stored. + string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The tier of the service. + Tier tier = 13; + + // The one hour maintenance window of the metastore service. This specifies + // when the service can be restarted for maintenance purposes in UTC time. + // Maintenance window is not needed for services with the SPANNER + // database type. + MaintenanceWindow maintenance_window = 15; + + // Output only. The globally unique resource identifier of the metastore + // service. + string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The metadata management activities of the metastore service. + MetadataManagementActivity metadata_management_activity = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The release channel of the service. + // If unspecified, defaults to `STABLE`. + ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Information used to configure the Dataproc Metastore service to + // encrypt customer data at rest. Cannot be updated. + EncryptionConfig encryption_config = 20 + [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying the network settings for the + // Dataproc Metastore service. + NetworkConfig network_config = 21; + + // Immutable. The database type that the Metastore service stores its data. + DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying telemetry settings for the Dataproc Metastore + // service. If unspecified defaults to `JSON`. + TelemetryConfig telemetry_config = 23; + + // Scaling configuration of the metastore service. + ScalingConfig scaling_config = 24; +} + +// Maintenance window. This specifies when Dataproc Metastore +// may perform system maintenance operation to the service. +message MaintenanceWindow { + // The hour of day (0-23) when the window starts. + google.protobuf.Int32Value hour_of_day = 1; + + // The day of week, when the window starts. + google.type.DayOfWeek day_of_week = 2; +} + +// Specifies configuration information specific to running Hive metastore +// software as the metastore service. +message HiveMetastoreConfig { + // Immutable. The Hive metastore schema version. + string version = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // A mapping of Hive metastore configuration key-value pairs to apply to the + // Hive metastore (configured in `hive-site.xml`). The mappings + // override system defaults (some keys cannot be overridden). These + // overrides are also applied to auxiliary versions and can be further + // customized in the auxiliary version's `AuxiliaryVersionConfig`. + map config_overrides = 2; + + // Information used to configure the Hive metastore service as a service + // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService` + // method and specify this field's path + // (`hive_metastore_config.kerberos_config`) in the request's `update_mask` + // while omitting this field from the request's `service`. + KerberosConfig kerberos_config = 3; + + // A mapping of Hive metastore version to the auxiliary version + // configuration. When specified, a secondary Hive metastore service is + // created along with the primary service. All auxiliary versions must be less + // than the service's primary version. The key is the auxiliary service name + // and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This + // means that the first character must be a lowercase letter, and all the + // following characters must be hyphens, lowercase letters, or digits, except + // the last character, which cannot be a hyphen. + map auxiliary_versions = 5; +} + +// Configuration information for a Kerberos principal. +message KerberosConfig { + // A Kerberos keytab file that can be used to authenticate a service principal + // with a Kerberos Key Distribution Center (KDC). + Secret keytab = 1; + + // A Kerberos principal that exists in the both the keytab the KDC + // to authenticate as. A typical principal is of the form + // `primary/instance@REALM`, but there is no exact format. + string principal = 2; + + // A Cloud Storage URI that specifies the path to a + // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`, + // although the file does not need to be named krb5.conf explicitly. + string krb5_config_gcs_uri = 3; +} + +// A securely stored value. +message Secret { + oneof value { + // The relative resource name of a Secret Manager secret version, in the + // following form: + // + // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`. + string cloud_secret = 2; + } +} + +// Encryption settings for the service. +message EncryptionConfig { + // The fully qualified customer provided Cloud KMS key name to use for + // customer data encryption, in the following form: + // + // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`. + string kms_key = 1; +} + +// Configuration information for the auxiliary service versions. +message AuxiliaryVersionConfig { + // The Hive metastore version of the auxiliary service. It must be less + // than the primary Hive metastore service's version. + string version = 1; + + // A mapping of Hive metastore configuration key-value pairs to apply to the + // auxiliary Hive metastore (configured in `hive-site.xml`) in addition to + // the primary version's overrides. If keys are present in both the auxiliary + // version's overrides and the primary version's overrides, the value from + // the auxiliary version's overrides takes precedence. + map config_overrides = 2; + + // Output only. The network configuration contains the endpoint URI(s) of the + // auxiliary Hive metastore service. + NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Network configuration for the Dataproc Metastore service. +message NetworkConfig { + // Contains information of the customer's network configurations. + message Consumer { + oneof vpc_resource { + // Immutable. The subnetwork of the customer project from which an IP + // address is reserved and used as the Dataproc Metastore service's + // endpoint. It is accessible to hosts in the subnet and to all + // hosts in a subnet in the same region and same network. There must + // be at least one IP address available in the subnet's primary range. The + // subnet is specified in the following form: + // + // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}` + string subnetwork = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Subnetwork" + } + ]; + } + + // Output only. The URI of the endpoint used to access the metastore + // service. + string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The consumer-side network configuration for the Dataproc + // Metastore instance. + repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Telemetry Configuration for the Dataproc Metastore service. +message TelemetryConfig { + enum LogFormat { + // The LOG_FORMAT is not set. + LOG_FORMAT_UNSPECIFIED = 0; + + // Logging output uses the legacy `textPayload` format. + LEGACY = 1; + + // Logging output uses the `jsonPayload` format. + JSON = 2; + } + + // The output format of the Dataproc Metastore service's logs. + LogFormat log_format = 1; +} + +// The metadata management activities of the metastore service. +message MetadataManagementActivity { + // Output only. The latest metadata exports of the metastore service. + repeated MetadataExport metadata_exports = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The latest restores of the metastore service. + repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A metastore resource that imports metadata. +message MetadataImport { + option (google.api.resource) = { + type: "metastore.googleapis.com/MetadataImport" + pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}" + }; + + // A specification of the location of and metadata about a database dump from + // a relational database management system. + message DatabaseDump { + // The type of the database. + enum DatabaseType { + // The type of the source database is unknown. + DATABASE_TYPE_UNSPECIFIED = 0; + + // The type of the source database is MySQL. + MYSQL = 1; + } + + // The type of the database. + DatabaseType database_type = 1 [deprecated = true]; + + // A Cloud Storage object or folder URI that specifies the source from which + // to import metadata. It must begin with `gs://`. + string gcs_uri = 2; + + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. + DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // The current state of the metadata import. + enum State { + // The state of the metadata import is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata import is running. + RUNNING = 1; + + // The metadata import completed successfully. + SUCCEEDED = 2; + + // The metadata import is being updated. + UPDATING = 3; + + // The metadata import failed, and attempted metadata changes were rolled + // back. + FAILED = 4; + } + + // The metadata to be imported. + oneof metadata { + // Immutable. A database dump from a pre-existing metastore's database. + DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Immutable. The relative resource name of the metadata import, of the form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The description of the metadata import. + string description = 2; + + // Output only. The time when the metadata import was started. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metadata import was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metadata import finished. + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the metadata import. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a metadata export operation. +message MetadataExport { + // The current state of the metadata export. + enum State { + // The state of the metadata export is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata export is running. + RUNNING = 1; + + // The metadata export completed successfully. + SUCCEEDED = 2; + + // The metadata export failed. + FAILED = 3; + + // The metadata export is cancelled. + CANCELLED = 4; + } + + oneof destination { + // Output only. A Cloud Storage URI of a folder that metadata are exported + // to, in the form of + // `gs:////`, where + // `` is automatically generated. + string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The time when the export started. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the export ended. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the export. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the database dump. + DatabaseDumpSpec.Type database_dump_type = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a backup resource. +message Backup { + option (google.api.resource) = { + type: "metastore.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/services/{service}/backups/{backup}" + }; + + // The current state of the backup. + enum State { + // The state of the backup is unknown. + STATE_UNSPECIFIED = 0; + + // The backup is being created. + CREATING = 1; + + // The backup is being deleted. + DELETING = 2; + + // The backup is active and ready to use. + ACTIVE = 3; + + // The backup failed. + FAILED = 4; + + // The backup is being restored. + RESTORING = 5; + } + + // Immutable. The relative resource name of the backup, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the backup was started. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the backup finished creating. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the backup. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revision of the service at the time of backup. + Service service_revision = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The description of the backup. + string description = 6; + + // Output only. Services that are restoring from the backup. + repeated string restoring_services = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a metadata restore operation. +message Restore { + // The current state of the restore. + enum State { + // The state of the metadata restore is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata restore is running. + RUNNING = 1; + + // The metadata restore completed successfully. + SUCCEEDED = 2; + + // The metadata restore failed. + FAILED = 3; + + // The metadata restore is cancelled. + CANCELLED = 4; + } + + // The type of restore. If unspecified, defaults to `METADATA_ONLY`. + enum RestoreType { + // The restore type is unknown. + RESTORE_TYPE_UNSPECIFIED = 0; + + // The service's metadata and configuration are restored. + FULL = 1; + + // Only the service's metadata is restored. + METADATA_ONLY = 2; + } + + // Output only. The time when the restore started. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the restore ended. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the restore. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. 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}`. + string backup = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Output only. The type of restore. + RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The restore details containing the revision of the service to + // be restored to, in format of JSON. + string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents the scaling configuration of a metastore service. +message ScalingConfig { + // Metastore instance sizes. + enum InstanceSize { + // Unspecified instance size + INSTANCE_SIZE_UNSPECIFIED = 0; + + // Extra small instance size, maps to a scaling factor of 0.1. + EXTRA_SMALL = 1; + + // Small instance size, maps to a scaling factor of 0.5. + SMALL = 2; + + // Medium instance size, maps to a scaling factor of 1.0. + MEDIUM = 3; + + // Large instance size, maps to a scaling factor of 3.0. + LARGE = 4; + + // Extra large instance size, maps to a scaling factor of 6.0. + EXTRA_LARGE = 5; + } + + // Represents either a predetermined instance size or a numeric + // scaling factor. + oneof scaling_model { + // An enum of readable instance sizes, with each instance size mapping to a + // float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) + InstanceSize instance_size = 1; + + // Scaling factor, increments of 0.1 for values less than 1.0, and + // increments of 1.0 for values greater than 1.0. + float scaling_factor = 2; + } +} + +// Request message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]. +message ListServicesRequest { + // Required. The relative resource name of the location of metastore services + // to list, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. The maximum number of services to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]. +message ListServicesResponse { + // The services in the specified location. + repeated Service services = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService]. +message GetServiceRequest { + // Required. The relative resource name of the metastore service to retrieve, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService]. +message CreateServiceRequest { + // 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}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Service" + } + ]; + + // 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. + string service_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Service service = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService]. +message UpdateServiceRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore service to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore service's `name` field is used to identify the metastore + // service to be updated. + Service service = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService]. +message DeleteServiceRequest { + // Required. The relative resource name of the metastore service to delete, in + // the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports]. +message ListMetadataImportsRequest { + // Required. The relative resource name of the service whose metadata imports + // to list, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/MetadataImport" + } + ]; + + // Optional. The maximum number of imports to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 imports are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports]. +message ListMetadataImportsResponse { + // The imports in the specified service. + repeated MetadataImport metadata_imports = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport]. +message GetMetadataImportRequest { + // Required. The relative resource name of the metadata import to retrieve, in + // the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/MetadataImport" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport]. +message CreateMetadataImportRequest { + // Required. The relative resource name of the service in which to create a + // metastore import, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/MetadataImport" + } + ]; + + // 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. + string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport]. +message UpdateMetadataImportRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metadata import to update. The server only merges fields + // in the import if they are specified in `update_mask`. + // + // The metadata import's `name` field is used to identify the metastore + // import to be updated. + MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]. +message ListBackupsRequest { + // Required. The relative resource name of the service whose backups to + // list, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. The maximum number of backups to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 backups are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]. +message ListBackupsResponse { + // The backups of the specified service. + repeated Backup backups = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup]. +message GetBackupRequest { + // Required. The relative resource name of the backup to retrieve, in the + // following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup]. +message CreateBackupRequest { + // Required. The relative resource name of the service in which to create a + // backup of the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Backup" + } + ]; + + // 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. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup]. +message DeleteBackupRequest { + // Required. The relative resource name of the backup to delete, in the + // following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata]. +message ExportMetadataRequest { + // Required. Destination that metadata is exported to. + oneof destination { + // A Cloud Storage URI of a folder, in the format + // `gs:///`. A sub-folder + // `` containing exported files will be created below it. + string destination_gcs_folder = 2; + } + + // Required. The relative resource name of the metastore service to run + // export, in the following form: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. + DatabaseDumpSpec.Type database_dump_type = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [DataprocMetastore.Restore][]. +message RestoreServiceRequest { + // Required. The relative resource name of the metastore service to run + // restore, in the following form: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // 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}`. + string backup = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. + Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the caller has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata about the service in a location. +message LocationMetadata { + // A specification of a supported version of the Hive Metastore software. + message HiveMetastoreVersion { + // The semantic version of the Hive Metastore software. + string version = 1; + + // Whether `version` will be chosen by the server if a metastore service is + // created with a `HiveMetastoreConfig` that omits the `version`. + bool is_default = 2; + } + + // The versions of Hive Metastore that can be used when creating a new + // metastore service in this location. The server guarantees that exactly one + // `HiveMetastoreVersion` in the list will set `is_default`. + repeated HiveMetastoreVersion supported_hive_metastore_versions = 1; +} + +// The specification of database dump to import from or export to. +message DatabaseDumpSpec { + // The type of the database dump. + enum Type { + // The type of the database dump is unknown. + TYPE_UNSPECIFIED = 0; + + // Database dump is a MySQL dump file. + MYSQL = 1; + + // Database dump contains Avro files. + AVRO = 2; + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore_federation.proto b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore_federation.proto new file mode 100644 index 000000000000..c9b6ec6a23c0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/proto-google-cloud-dataproc-metastore-v1/src/main/proto/google/cloud/metastore/v1/metastore_federation.proto @@ -0,0 +1,371 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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. + +syntax = "proto3"; + +package google.cloud.metastore.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/metastore/v1/metastore.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/metastore/apiv1/metastorepb;metastorepb"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreFederationProto"; +option java_package = "com.google.cloud.metastore.v1"; + +// Configures and manages metastore federation services. +// Dataproc Metastore Federation Service allows federating a collection of +// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc +// Metastores. The Federation Service exposes a gRPC URL through which metadata +// from the backend metastores are served at query time. +// +// The Dataproc Metastore Federation API defines the following resource model: +// * The service works with a collection of Google Cloud projects. +// * Each project has a collection of available locations. +// * Each location has a collection of federations. +// * Dataproc Metastore Federations are resources with names of the +// form: +// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. +service DataprocMetastoreFederation { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists federations in a project and location. + rpc ListFederations(ListFederationsRequest) + returns (ListFederationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/federations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single federation. + rpc GetFederation(GetFederationRequest) returns (Federation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore federation in a project and location. + rpc CreateFederation(CreateFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/federations" + body: "federation" + }; + option (google.api.method_signature) = "parent,federation,federation_id"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Updates the fields of a federation. + rpc UpdateFederation(UpdateFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{federation.name=projects/*/locations/*/federations/*}" + body: "federation" + }; + option (google.api.method_signature) = "federation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Deletes a single federation. + rpc DeleteFederation(DeleteFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } +} + +// Represents a federation of multiple backend metastores. +message Federation { + option (google.api.resource) = { + type: "metastore.googleapis.com/Federation" + pattern: "projects/{project}/locations/{location}/federations/{federation}" + }; + + // The current state of the federation. + enum State { + // The state of the metastore federation is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore federation is in the process of being created. + CREATING = 1; + + // The metastore federation is running and ready to serve queries. + ACTIVE = 2; + + // The metastore federation is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 3; + + // The metastore federation is undergoing deletion. It cannot be used. + DELETING = 4; + + // The metastore federation has encountered an error and cannot be used. The + // metastore federation should be deleted. + ERROR = 5; + } + + // Immutable. The relative resource name of the federation, of the + // form: + // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore federation was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore federation was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore federation. + map labels = 4; + + // Immutable. The Apache Hive metastore version of the federation. All backend + // metastore versions must be compatible with the federation version. + string version = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // A map from `BackendMetastore` rank to `BackendMetastore`s from which the + // federation service serves metadata at query time. The map key represents + // the order in which `BackendMetastore`s should be evaluated to resolve + // database names at query time and should be greater than or equal to zero. A + // `BackendMetastore` with a lower number will be evaluated before a + // `BackendMetastore` with a higher number. + map backend_metastores = 6; + + // Output only. The federation endpoint. + string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the federation. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the + // metastore federation, if available. + string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The globally unique resource identifier of the metastore + // federation. + string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a backend metastore for the federation. +message BackendMetastore { + // The type of the backend metastore. + enum MetastoreType { + // The metastore type is not set. + METASTORE_TYPE_UNSPECIFIED = 0; + + // The backend metastore is Dataproc Metastore. + DATAPROC_METASTORE = 3; + } + + // The relative resource name of the metastore that is being federated. + // The formats of the relative resource names for the currently supported + // metastores are listed below: + // + // * BigQuery + // * `projects/{project_id}` + // * Dataproc Metastore + // * `projects/{project_id}/locations/{location}/services/{service_id}` + string name = 1; + + // The type of the backend metastore. + MetastoreType metastore_type = 2; +} + +// Request message for ListFederations. +message ListFederationsRequest { + // Required. The relative resource name of the location of metastore + // federations to list, in the following form: + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. The maximum number of federations to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListFederationServices + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // ListFederationServices must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListFederations +message ListFederationsResponse { + // The services in the specified location. + repeated Federation federations = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for GetFederation. +message GetFederationRequest { + // Required. The relative resource name of the metastore federation to + // retrieve, in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; +} + +// Request message for CreateFederation. +message CreateFederationRequest { + // Required. The relative resource name of the location in which to create a + // federation service, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // 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. + string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for UpdateFederation. +message UpdateFederationRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore federation to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore federation's `name` field is used to identify the + // metastore service to be updated. + Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeleteFederation. +message DeleteFederationRequest { + // Required. The relative resource name of the metastore federation to delete, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetEndpoint.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetEndpoint.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/create/SyncCreateSetEndpoint.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/AsyncCreateBackup.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/AsyncCreateBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/AsyncCreateBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/AsyncCreateBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackup.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/AsyncCreateService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/AsyncCreateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/AsyncCreateService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/AsyncCreateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/AsyncCreateServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/AsyncCreateServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/AsyncCreateServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/AsyncCreateServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/AsyncDeleteBackup.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/AsyncDeleteBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/AsyncDeleteBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/AsyncDeleteBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackup.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deletebackup/SyncDeleteBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/AsyncDeleteService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/AsyncDeleteService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/AsyncDeleteService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/AsyncDeleteService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/deleteservice/SyncDeleteServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/AsyncExportMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/AsyncExportMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/AsyncExportMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/AsyncExportMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/SyncExportMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/SyncExportMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/SyncExportMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/exportmetadata/SyncExportMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/AsyncGetBackup.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/AsyncGetBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/AsyncGetBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/AsyncGetBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackup.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackupBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackupBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackupBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackupBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getbackup/SyncGetBackupString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..baaf459a2c8f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.BackupName; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = dataprocMetastoreClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_GetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..839ebb660b17 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_GetIamPolicy_sync] +import com.google.cloud.metastore.v1.BackupName; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreClient.getIamPolicy(request); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_GetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..518693acf998 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + dataprocMetastoreClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_GetLocation_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getlocation/SyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..afdaedb5d62a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataprocMetastoreClient.getLocation(request); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_GetLocation_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/AsyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/AsyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/AsyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/AsyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetServiceServicename.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetServiceServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetServiceServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetServiceServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/getservice/SyncGetServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/AsyncListBackups.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/AsyncListBackups.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/AsyncListBackups.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/AsyncListBackups.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/AsyncListBackupsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/AsyncListBackupsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/AsyncListBackupsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/AsyncListBackupsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackups.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackups.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackups.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackups.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackupsServicename.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackupsServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackupsServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackupsServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackupsString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackupsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackupsString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listbackups/SyncListBackupsString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/AsyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..dffaee938bee --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataprocMetastoreClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1_generated_DataprocMetastore_ListLocations_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..66e4cf54b4ce --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataprocMetastoreClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END metastore_v1_generated_DataprocMetastore_ListLocations_Paged_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/SyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..fb8fefc37025 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : dataprocMetastoreClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1_generated_DataprocMetastore_ListLocations_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/AsyncListServices.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/AsyncListServices.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/AsyncListServices.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/AsyncListServices.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/AsyncListServicesPaged.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/AsyncListServicesPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/AsyncListServicesPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/AsyncListServicesPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServices.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServices.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServices.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServices.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServicesLocationname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServicesLocationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServicesLocationname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServicesLocationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServicesString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServicesString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServicesString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/listservices/SyncListServicesString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/AsyncRestoreService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/AsyncRestoreService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/AsyncRestoreService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/AsyncRestoreService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..61ae07c68d71 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.BackupName; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = dataprocMetastoreClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_SetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..21fcd4ee78cb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_SetIamPolicy_sync] +import com.google.cloud.metastore.v1.BackupName; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreClient.setIamPolicy(request); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_SetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..36c53881f5af --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,52 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.FederationName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + dataprocMetastoreClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_TestIamPermissions_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..6787c8c9bf26 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastore_TestIamPermissions_sync] +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.FederationName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = dataprocMetastoreClient.testIamPermissions(request); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_TestIamPermissions_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/AsyncUpdateService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/AsyncUpdateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/AsyncUpdateService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/AsyncUpdateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/SyncUpdateService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/SyncUpdateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/SyncUpdateService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/SyncUpdateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/AsyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/AsyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/AsyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/AsyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getfederation/SyncGetFederationString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..f683851d4c54 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.BackupName; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_GetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..3ded6ef243ff --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_GetIamPolicy_sync] +import com.google.cloud.metastore.v1.BackupName; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreFederationClient.getIamPolicy(request); + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_GetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..f265a3e307f3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + dataprocMetastoreFederationClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_GetLocation_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getlocation/SyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..dc10d075a772 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataprocMetastoreFederationClient.getLocation(request); + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_GetLocation_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/AsyncListFederations.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/AsyncListFederations.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/AsyncListFederations.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/AsyncListFederations.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederations.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederations.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederations.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederations.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederationsString.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederationsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederationsString.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listfederations/SyncListFederationsString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/AsyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..0e45ddc107c4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_ListLocations_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..d93215dc6429 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataprocMetastoreFederationClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_ListLocations_Paged_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/SyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..b009463b0eaf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/listlocations/SyncListLocations.java @@ -0,0 +1,52 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : + dataprocMetastoreFederationClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_ListLocations_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..16b30f73275a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.BackupName; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_SetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..8fc71afde85a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_SetIamPolicy_sync] +import com.google.cloud.metastore.v1.BackupName; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreFederationClient.setIamPolicy(request); + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_SetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..f2a85287ecac --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; +import com.google.cloud.metastore.v1.FederationName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_TestIamPermissions_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..3c5ab6069043 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,50 @@ +/* + * 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.samples; + +// [START metastore_v1_generated_DataprocMetastoreFederation_TestIamPermissions_sync] +import com.google.cloud.metastore.v1.DataprocMetastoreFederationClient; +import com.google.cloud.metastore.v1.FederationName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + dataprocMetastoreFederationClient.testIamPermissions(request); + } + } +} +// [END metastore_v1_generated_DataprocMetastoreFederation_TestIamPermissions_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastoresettings/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastoresettings/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastoresettings/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastoresettings/getservice/SyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1/samples/snippets/generated/com/google/cloud/metastore/v1/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClient.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClient.java new file mode 100644 index 000000000000..74a6389a0046 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClient.java @@ -0,0 +1,3582 @@ +/* + * 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.v1alpha; + +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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreStub; +import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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: + * + *

    + *
  • The service works with a collection of Google Cloud projects, named: `/projects/*` + *
  • Each project has a collection of available locations, named: `/locations/*` (a location + * must refer to a Google Cloud `region`) + *
  • Each location has a collection of services, named: `/services/*` + *
  • Dataproc Metastore services are resources with names of the form: + *
+ * + *

`/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: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

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

This class can be customized by passing in a custom instance of 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. + */ +@BetaApi +@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 future =
+   *       dataprocMetastoreClient.listServicesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Service element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServicesPagedCallable() { + return stub.listServicesPagedCallable(); + } + + // 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();
+   *   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 listServicesCallable() { + return stub.listServicesCallable(); + } + + // 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()) {
+   *   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 future = dataprocMetastoreClient.getServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServiceCallable() { + return stub.getServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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]");
+   *   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 createServiceAsync( + LocationName parent, Service service, String serviceId) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setService(service) + .setServiceId(serviceId) + .build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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();
+   *   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 createServiceAsync( + String parent, Service service, String serviceId) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(parent) + .setService(service) + .setServiceId(serviceId) + .build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   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 createServiceAsync( + CreateServiceRequest request) { + return createServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.createServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createServiceOperationCallable() { + return stub.createServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.createServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createServiceCallable() { + return stub.createServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   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`. + *

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 updateServiceAsync( + Service service, FieldMask updateMask) { + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder().setService(service).setUpdateMask(updateMask).build(); + return updateServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   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 updateServiceAsync( + UpdateServiceRequest request) { + return updateServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.updateServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateServiceOperationCallable() { + return stub.updateServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.updateServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateServiceCallable() { + return stub.updateServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   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: + *

`projects/{project_number}/locations/{location_id}/services/{service_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServiceAsync(ServiceName name) { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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();
+   *   dataprocMetastoreClient.deleteServiceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The relative resource name of the metastore service to delete, 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 OperationFuture deleteServiceAsync(String name) { + DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   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 deleteServiceAsync( + DeleteServiceRequest request) { + return deleteServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.deleteServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteServiceOperationCallable() { + return stub.deleteServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.deleteServiceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteServiceCallable() { + return stub.deleteServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists imports in a 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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   ListMetadataImportsRequest request =
+   *       ListMetadataImportsRequest.newBuilder()
+   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listMetadataImportsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (MetadataImport element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMetadataImportsPagedCallable() { + return stub.listMetadataImportsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists imports in a 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()) {
+   *   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 + listMetadataImportsCallable() { + return stub.listMetadataImportsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single import. + * + *

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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   GetMetadataImportRequest request =
+   *       GetMetadataImportRequest.newBuilder()
+   *           .setName(
+   *               MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.getMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getMetadataImportCallable() { + return stub.getMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

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

`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 createMetadataImportAsync( + ServiceName parent, MetadataImport metadataImport, String metadataImportId) { + CreateMetadataImportRequest request = + CreateMetadataImportRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMetadataImport(metadataImport) + .setMetadataImportId(metadataImportId) + .build(); + return createMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

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

`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 createMetadataImportAsync( + String parent, MetadataImport metadataImport, String metadataImportId) { + CreateMetadataImportRequest request = + CreateMetadataImportRequest.newBuilder() + .setParent(parent) + .setMetadataImport(metadataImport) + .setMetadataImportId(metadataImportId) + .build(); + return createMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 createMetadataImportAsync( + CreateMetadataImportRequest request) { + return createMetadataImportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createMetadataImportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createMetadataImportOperationCallable() { + return stub.createMetadataImportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createMetadataImportCallable() { + return stub.createMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   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`. + *

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 updateMetadataImportAsync( + MetadataImport metadataImport, FieldMask updateMask) { + UpdateMetadataImportRequest request = + UpdateMetadataImportRequest.newBuilder() + .setMetadataImport(metadataImport) + .setUpdateMask(updateMask) + .build(); + return updateMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   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 updateMetadataImportAsync( + UpdateMetadataImportRequest request) { + return updateMetadataImportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   UpdateMetadataImportRequest request =
+   *       UpdateMetadataImportRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMetadataImport(MetadataImport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.updateMetadataImportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateMetadataImportOperationCallable() { + return stub.updateMetadataImportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   UpdateMetadataImportRequest request =
+   *       UpdateMetadataImportRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMetadataImport(MetadataImport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.updateMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateMetadataImportCallable() { + return stub.updateMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   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 exportMetadataAsync( + ExportMetadataRequest request) { + return exportMetadataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   ExportMetadataRequest request =
+   *       ExportMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.exportMetadataOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataExport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportMetadataOperationCallable() { + return stub.exportMetadataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   ExportMetadataRequest request =
+   *       ExportMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.exportMetadataCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportMetadataCallable() { + return stub.exportMetadataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + ServiceName service, BackupName backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service == null ? null : service.toString()) + .setBackup(backup == null ? null : backup.toString()) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + ServiceName service, String backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service == null ? null : service.toString()) + .setBackup(backup) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + String service, BackupName backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service) + .setBackup(backup == null ? null : backup.toString()) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + String service, String backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder().setService(service).setBackup(backup).build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   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 restoreServiceAsync( + RestoreServiceRequest request) { + return restoreServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   RestoreServiceRequest request =
+   *       RestoreServiceRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setBackup(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.restoreServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Restore response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + restoreServiceOperationCallable() { + return stub.restoreServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   RestoreServiceRequest request =
+   *       RestoreServiceRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setBackup(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.restoreServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable restoreServiceCallable() { + return stub.restoreServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists backups in a 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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listBackupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Backup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupsPagedCallable() { + return stub.listBackupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists backups in a 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()) {
+   *   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 listBackupsCallable() { + return stub.listBackupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single backup. + * + *

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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   GetBackupRequest request =
+   *       GetBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.getBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupCallable() { + return stub.getBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

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

`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 createBackupAsync( + ServiceName parent, Backup backup, String backupId) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackup(backup) + .setBackupId(backupId) + .build(); + return createBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

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

`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 createBackupAsync( + String parent, Backup backup, String backupId) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(parent) + .setBackup(backup) + .setBackupId(backupId) + .build(); + return createBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 createBackupAsync( + CreateBackupRequest request) { + return createBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBackupOperationCallable() { + return stub.createBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBackupCallable() { + return stub.createBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   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: + *

`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 deleteBackupAsync(BackupName name) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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 = 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: + *

`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 deleteBackupAsync(String name) { + DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   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 deleteBackupAsync( + DeleteBackupRequest request) { + return deleteBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.deleteBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupOperationCallable() { + return stub.deleteBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.deleteBackupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupCallable() { + return stub.deleteBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes the attached IAM policies for a resource + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   RemoveIamPolicyRequest request =
+   *       RemoveIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setAsynchronous(true)
+   *           .build();
+   *   RemoveIamPolicyResponse response = dataprocMetastoreClient.removeIamPolicy(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 RemoveIamPolicyResponse removeIamPolicy(RemoveIamPolicyRequest request) { + return removeIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes the attached IAM policies for a resource + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   RemoveIamPolicyRequest request =
+   *       RemoveIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setAsynchronous(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.removeIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveIamPolicyResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeIamPolicyCallable() { + return stub.removeIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query DPMS metadata. + * + *

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()) {
+   *   QueryMetadataRequest request =
+   *       QueryMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setQuery("query107944136")
+   *           .build();
+   *   QueryMetadataResponse response = dataprocMetastoreClient.queryMetadataAsync(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 queryMetadataAsync( + QueryMetadataRequest request) { + return queryMetadataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query DPMS metadata. + * + *

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()) {
+   *   QueryMetadataRequest request =
+   *       QueryMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setQuery("query107944136")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.queryMetadataOperationCallable().futureCall(request);
+   *   // Do something.
+   *   QueryMetadataResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + queryMetadataOperationCallable() { + return stub.queryMetadataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query DPMS metadata. + * + *

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()) {
+   *   QueryMetadataRequest request =
+   *       QueryMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setQuery("query107944136")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.queryMetadataCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable queryMetadataCallable() { + return stub.queryMetadataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Move a table to another database. + * + *

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()) {
+   *   MoveTableToDatabaseRequest request =
+   *       MoveTableToDatabaseRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setTableName("tableName-1988717703")
+   *           .setDbName("dbName-1339126743")
+   *           .setDestinationDbName("destinationDbName-2077361705")
+   *           .build();
+   *   MoveTableToDatabaseResponse response =
+   *       dataprocMetastoreClient.moveTableToDatabaseAsync(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 + moveTableToDatabaseAsync(MoveTableToDatabaseRequest request) { + return moveTableToDatabaseOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Move a table to another database. + * + *

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()) {
+   *   MoveTableToDatabaseRequest request =
+   *       MoveTableToDatabaseRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setTableName("tableName-1988717703")
+   *           .setDbName("dbName-1339126743")
+   *           .setDestinationDbName("destinationDbName-2077361705")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.moveTableToDatabaseOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MoveTableToDatabaseResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable() { + return stub.moveTableToDatabaseOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Move a table to another database. + * + *

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()) {
+   *   MoveTableToDatabaseRequest request =
+   *       MoveTableToDatabaseRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setTableName("tableName-1988717703")
+   *           .setDbName("dbName-1339126743")
+   *           .setDestinationDbName("destinationDbName-2077361705")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.moveTableToDatabaseCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable moveTableToDatabaseCallable() { + return stub.moveTableToDatabaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Alter metadata resource location. The metadata resource can be a database, table, or partition. + * This functionality only updates the parent directory for the respective metadata resource and + * does not transfer any existing data to the new 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()) {
+   *   AlterMetadataResourceLocationRequest request =
+   *       AlterMetadataResourceLocationRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setResourceName("resourceName-384566343")
+   *           .setLocationUri("locationUri552310135")
+   *           .build();
+   *   AlterMetadataResourceLocationResponse response =
+   *       dataprocMetastoreClient.alterMetadataResourceLocationAsync(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 + alterMetadataResourceLocationAsync(AlterMetadataResourceLocationRequest request) { + return alterMetadataResourceLocationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Alter metadata resource location. The metadata resource can be a database, table, or partition. + * This functionality only updates the parent directory for the respective metadata resource and + * does not transfer any existing data to the new 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()) {
+   *   AlterMetadataResourceLocationRequest request =
+   *       AlterMetadataResourceLocationRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setResourceName("resourceName-384566343")
+   *           .setLocationUri("locationUri552310135")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient
+   *           .alterMetadataResourceLocationOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   AlterMetadataResourceLocationResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable() { + return stub.alterMetadataResourceLocationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Alter metadata resource location. The metadata resource can be a database, table, or partition. + * This functionality only updates the parent directory for the respective metadata resource and + * does not transfer any existing data to the new 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()) {
+   *   AlterMetadataResourceLocationRequest request =
+   *       AlterMetadataResourceLocationRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setResourceName("resourceName-384566343")
+   *           .setLocationUri("locationUri552310135")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.alterMetadataResourceLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + alterMetadataResourceLocationCallable() { + return stub.alterMetadataResourceLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : dataprocMetastoreClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataprocMetastoreClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataprocMetastoreClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = dataprocMetastoreClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListServicesPagedResponse + extends AbstractPagedListResponse< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListServicesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListServicesPagedResponse(ListServicesPage page) { + super(page, ListServicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServicesPage + extends AbstractPage { + + private ListServicesPage( + PageContext context, + ListServicesResponse response) { + super(context, response); + } + + private static ListServicesPage createEmptyPage() { + return new ListServicesPage(null, null); + } + + @Override + protected ListServicesPage createPage( + PageContext context, + ListServicesResponse response) { + return new ListServicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + private ListServicesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServicesFixedSizeCollection createEmptyCollection() { + return new ListServicesFixedSizeCollection(null, 0); + } + + @Override + protected ListServicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListServicesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListMetadataImportsPagedResponse + extends AbstractPagedListResponse< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage, + ListMetadataImportsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMetadataImportsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMetadataImportsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMetadataImportsPagedResponse(ListMetadataImportsPage page) { + super(page, ListMetadataImportsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMetadataImportsPage + extends AbstractPage< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage> { + + private ListMetadataImportsPage( + PageContext + context, + ListMetadataImportsResponse response) { + super(context, response); + } + + private static ListMetadataImportsPage createEmptyPage() { + return new ListMetadataImportsPage(null, null); + } + + @Override + protected ListMetadataImportsPage createPage( + PageContext + context, + ListMetadataImportsResponse response) { + return new ListMetadataImportsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMetadataImportsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage, + ListMetadataImportsFixedSizeCollection> { + + private ListMetadataImportsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMetadataImportsFixedSizeCollection createEmptyCollection() { + return new ListMetadataImportsFixedSizeCollection(null, 0); + } + + @Override + protected ListMetadataImportsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMetadataImportsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBackupsPagedResponse + extends AbstractPagedListResponse< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListBackupsPagedResponse(ListBackupsPage page) { + super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupsPage + extends AbstractPage { + + private ListBackupsPage( + PageContext context, + ListBackupsResponse response) { + super(context, response); + } + + private static ListBackupsPage createEmptyPage() { + return new ListBackupsPage(null, null); + } + + @Override + protected ListBackupsPage createPage( + PageContext context, + ListBackupsResponse response) { + return new ListBackupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + private ListBackupsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupsFixedSizeCollection createEmptyCollection() { + return new ListBackupsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBackupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClient.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClient.java new file mode 100644 index 000000000000..6f51b8275962 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClient.java @@ -0,0 +1,1565 @@ +/* + * 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.v1alpha; + +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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreFederationStub; +import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreFederationStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 federation services. Dataproc Metastore + * Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex + * Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which + * metadata from the backend metastores are served at query time. + * + *

The Dataproc Metastore Federation API defines the following resource model: + * + *

    + *
  • The service works with a collection of Google Cloud projects. + *
  • Each project has a collection of available locations. + *
  • Each location has a collection of federations. + *
  • Dataproc Metastore Federations are resources with names of the form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create()) {
+ *   FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
+ *   Federation response = dataprocMetastoreFederationClient.getFederation(name);
+ * }
+ * }
+ * + *

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: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

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

This class can be customized by passing in a custom instance of + * DataprocMetastoreFederationSettings 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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newHttpJsonBuilder().build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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 (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. + * + *

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 (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. + * + *

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 (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 future =
+   *       dataprocMetastoreFederationClient.listFederationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Federation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFederationsPagedCallable() { + return stub.listFederationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists federations 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 (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 + listFederationsCallable() { + return stub.listFederationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single federation. + * + *

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 (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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetFederationRequest request =
+   *       GetFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getFederationCallable() { + return stub.getFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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: + *

`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 createFederationAsync( + LocationName parent, Federation federation, String federationId) { + CreateFederationRequest request = + CreateFederationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFederation(federation) + .setFederationId(federationId) + .build(); + return createFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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: + *

`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 createFederationAsync( + String parent, Federation federation, String federationId) { + CreateFederationRequest request = + CreateFederationRequest.newBuilder() + .setParent(parent) + .setFederation(federation) + .setFederationId(federationId) + .build(); + return createFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 createFederationAsync( + CreateFederationRequest request) { + return createFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 future =
+   *       dataprocMetastoreFederationClient.createFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createFederationOperationCallable() { + return stub.createFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 future =
+   *       dataprocMetastoreFederationClient.createFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createFederationCallable() { + return stub.createFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (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`. + *

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 updateFederationAsync( + Federation federation, FieldMask updateMask) { + UpdateFederationRequest request = + UpdateFederationRequest.newBuilder() + .setFederation(federation) + .setUpdateMask(updateMask) + .build(); + return updateFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (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 updateFederationAsync( + UpdateFederationRequest request) { + return updateFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   UpdateFederationRequest request =
+   *       UpdateFederationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setFederation(Federation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreFederationClient.updateFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateFederationOperationCallable() { + return stub.updateFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   UpdateFederationRequest request =
+   *       UpdateFederationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setFederation(Federation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.updateFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateFederationCallable() { + return stub.updateFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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: + *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFederationAsync( + FederationName name) { + DeleteFederationRequest request = + DeleteFederationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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: + *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFederationAsync(String name) { + DeleteFederationRequest request = DeleteFederationRequest.newBuilder().setName(name).build(); + return deleteFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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 deleteFederationAsync( + DeleteFederationRequest request) { + return deleteFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   DeleteFederationRequest request =
+   *       DeleteFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreFederationClient.deleteFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteFederationOperationCallable() { + return stub.deleteFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   DeleteFederationRequest request =
+   *       DeleteFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.deleteFederationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFederationCallable() { + return stub.deleteFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element :
+   *       dataprocMetastoreFederationClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataprocMetastoreFederationClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataprocMetastoreFederationClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreFederationClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreFederationClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       dataprocMetastoreFederationClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListFederationsPagedResponse + extends AbstractPagedListResponse< + ListFederationsRequest, + ListFederationsResponse, + Federation, + ListFederationsPage, + ListFederationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFederationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFederationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFederationsPagedResponse(ListFederationsPage page) { + super(page, ListFederationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFederationsPage + extends AbstractPage< + ListFederationsRequest, ListFederationsResponse, Federation, ListFederationsPage> { + + private ListFederationsPage( + PageContext context, + ListFederationsResponse response) { + super(context, response); + } + + private static ListFederationsPage createEmptyPage() { + return new ListFederationsPage(null, null); + } + + @Override + protected ListFederationsPage createPage( + PageContext context, + ListFederationsResponse response) { + return new ListFederationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFederationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFederationsRequest, + ListFederationsResponse, + Federation, + ListFederationsPage, + ListFederationsFixedSizeCollection> { + + private ListFederationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFederationsFixedSizeCollection createEmptyCollection() { + return new ListFederationsFixedSizeCollection(null, 0); + } + + @Override + protected ListFederationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFederationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationSettings.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationSettings.java new file mode 100644 index 000000000000..658e29d4a702 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationSettings.java @@ -0,0 +1,368 @@ +/* + * 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.v1alpha; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreFederationStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreFederationClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to listFederations. */ + public PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listFederationsSettings(); + } + + /** Returns the object with the settings used for calls to getFederation. */ + public UnaryCallSettings getFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getFederationSettings(); + } + + /** Returns the object with the settings used for calls to createFederation. */ + public UnaryCallSettings createFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).createFederationSettings(); + } + + /** Returns the object with the settings used for calls to createFederation. */ + public OperationCallSettings + createFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .createFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public UnaryCallSettings updateFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).updateFederationSettings(); + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public OperationCallSettings + updateFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .updateFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public UnaryCallSettings deleteFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).deleteFederationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public OperationCallSettings + deleteFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .deleteFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .testIamPermissionsSettings(); + } + + public static final DataprocMetastoreFederationSettings create( + DataprocMetastoreFederationStubSettings stub) throws IOException { + return new DataprocMetastoreFederationSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataprocMetastoreFederationStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataprocMetastoreFederationStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataprocMetastoreFederationStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreFederationSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataprocMetastoreFederationSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataprocMetastoreFederationStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataprocMetastoreFederationSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataprocMetastoreFederationStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataprocMetastoreFederationStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DataprocMetastoreFederationStubSettings.newHttpJsonBuilder()); + } + + public DataprocMetastoreFederationStubSettings.Builder getStubSettingsBuilder() { + return ((DataprocMetastoreFederationStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listFederations. */ + public PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return getStubSettingsBuilder().listFederationsSettings(); + } + + /** Returns the builder for the settings used for calls to getFederation. */ + public UnaryCallSettings.Builder getFederationSettings() { + return getStubSettingsBuilder().getFederationSettings(); + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public UnaryCallSettings.Builder + createFederationSettings() { + return getStubSettingsBuilder().createFederationSettings(); + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public OperationCallSettings.Builder + createFederationOperationSettings() { + return getStubSettingsBuilder().createFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public UnaryCallSettings.Builder + updateFederationSettings() { + return getStubSettingsBuilder().updateFederationSettings(); + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public OperationCallSettings.Builder + updateFederationOperationSettings() { + return getStubSettingsBuilder().updateFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public UnaryCallSettings.Builder + deleteFederationSettings() { + return getStubSettingsBuilder().deleteFederationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public OperationCallSettings.Builder + deleteFederationOperationSettings() { + return getStubSettingsBuilder().deleteFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public DataprocMetastoreFederationSettings build() throws IOException { + return new DataprocMetastoreFederationSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreSettings.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreSettings.java new file mode 100644 index 000000000000..c7badf814789 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreSettings.java @@ -0,0 +1,640 @@ +/* + * 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.v1alpha; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.stub.DataprocMetastoreStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listServicesSettings(); + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listMetadataImports. */ + public PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listMetadataImportsSettings(); + } + + /** Returns the object with the settings used for calls to getMetadataImport. */ + public UnaryCallSettings getMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public UnaryCallSettings createMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public OperationCallSettings + createMetadataImportOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .createMetadataImportOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings updateMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public OperationCallSettings + updateMetadataImportOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .updateMetadataImportOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public UnaryCallSettings exportMetadataSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataSettings(); + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public OperationCallSettings + exportMetadataOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataOperationSettings(); + } + + /** Returns the object with the settings used for calls to restoreService. */ + public UnaryCallSettings restoreServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceSettings(); + } + + /** Returns the object with the settings used for calls to restoreService. */ + public OperationCallSettings + restoreServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listBackupsSettings(); + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getBackupSettings(); + } + + /** Returns the object with the settings used for calls to createBackup. */ + public UnaryCallSettings createBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupSettings(); + } + + /** Returns the object with the settings used for calls to createBackup. */ + public OperationCallSettings + createBackupOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings + removeIamPolicySettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).removeIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to queryMetadata. */ + public UnaryCallSettings queryMetadataSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).queryMetadataSettings(); + } + + /** Returns the object with the settings used for calls to queryMetadata. */ + public OperationCallSettings + queryMetadataOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).queryMetadataOperationSettings(); + } + + /** Returns the object with the settings used for calls to moveTableToDatabase. */ + public UnaryCallSettings moveTableToDatabaseSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).moveTableToDatabaseSettings(); + } + + /** Returns the object with the settings used for calls to moveTableToDatabase. */ + public OperationCallSettings< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .moveTableToDatabaseOperationSettings(); + } + + /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ + public UnaryCallSettings + alterMetadataResourceLocationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .alterMetadataResourceLocationSettings(); + } + + /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ + public OperationCallSettings< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .alterMetadataResourceLocationOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final DataprocMetastoreSettings create(DataprocMetastoreStubSettings stub) + throws IOException { + return new DataprocMetastoreSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataprocMetastoreStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataprocMetastoreStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataprocMetastoreStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataprocMetastoreStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataprocMetastoreStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataprocMetastoreStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataprocMetastoreStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataprocMetastoreSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataprocMetastoreStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataprocMetastoreSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataprocMetastoreStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataprocMetastoreStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DataprocMetastoreStubSettings.newHttpJsonBuilder()); + } + + public DataprocMetastoreStubSettings.Builder getStubSettingsBuilder() { + return ((DataprocMetastoreStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return getStubSettingsBuilder().listServicesSettings(); + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getStubSettingsBuilder().getServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return getStubSettingsBuilder().createServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public OperationCallSettings.Builder + createServiceOperationSettings() { + return getStubSettingsBuilder().createServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return getStubSettingsBuilder().updateServiceSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return getStubSettingsBuilder().updateServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return getStubSettingsBuilder().deleteServiceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return getStubSettingsBuilder().deleteServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listMetadataImports. */ + public PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return getStubSettingsBuilder().listMetadataImportsSettings(); + } + + /** Returns the builder for the settings used for calls to getMetadataImport. */ + public UnaryCallSettings.Builder + getMetadataImportSettings() { + return getStubSettingsBuilder().getMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public UnaryCallSettings.Builder + createMetadataImportSettings() { + return getStubSettingsBuilder().createMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings() { + return getStubSettingsBuilder().createMetadataImportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings.Builder + updateMetadataImportSettings() { + return getStubSettingsBuilder().updateMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings() { + return getStubSettingsBuilder().updateMetadataImportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public UnaryCallSettings.Builder exportMetadataSettings() { + return getStubSettingsBuilder().exportMetadataSettings(); + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public OperationCallSettings.Builder + exportMetadataOperationSettings() { + return getStubSettingsBuilder().exportMetadataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public UnaryCallSettings.Builder restoreServiceSettings() { + return getStubSettingsBuilder().restoreServiceSettings(); + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public OperationCallSettings.Builder + restoreServiceOperationSettings() { + return getStubSettingsBuilder().restoreServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listBackups. */ + public PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings() { + return getStubSettingsBuilder().listBackupsSettings(); + } + + /** Returns the builder for the settings used for calls to getBackup. */ + public UnaryCallSettings.Builder getBackupSettings() { + return getStubSettingsBuilder().getBackupSettings(); + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public UnaryCallSettings.Builder createBackupSettings() { + return getStubSettingsBuilder().createBackupSettings(); + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public OperationCallSettings.Builder + createBackupOperationSettings() { + return getStubSettingsBuilder().createBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public UnaryCallSettings.Builder deleteBackupSettings() { + return getStubSettingsBuilder().deleteBackupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return getStubSettingsBuilder().deleteBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings.Builder + removeIamPolicySettings() { + return getStubSettingsBuilder().removeIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to queryMetadata. */ + public UnaryCallSettings.Builder queryMetadataSettings() { + return getStubSettingsBuilder().queryMetadataSettings(); + } + + /** Returns the builder for the settings used for calls to queryMetadata. */ + public OperationCallSettings.Builder< + QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> + queryMetadataOperationSettings() { + return getStubSettingsBuilder().queryMetadataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to moveTableToDatabase. */ + public UnaryCallSettings.Builder + moveTableToDatabaseSettings() { + return getStubSettingsBuilder().moveTableToDatabaseSettings(); + } + + /** Returns the builder for the settings used for calls to moveTableToDatabase. */ + public OperationCallSettings.Builder< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings() { + return getStubSettingsBuilder().moveTableToDatabaseOperationSettings(); + } + + /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ + public UnaryCallSettings.Builder + alterMetadataResourceLocationSettings() { + return getStubSettingsBuilder().alterMetadataResourceLocationSettings(); + } + + /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ + public OperationCallSettings.Builder< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings() { + return getStubSettingsBuilder().alterMetadataResourceLocationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public DataprocMetastoreSettings build() throws IOException { + return new DataprocMetastoreSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/gapic_metadata.json b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..db623cd9771e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/gapic_metadata.json @@ -0,0 +1,129 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.metastore.v1alpha", + "libraryPackage": "com.google.cloud.metastore.v1alpha", + "services": { + "DataprocMetastore": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreClient", + "rpcs": { + "AlterMetadataResourceLocation": { + "methods": ["alterMetadataResourceLocationAsync", "alterMetadataResourceLocationOperationCallable", "alterMetadataResourceLocationCallable"] + }, + "CreateBackup": { + "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] + }, + "CreateMetadataImport": { + "methods": ["createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportOperationCallable", "createMetadataImportCallable"] + }, + "CreateService": { + "methods": ["createServiceAsync", "createServiceAsync", "createServiceAsync", "createServiceOperationCallable", "createServiceCallable"] + }, + "DeleteBackup": { + "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] + }, + "DeleteService": { + "methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] + }, + "ExportMetadata": { + "methods": ["exportMetadataAsync", "exportMetadataOperationCallable", "exportMetadataCallable"] + }, + "GetBackup": { + "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetMetadataImport": { + "methods": ["getMetadataImport", "getMetadataImport", "getMetadataImport", "getMetadataImportCallable"] + }, + "GetService": { + "methods": ["getService", "getService", "getService", "getServiceCallable"] + }, + "ListBackups": { + "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListMetadataImports": { + "methods": ["listMetadataImports", "listMetadataImports", "listMetadataImports", "listMetadataImportsPagedCallable", "listMetadataImportsCallable"] + }, + "ListServices": { + "methods": ["listServices", "listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] + }, + "MoveTableToDatabase": { + "methods": ["moveTableToDatabaseAsync", "moveTableToDatabaseOperationCallable", "moveTableToDatabaseCallable"] + }, + "QueryMetadata": { + "methods": ["queryMetadataAsync", "queryMetadataOperationCallable", "queryMetadataCallable"] + }, + "RemoveIamPolicy": { + "methods": ["removeIamPolicy", "removeIamPolicyCallable"] + }, + "RestoreService": { + "methods": ["restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceOperationCallable", "restoreServiceCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateMetadataImport": { + "methods": ["updateMetadataImportAsync", "updateMetadataImportAsync", "updateMetadataImportOperationCallable", "updateMetadataImportCallable"] + }, + "UpdateService": { + "methods": ["updateServiceAsync", "updateServiceAsync", "updateServiceOperationCallable", "updateServiceCallable"] + } + } + } + } + }, + "DataprocMetastoreFederation": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "CreateFederation": { + "methods": ["createFederationAsync", "createFederationAsync", "createFederationAsync", "createFederationOperationCallable", "createFederationCallable"] + }, + "DeleteFederation": { + "methods": ["deleteFederationAsync", "deleteFederationAsync", "deleteFederationAsync", "deleteFederationOperationCallable", "deleteFederationCallable"] + }, + "GetFederation": { + "methods": ["getFederation", "getFederation", "getFederation", "getFederationCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListFederations": { + "methods": ["listFederations", "listFederations", "listFederations", "listFederationsPagedCallable", "listFederationsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateFederation": { + "methods": ["updateFederationAsync", "updateFederationAsync", "updateFederationOperationCallable", "updateFederationCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/package-info.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/package-info.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/package-info.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/package-info.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..bdaf3cd38a5a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStub.java @@ -0,0 +1,134 @@ +/* + * 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.v1alpha.stub; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.CreateFederationRequest; +import com.google.cloud.metastore.v1alpha.DeleteFederationRequest; +import com.google.cloud.metastore.v1alpha.Federation; +import com.google.cloud.metastore.v1alpha.GetFederationRequest; +import com.google.cloud.metastore.v1alpha.ListFederationsRequest; +import com.google.cloud.metastore.v1alpha.ListFederationsResponse; +import com.google.cloud.metastore.v1alpha.OperationMetadata; +import com.google.cloud.metastore.v1alpha.UpdateFederationRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataprocMetastoreFederation service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@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 + listFederationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFederationsPagedCallable()"); + } + + public UnaryCallable listFederationsCallable() { + throw new UnsupportedOperationException("Not implemented: listFederationsCallable()"); + } + + public UnaryCallable getFederationCallable() { + throw new UnsupportedOperationException("Not implemented: getFederationCallable()"); + } + + public OperationCallable + createFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createFederationOperationCallable()"); + } + + public UnaryCallable createFederationCallable() { + throw new UnsupportedOperationException("Not implemented: createFederationCallable()"); + } + + public OperationCallable + updateFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateFederationOperationCallable()"); + } + + public UnaryCallable updateFederationCallable() { + throw new UnsupportedOperationException("Not implemented: updateFederationCallable()"); + } + + public OperationCallable + deleteFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFederationOperationCallable()"); + } + + public UnaryCallable deleteFederationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFederationCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStubSettings.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStubSettings.java new file mode 100644 index 000000000000..af42c274c67e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreFederationStubSettings.java @@ -0,0 +1,820 @@ +/* + * 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.v1alpha.stub; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.CreateFederationRequest; +import com.google.cloud.metastore.v1alpha.DeleteFederationRequest; +import com.google.cloud.metastore.v1alpha.Federation; +import com.google.cloud.metastore.v1alpha.GetFederationRequest; +import com.google.cloud.metastore.v1alpha.ListFederationsRequest; +import com.google.cloud.metastore.v1alpha.ListFederationsResponse; +import com.google.cloud.metastore.v1alpha.OperationMetadata; +import com.google.cloud.metastore.v1alpha.UpdateFederationRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreFederationStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings; + private final UnaryCallSettings getFederationSettings; + private final UnaryCallSettings createFederationSettings; + private final OperationCallSettings + createFederationOperationSettings; + private final UnaryCallSettings updateFederationSettings; + private final OperationCallSettings + updateFederationOperationSettings; + private final UnaryCallSettings deleteFederationSettings; + private final OperationCallSettings + deleteFederationOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListFederationsRequest, ListFederationsResponse, Federation> + LIST_FEDERATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFederationsRequest injectToken( + ListFederationsRequest payload, String token) { + return ListFederationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFederationsRequest injectPageSize( + ListFederationsRequest payload, int pageSize) { + return ListFederationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFederationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFederationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFederationsResponse payload) { + return payload.getFederationsList() == null + ? ImmutableList.of() + : payload.getFederationsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + LIST_FEDERATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFederationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_FEDERATIONS_PAGE_STR_DESC, request, context); + return ListFederationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listFederations. */ + public PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return listFederationsSettings; + } + + /** Returns the object with the settings used for calls to getFederation. */ + public UnaryCallSettings getFederationSettings() { + return getFederationSettings; + } + + /** Returns the object with the settings used for calls to createFederation. */ + public UnaryCallSettings createFederationSettings() { + return createFederationSettings; + } + + /** Returns the object with the settings used for calls to createFederation. */ + public OperationCallSettings + createFederationOperationSettings() { + return createFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public UnaryCallSettings updateFederationSettings() { + return updateFederationSettings; + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public OperationCallSettings + updateFederationOperationSettings() { + return updateFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public UnaryCallSettings deleteFederationSettings() { + return deleteFederationSettings; + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public OperationCallSettings + deleteFederationOperationSettings() { + return deleteFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public DataprocMetastoreFederationStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataprocMetastoreFederationStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataprocMetastoreFederationStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "metastore.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "metastore.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreFederationStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listFederationsSettings = settingsBuilder.listFederationsSettings().build(); + getFederationSettings = settingsBuilder.getFederationSettings().build(); + createFederationSettings = settingsBuilder.createFederationSettings().build(); + createFederationOperationSettings = settingsBuilder.createFederationOperationSettings().build(); + updateFederationSettings = settingsBuilder.updateFederationSettings().build(); + updateFederationOperationSettings = settingsBuilder.updateFederationOperationSettings().build(); + deleteFederationSettings = settingsBuilder.deleteFederationSettings().build(); + deleteFederationOperationSettings = settingsBuilder.deleteFederationOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for DataprocMetastoreFederationStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings; + private final UnaryCallSettings.Builder getFederationSettings; + private final UnaryCallSettings.Builder + createFederationSettings; + private final OperationCallSettings.Builder< + CreateFederationRequest, Federation, OperationMetadata> + createFederationOperationSettings; + private final UnaryCallSettings.Builder + updateFederationSettings; + private final OperationCallSettings.Builder< + UpdateFederationRequest, Federation, OperationMetadata> + updateFederationOperationSettings; + private final UnaryCallSettings.Builder + deleteFederationSettings; + private final OperationCallSettings.Builder + deleteFederationOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listFederationsSettings = PagedCallSettings.newBuilder(LIST_FEDERATIONS_PAGE_STR_FACT); + getFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFederationOperationSettings = OperationCallSettings.newBuilder(); + updateFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFederationOperationSettings = OperationCallSettings.newBuilder(); + deleteFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFederationOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listFederationsSettings, + getFederationSettings, + createFederationSettings, + updateFederationSettings, + deleteFederationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(DataprocMetastoreFederationStubSettings settings) { + super(settings); + + listFederationsSettings = settings.listFederationsSettings.toBuilder(); + getFederationSettings = settings.getFederationSettings.toBuilder(); + createFederationSettings = settings.createFederationSettings.toBuilder(); + createFederationOperationSettings = settings.createFederationOperationSettings.toBuilder(); + updateFederationSettings = settings.updateFederationSettings.toBuilder(); + updateFederationOperationSettings = settings.updateFederationOperationSettings.toBuilder(); + deleteFederationSettings = settings.deleteFederationSettings.toBuilder(); + deleteFederationOperationSettings = settings.deleteFederationOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listFederationsSettings, + getFederationSettings, + createFederationSettings, + updateFederationSettings, + deleteFederationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listFederationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listFederations. */ + public PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return listFederationsSettings; + } + + /** Returns the builder for the settings used for calls to getFederation. */ + public UnaryCallSettings.Builder getFederationSettings() { + return getFederationSettings; + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public UnaryCallSettings.Builder + createFederationSettings() { + return createFederationSettings; + } + + /** Returns the builder for the settings used for calls to createFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createFederationOperationSettings() { + return createFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public UnaryCallSettings.Builder + updateFederationSettings() { + return updateFederationSettings; + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateFederationOperationSettings() { + return updateFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public UnaryCallSettings.Builder + deleteFederationSettings() { + return deleteFederationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteFederationOperationSettings() { + return deleteFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public DataprocMetastoreFederationStubSettings build() throws IOException { + return new DataprocMetastoreFederationStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java new file mode 100644 index 000000000000..bb43f26568c9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStub.java @@ -0,0 +1,280 @@ +/* + * 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.v1alpha.stub; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1alpha.Backup; +import com.google.cloud.metastore.v1alpha.CreateBackupRequest; +import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.CreateServiceRequest; +import com.google.cloud.metastore.v1alpha.DeleteBackupRequest; +import com.google.cloud.metastore.v1alpha.DeleteServiceRequest; +import com.google.cloud.metastore.v1alpha.ExportMetadataRequest; +import com.google.cloud.metastore.v1alpha.GetBackupRequest; +import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.GetServiceRequest; +import com.google.cloud.metastore.v1alpha.ListBackupsRequest; +import com.google.cloud.metastore.v1alpha.ListBackupsResponse; +import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1alpha.ListServicesRequest; +import com.google.cloud.metastore.v1alpha.ListServicesResponse; +import com.google.cloud.metastore.v1alpha.MetadataExport; +import com.google.cloud.metastore.v1alpha.MetadataImport; +import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1alpha.OperationMetadata; +import com.google.cloud.metastore.v1alpha.QueryMetadataRequest; +import com.google.cloud.metastore.v1alpha.QueryMetadataResponse; +import com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest; +import com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse; +import com.google.cloud.metastore.v1alpha.Restore; +import com.google.cloud.metastore.v1alpha.RestoreServiceRequest; +import com.google.cloud.metastore.v1alpha.Service; +import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.UpdateServiceRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class DataprocMetastoreStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listServicesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); + } + + public UnaryCallable listServicesCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); + } + + public UnaryCallable getServiceCallable() { + throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); + } + + public OperationCallable + createServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceOperationCallable()"); + } + + public UnaryCallable createServiceCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceCallable()"); + } + + public OperationCallable + updateServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceOperationCallable()"); + } + + public UnaryCallable updateServiceCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceCallable()"); + } + + public OperationCallable + deleteServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); + } + + public UnaryCallable deleteServiceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); + } + + public UnaryCallable + listMetadataImportsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMetadataImportsPagedCallable()"); + } + + public UnaryCallable + listMetadataImportsCallable() { + throw new UnsupportedOperationException("Not implemented: listMetadataImportsCallable()"); + } + + public UnaryCallable getMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: getMetadataImportCallable()"); + } + + public OperationCallable + createMetadataImportOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createMetadataImportOperationCallable()"); + } + + public UnaryCallable createMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: createMetadataImportCallable()"); + } + + public OperationCallable + updateMetadataImportOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateMetadataImportOperationCallable()"); + } + + public UnaryCallable updateMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: updateMetadataImportCallable()"); + } + + public OperationCallable + exportMetadataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportMetadataOperationCallable()"); + } + + public UnaryCallable exportMetadataCallable() { + throw new UnsupportedOperationException("Not implemented: exportMetadataCallable()"); + } + + public OperationCallable + restoreServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: restoreServiceOperationCallable()"); + } + + public UnaryCallable restoreServiceCallable() { + throw new UnsupportedOperationException("Not implemented: restoreServiceCallable()"); + } + + public UnaryCallable listBackupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); + } + + public UnaryCallable listBackupsCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); + } + + public UnaryCallable getBackupCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); + } + + public OperationCallable + createBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); + } + + public UnaryCallable createBackupCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); + } + + public OperationCallable + deleteBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); + } + + public UnaryCallable deleteBackupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); + } + + public UnaryCallable removeIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: removeIamPolicyCallable()"); + } + + public OperationCallable + queryMetadataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: queryMetadataOperationCallable()"); + } + + public UnaryCallable queryMetadataCallable() { + throw new UnsupportedOperationException("Not implemented: queryMetadataCallable()"); + } + + public OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: moveTableToDatabaseOperationCallable()"); + } + + public UnaryCallable moveTableToDatabaseCallable() { + throw new UnsupportedOperationException("Not implemented: moveTableToDatabaseCallable()"); + } + + public OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: alterMetadataResourceLocationOperationCallable()"); + } + + public UnaryCallable + alterMetadataResourceLocationCallable() { + throw new UnsupportedOperationException( + "Not implemented: alterMetadataResourceLocationCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStubSettings.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStubSettings.java new file mode 100644 index 000000000000..293f5709a0a4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStubSettings.java @@ -0,0 +1,1760 @@ +/* + * 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.v1alpha.stub; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1alpha.Backup; +import com.google.cloud.metastore.v1alpha.CreateBackupRequest; +import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.CreateServiceRequest; +import com.google.cloud.metastore.v1alpha.DeleteBackupRequest; +import com.google.cloud.metastore.v1alpha.DeleteServiceRequest; +import com.google.cloud.metastore.v1alpha.ExportMetadataRequest; +import com.google.cloud.metastore.v1alpha.GetBackupRequest; +import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.GetServiceRequest; +import com.google.cloud.metastore.v1alpha.ListBackupsRequest; +import com.google.cloud.metastore.v1alpha.ListBackupsResponse; +import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1alpha.ListServicesRequest; +import com.google.cloud.metastore.v1alpha.ListServicesResponse; +import com.google.cloud.metastore.v1alpha.MetadataExport; +import com.google.cloud.metastore.v1alpha.MetadataImport; +import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1alpha.OperationMetadata; +import com.google.cloud.metastore.v1alpha.QueryMetadataRequest; +import com.google.cloud.metastore.v1alpha.QueryMetadataResponse; +import com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest; +import com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse; +import com.google.cloud.metastore.v1alpha.Restore; +import com.google.cloud.metastore.v1alpha.RestoreServiceRequest; +import com.google.cloud.metastore.v1alpha.Service; +import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.UpdateServiceRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataprocMetastoreStubSettings.Builder dataprocMetastoreSettingsBuilder =
+ *     DataprocMetastoreStubSettings.newBuilder();
+ * dataprocMetastoreSettingsBuilder
+ *     .getServiceSettings()
+ *     .setRetrySettings(
+ *         dataprocMetastoreSettingsBuilder
+ *             .getServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataprocMetastoreStubSettings dataprocMetastoreSettings =
+ *     dataprocMetastoreSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings getServiceSettings; + private final UnaryCallSettings createServiceSettings; + private final OperationCallSettings + createServiceOperationSettings; + private final UnaryCallSettings updateServiceSettings; + private final OperationCallSettings + updateServiceOperationSettings; + private final UnaryCallSettings deleteServiceSettings; + private final OperationCallSettings + deleteServiceOperationSettings; + private final PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings; + private final UnaryCallSettings + getMetadataImportSettings; + private final UnaryCallSettings + createMetadataImportSettings; + private final OperationCallSettings< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings; + private final UnaryCallSettings + updateMetadataImportSettings; + private final OperationCallSettings< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings; + private final UnaryCallSettings exportMetadataSettings; + private final OperationCallSettings + exportMetadataOperationSettings; + private final UnaryCallSettings restoreServiceSettings; + private final OperationCallSettings + restoreServiceOperationSettings; + private final PagedCallSettings + listBackupsSettings; + private final UnaryCallSettings getBackupSettings; + private final UnaryCallSettings createBackupSettings; + private final OperationCallSettings + createBackupOperationSettings; + private final UnaryCallSettings deleteBackupSettings; + private final OperationCallSettings + deleteBackupOperationSettings; + private final UnaryCallSettings + removeIamPolicySettings; + private final UnaryCallSettings queryMetadataSettings; + private final OperationCallSettings< + QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> + queryMetadataOperationSettings; + private final UnaryCallSettings + moveTableToDatabaseSettings; + private final OperationCallSettings< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings; + private final UnaryCallSettings + alterMetadataResourceLocationSettings; + private final OperationCallSettings< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_SERVICES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServicesRequest injectToken(ListServicesRequest payload, String token) { + return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { + return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServicesResponse payload) { + return payload.getServicesList() == null + ? ImmutableList.of() + : payload.getServicesList(); + } + }; + + private static final PagedListDescriptor< + ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport> + LIST_METADATA_IMPORTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMetadataImportsRequest injectToken( + ListMetadataImportsRequest payload, String token) { + return ListMetadataImportsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMetadataImportsRequest injectPageSize( + ListMetadataImportsRequest payload, int pageSize) { + return ListMetadataImportsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMetadataImportsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMetadataImportsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMetadataImportsResponse payload) { + return payload.getMetadataImportsList() == null + ? ImmutableList.of() + : payload.getMetadataImportsList(); + } + }; + + private static final PagedListDescriptor + LIST_BACKUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { + return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { + return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBackupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBackupsResponse payload) { + return payload.getBackupsList() == null + ? ImmutableList.of() + : payload.getBackupsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + LIST_SERVICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); + return ListServicesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + LIST_METADATA_IMPORTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMetadataImportsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_METADATA_IMPORTS_PAGE_STR_DESC, request, context); + return ListMetadataImportsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + LIST_BACKUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBackupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); + return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return getServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return createServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listMetadataImports. */ + public PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return listMetadataImportsSettings; + } + + /** Returns the object with the settings used for calls to getMetadataImport. */ + public UnaryCallSettings getMetadataImportSettings() { + return getMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public UnaryCallSettings createMetadataImportSettings() { + return createMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public OperationCallSettings + createMetadataImportOperationSettings() { + return createMetadataImportOperationSettings; + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings updateMetadataImportSettings() { + return updateMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public OperationCallSettings + updateMetadataImportOperationSettings() { + return updateMetadataImportOperationSettings; + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public UnaryCallSettings exportMetadataSettings() { + return exportMetadataSettings; + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public OperationCallSettings + exportMetadataOperationSettings() { + return exportMetadataOperationSettings; + } + + /** Returns the object with the settings used for calls to restoreService. */ + public UnaryCallSettings restoreServiceSettings() { + return restoreServiceSettings; + } + + /** Returns the object with the settings used for calls to restoreService. */ + public OperationCallSettings + restoreServiceOperationSettings() { + return restoreServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return listBackupsSettings; + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return getBackupSettings; + } + + /** Returns the object with the settings used for calls to createBackup. */ + public UnaryCallSettings createBackupSettings() { + return createBackupSettings; + } + + /** Returns the object with the settings used for calls to createBackup. */ + public OperationCallSettings + createBackupOperationSettings() { + return createBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return deleteBackupSettings; + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings + removeIamPolicySettings() { + return removeIamPolicySettings; + } + + /** Returns the object with the settings used for calls to queryMetadata. */ + public UnaryCallSettings queryMetadataSettings() { + return queryMetadataSettings; + } + + /** Returns the object with the settings used for calls to queryMetadata. */ + public OperationCallSettings + queryMetadataOperationSettings() { + return queryMetadataOperationSettings; + } + + /** Returns the object with the settings used for calls to moveTableToDatabase. */ + public UnaryCallSettings moveTableToDatabaseSettings() { + return moveTableToDatabaseSettings; + } + + /** Returns the object with the settings used for calls to moveTableToDatabase. */ + public OperationCallSettings< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings() { + return moveTableToDatabaseOperationSettings; + } + + /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ + public UnaryCallSettings + alterMetadataResourceLocationSettings() { + return alterMetadataResourceLocationSettings; + } + + /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ + public OperationCallSettings< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings() { + return alterMetadataResourceLocationOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public DataprocMetastoreStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataprocMetastoreStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataprocMetastoreStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "metastore.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "metastore.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listServicesSettings = settingsBuilder.listServicesSettings().build(); + getServiceSettings = settingsBuilder.getServiceSettings().build(); + createServiceSettings = settingsBuilder.createServiceSettings().build(); + createServiceOperationSettings = settingsBuilder.createServiceOperationSettings().build(); + updateServiceSettings = settingsBuilder.updateServiceSettings().build(); + updateServiceOperationSettings = settingsBuilder.updateServiceOperationSettings().build(); + deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); + deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); + listMetadataImportsSettings = settingsBuilder.listMetadataImportsSettings().build(); + getMetadataImportSettings = settingsBuilder.getMetadataImportSettings().build(); + createMetadataImportSettings = settingsBuilder.createMetadataImportSettings().build(); + createMetadataImportOperationSettings = + settingsBuilder.createMetadataImportOperationSettings().build(); + updateMetadataImportSettings = settingsBuilder.updateMetadataImportSettings().build(); + updateMetadataImportOperationSettings = + settingsBuilder.updateMetadataImportOperationSettings().build(); + exportMetadataSettings = settingsBuilder.exportMetadataSettings().build(); + exportMetadataOperationSettings = settingsBuilder.exportMetadataOperationSettings().build(); + restoreServiceSettings = settingsBuilder.restoreServiceSettings().build(); + restoreServiceOperationSettings = settingsBuilder.restoreServiceOperationSettings().build(); + listBackupsSettings = settingsBuilder.listBackupsSettings().build(); + getBackupSettings = settingsBuilder.getBackupSettings().build(); + createBackupSettings = settingsBuilder.createBackupSettings().build(); + createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); + deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); + deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); + removeIamPolicySettings = settingsBuilder.removeIamPolicySettings().build(); + queryMetadataSettings = settingsBuilder.queryMetadataSettings().build(); + queryMetadataOperationSettings = settingsBuilder.queryMetadataOperationSettings().build(); + moveTableToDatabaseSettings = settingsBuilder.moveTableToDatabaseSettings().build(); + moveTableToDatabaseOperationSettings = + settingsBuilder.moveTableToDatabaseOperationSettings().build(); + alterMetadataResourceLocationSettings = + settingsBuilder.alterMetadataResourceLocationSettings().build(); + alterMetadataResourceLocationOperationSettings = + settingsBuilder.alterMetadataResourceLocationOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for DataprocMetastoreStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings.Builder getServiceSettings; + private final UnaryCallSettings.Builder createServiceSettings; + private final OperationCallSettings.Builder + createServiceOperationSettings; + private final UnaryCallSettings.Builder updateServiceSettings; + private final OperationCallSettings.Builder + updateServiceOperationSettings; + private final UnaryCallSettings.Builder deleteServiceSettings; + private final OperationCallSettings.Builder + deleteServiceOperationSettings; + private final PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings; + private final UnaryCallSettings.Builder + getMetadataImportSettings; + private final UnaryCallSettings.Builder + createMetadataImportSettings; + private final OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings; + private final UnaryCallSettings.Builder + updateMetadataImportSettings; + private final OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings; + private final UnaryCallSettings.Builder + exportMetadataSettings; + private final OperationCallSettings.Builder< + ExportMetadataRequest, MetadataExport, OperationMetadata> + exportMetadataOperationSettings; + private final UnaryCallSettings.Builder + restoreServiceSettings; + private final OperationCallSettings.Builder + restoreServiceOperationSettings; + private final PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings; + private final UnaryCallSettings.Builder getBackupSettings; + private final UnaryCallSettings.Builder createBackupSettings; + private final OperationCallSettings.Builder + createBackupOperationSettings; + private final UnaryCallSettings.Builder deleteBackupSettings; + private final OperationCallSettings.Builder + deleteBackupOperationSettings; + private final UnaryCallSettings.Builder + removeIamPolicySettings; + private final UnaryCallSettings.Builder queryMetadataSettings; + private final OperationCallSettings.Builder< + QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> + queryMetadataOperationSettings; + private final UnaryCallSettings.Builder + moveTableToDatabaseSettings; + private final OperationCallSettings.Builder< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings; + private final UnaryCallSettings.Builder + alterMetadataResourceLocationSettings; + private final OperationCallSettings.Builder< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); + getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceOperationSettings = OperationCallSettings.newBuilder(); + updateServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateServiceOperationSettings = OperationCallSettings.newBuilder(); + deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteServiceOperationSettings = OperationCallSettings.newBuilder(); + listMetadataImportsSettings = + PagedCallSettings.newBuilder(LIST_METADATA_IMPORTS_PAGE_STR_FACT); + getMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMetadataImportOperationSettings = OperationCallSettings.newBuilder(); + updateMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMetadataImportOperationSettings = OperationCallSettings.newBuilder(); + exportMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportMetadataOperationSettings = OperationCallSettings.newBuilder(); + restoreServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restoreServiceOperationSettings = OperationCallSettings.newBuilder(); + listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); + getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupOperationSettings = OperationCallSettings.newBuilder(); + deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupOperationSettings = OperationCallSettings.newBuilder(); + removeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + queryMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + queryMetadataOperationSettings = OperationCallSettings.newBuilder(); + moveTableToDatabaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + moveTableToDatabaseOperationSettings = OperationCallSettings.newBuilder(); + alterMetadataResourceLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + alterMetadataResourceLocationOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + createServiceSettings, + updateServiceSettings, + deleteServiceSettings, + listMetadataImportsSettings, + getMetadataImportSettings, + createMetadataImportSettings, + updateMetadataImportSettings, + exportMetadataSettings, + restoreServiceSettings, + listBackupsSettings, + getBackupSettings, + createBackupSettings, + deleteBackupSettings, + removeIamPolicySettings, + queryMetadataSettings, + moveTableToDatabaseSettings, + alterMetadataResourceLocationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(DataprocMetastoreStubSettings settings) { + super(settings); + + listServicesSettings = settings.listServicesSettings.toBuilder(); + getServiceSettings = settings.getServiceSettings.toBuilder(); + createServiceSettings = settings.createServiceSettings.toBuilder(); + createServiceOperationSettings = settings.createServiceOperationSettings.toBuilder(); + updateServiceSettings = settings.updateServiceSettings.toBuilder(); + updateServiceOperationSettings = settings.updateServiceOperationSettings.toBuilder(); + deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); + deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); + listMetadataImportsSettings = settings.listMetadataImportsSettings.toBuilder(); + getMetadataImportSettings = settings.getMetadataImportSettings.toBuilder(); + createMetadataImportSettings = settings.createMetadataImportSettings.toBuilder(); + createMetadataImportOperationSettings = + settings.createMetadataImportOperationSettings.toBuilder(); + updateMetadataImportSettings = settings.updateMetadataImportSettings.toBuilder(); + updateMetadataImportOperationSettings = + settings.updateMetadataImportOperationSettings.toBuilder(); + exportMetadataSettings = settings.exportMetadataSettings.toBuilder(); + exportMetadataOperationSettings = settings.exportMetadataOperationSettings.toBuilder(); + restoreServiceSettings = settings.restoreServiceSettings.toBuilder(); + restoreServiceOperationSettings = settings.restoreServiceOperationSettings.toBuilder(); + listBackupsSettings = settings.listBackupsSettings.toBuilder(); + getBackupSettings = settings.getBackupSettings.toBuilder(); + createBackupSettings = settings.createBackupSettings.toBuilder(); + createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); + deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); + deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); + removeIamPolicySettings = settings.removeIamPolicySettings.toBuilder(); + queryMetadataSettings = settings.queryMetadataSettings.toBuilder(); + queryMetadataOperationSettings = settings.queryMetadataOperationSettings.toBuilder(); + moveTableToDatabaseSettings = settings.moveTableToDatabaseSettings.toBuilder(); + moveTableToDatabaseOperationSettings = + settings.moveTableToDatabaseOperationSettings.toBuilder(); + alterMetadataResourceLocationSettings = + settings.alterMetadataResourceLocationSettings.toBuilder(); + alterMetadataResourceLocationOperationSettings = + settings.alterMetadataResourceLocationOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + createServiceSettings, + updateServiceSettings, + deleteServiceSettings, + listMetadataImportsSettings, + getMetadataImportSettings, + createMetadataImportSettings, + updateMetadataImportSettings, + exportMetadataSettings, + restoreServiceSettings, + listBackupsSettings, + getBackupSettings, + createBackupSettings, + deleteBackupSettings, + removeIamPolicySettings, + queryMetadataSettings, + moveTableToDatabaseSettings, + alterMetadataResourceLocationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listServicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listMetadataImportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .exportMetadataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .restoreServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listBackupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .removeIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .queryMetadataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .moveTableToDatabaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .alterMetadataResourceLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .updateServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(3000000L)) + .build())); + + builder + .deleteServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1500000L)) + .build())); + + builder + .createMetadataImportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .updateMetadataImportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1200000L)) + .build())); + + builder + .exportMetadataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataExport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .restoreServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Restore.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .createBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .deleteBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1500000L)) + .build())); + + builder + .queryMetadataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(QueryMetadataResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .moveTableToDatabaseOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + MoveTableToDatabaseResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .alterMetadataResourceLocationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AlterMetadataResourceLocationResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return createServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listMetadataImports. */ + public PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return listMetadataImportsSettings; + } + + /** Returns the builder for the settings used for calls to getMetadataImport. */ + public UnaryCallSettings.Builder + getMetadataImportSettings() { + return getMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public UnaryCallSettings.Builder + createMetadataImportSettings() { + return createMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings() { + return createMetadataImportOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings.Builder + updateMetadataImportSettings() { + return updateMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings() { + return updateMetadataImportOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public UnaryCallSettings.Builder exportMetadataSettings() { + return exportMetadataSettings; + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + exportMetadataOperationSettings() { + return exportMetadataOperationSettings; + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public UnaryCallSettings.Builder restoreServiceSettings() { + return restoreServiceSettings; + } + + /** Returns the builder for the settings used for calls to restoreService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + restoreServiceOperationSettings() { + return restoreServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listBackups. */ + public PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings() { + return listBackupsSettings; + } + + /** Returns the builder for the settings used for calls to getBackup. */ + public UnaryCallSettings.Builder getBackupSettings() { + return getBackupSettings; + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public UnaryCallSettings.Builder createBackupSettings() { + return createBackupSettings; + } + + /** Returns the builder for the settings used for calls to createBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createBackupOperationSettings() { + return createBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public UnaryCallSettings.Builder deleteBackupSettings() { + return deleteBackupSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings.Builder + removeIamPolicySettings() { + return removeIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to queryMetadata. */ + public UnaryCallSettings.Builder queryMetadataSettings() { + return queryMetadataSettings; + } + + /** Returns the builder for the settings used for calls to queryMetadata. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> + queryMetadataOperationSettings() { + return queryMetadataOperationSettings; + } + + /** Returns the builder for the settings used for calls to moveTableToDatabase. */ + public UnaryCallSettings.Builder + moveTableToDatabaseSettings() { + return moveTableToDatabaseSettings; + } + + /** Returns the builder for the settings used for calls to moveTableToDatabase. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings() { + return moveTableToDatabaseOperationSettings; + } + + /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ + public UnaryCallSettings.Builder + alterMetadataResourceLocationSettings() { + return alterMetadataResourceLocationSettings; + } + + /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings() { + return alterMetadataResourceLocationOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public DataprocMetastoreStubSettings build() throws IOException { + return new DataprocMetastoreStubSettings(this); + } + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreCallableFactory.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationCallableFactory.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..9b67b15cfcc0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreFederationStub.java @@ -0,0 +1,523 @@ +/* + * 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.v1alpha.stub; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.CreateFederationRequest; +import com.google.cloud.metastore.v1alpha.DeleteFederationRequest; +import com.google.cloud.metastore.v1alpha.Federation; +import com.google.cloud.metastore.v1alpha.GetFederationRequest; +import com.google.cloud.metastore.v1alpha.ListFederationsRequest; +import com.google.cloud.metastore.v1alpha.ListFederationsResponse; +import com.google.cloud.metastore.v1alpha.OperationMetadata; +import com.google.cloud.metastore.v1alpha.UpdateFederationRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataprocMetastoreFederation service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { + private static final MethodDescriptor + listFederationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/ListFederations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFederationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFederationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/GetFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Federation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/CreateFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/UpdateFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/DeleteFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + listFederationsCallable; + private final UnaryCallable + listFederationsPagedCallable; + private final UnaryCallable getFederationCallable; + private final UnaryCallable createFederationCallable; + private final OperationCallable + createFederationOperationCallable; + private final UnaryCallable updateFederationCallable; + private final OperationCallable + updateFederationOperationCallable; + private final UnaryCallable deleteFederationCallable; + private final OperationCallable + deleteFederationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataprocMetastoreFederationStub create( + DataprocMetastoreFederationStubSettings settings) throws IOException { + return new GrpcDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataprocMetastoreFederationStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataprocMetastoreFederationStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDataprocMetastoreFederationCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listFederationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFederationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("federation.name", String.valueOf(request.getFederation().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.listFederationsCallable = + callableFactory.createUnaryCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.listFederationsPagedCallable = + callableFactory.createPagedCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.getFederationCallable = + callableFactory.createUnaryCallable( + getFederationTransportSettings, settings.getFederationSettings(), clientContext); + this.createFederationCallable = + callableFactory.createUnaryCallable( + createFederationTransportSettings, settings.createFederationSettings(), clientContext); + this.createFederationOperationCallable = + callableFactory.createOperationCallable( + createFederationTransportSettings, + settings.createFederationOperationSettings(), + clientContext, + operationsStub); + this.updateFederationCallable = + callableFactory.createUnaryCallable( + updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); + this.updateFederationOperationCallable = + callableFactory.createOperationCallable( + updateFederationTransportSettings, + settings.updateFederationOperationSettings(), + clientContext, + operationsStub); + this.deleteFederationCallable = + callableFactory.createUnaryCallable( + deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); + this.deleteFederationOperationCallable = + callableFactory.createOperationCallable( + deleteFederationTransportSettings, + settings.deleteFederationOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listFederationsCallable() { + return listFederationsCallable; + } + + @Override + public UnaryCallable + listFederationsPagedCallable() { + return listFederationsPagedCallable; + } + + @Override + public UnaryCallable getFederationCallable() { + return getFederationCallable; + } + + @Override + public UnaryCallable createFederationCallable() { + return createFederationCallable; + } + + @Override + public OperationCallable + createFederationOperationCallable() { + return createFederationOperationCallable; + } + + @Override + public UnaryCallable updateFederationCallable() { + return updateFederationCallable; + } + + @Override + public OperationCallable + updateFederationOperationCallable() { + return updateFederationOperationCallable; + } + + @Override + public UnaryCallable deleteFederationCallable() { + return deleteFederationCallable; + } + + @Override + public OperationCallable + deleteFederationOperationCallable() { + return deleteFederationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreStub.java new file mode 100644 index 000000000000..8be0d8a4dd59 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreStub.java @@ -0,0 +1,1124 @@ +/* + * 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.v1alpha.stub; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1alpha.Backup; +import com.google.cloud.metastore.v1alpha.CreateBackupRequest; +import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.CreateServiceRequest; +import com.google.cloud.metastore.v1alpha.DeleteBackupRequest; +import com.google.cloud.metastore.v1alpha.DeleteServiceRequest; +import com.google.cloud.metastore.v1alpha.ExportMetadataRequest; +import com.google.cloud.metastore.v1alpha.GetBackupRequest; +import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.GetServiceRequest; +import com.google.cloud.metastore.v1alpha.ListBackupsRequest; +import com.google.cloud.metastore.v1alpha.ListBackupsResponse; +import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1alpha.ListServicesRequest; +import com.google.cloud.metastore.v1alpha.ListServicesResponse; +import com.google.cloud.metastore.v1alpha.MetadataExport; +import com.google.cloud.metastore.v1alpha.MetadataImport; +import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1alpha.OperationMetadata; +import com.google.cloud.metastore.v1alpha.QueryMetadataRequest; +import com.google.cloud.metastore.v1alpha.QueryMetadataResponse; +import com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest; +import com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse; +import com.google.cloud.metastore.v1alpha.Restore; +import com.google.cloud.metastore.v1alpha.RestoreServiceRequest; +import com.google.cloud.metastore.v1alpha.Service; +import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.UpdateServiceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDataprocMetastoreStub extends DataprocMetastoreStub { + private static final MethodDescriptor + listServicesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ListServices") + .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/GetService") + .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/CreateService") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/UpdateService") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/DeleteService") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listMetadataImportsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/ListMetadataImports") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMetadataImportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMetadataImportsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/GetMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MetadataImport.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/CreateMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/UpdateMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportMetadataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ExportMetadata") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + restoreServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/RestoreService") + .setRequestMarshaller( + ProtoUtils.marshaller(RestoreServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listBackupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ListBackups") + .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/GetBackup") + .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/CreateBackup") + .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/DeleteBackup") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/RemoveIamPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoveIamPolicyResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + queryMetadataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/QueryMetadata") + .setRequestMarshaller( + ProtoUtils.marshaller(QueryMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + moveTableToDatabaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/MoveTableToDatabase") + .setRequestMarshaller( + ProtoUtils.marshaller(MoveTableToDatabaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + alterMetadataResourceLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/AlterMetadataResourceLocation") + .setRequestMarshaller( + ProtoUtils.marshaller(AlterMetadataResourceLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable + listMetadataImportsCallable; + private final UnaryCallable + listMetadataImportsPagedCallable; + private final UnaryCallable getMetadataImportCallable; + private final UnaryCallable createMetadataImportCallable; + private final OperationCallable + createMetadataImportOperationCallable; + private final UnaryCallable updateMetadataImportCallable; + private final OperationCallable + updateMetadataImportOperationCallable; + private final UnaryCallable exportMetadataCallable; + private final OperationCallable + exportMetadataOperationCallable; + private final UnaryCallable restoreServiceCallable; + private final OperationCallable + restoreServiceOperationCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable createBackupCallable; + private final OperationCallable + createBackupOperationCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable + removeIamPolicyCallable; + private final UnaryCallable queryMetadataCallable; + private final OperationCallable + queryMetadataOperationCallable; + private final UnaryCallable moveTableToDatabaseCallable; + private final OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable; + private final UnaryCallable + alterMetadataResourceLocationCallable; + private final OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) + throws IOException { + return new GrpcDataprocMetastoreStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataprocMetastoreStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataprocMetastoreStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataprocMetastoreCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listServicesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service.name", String.valueOf(request.getService().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listMetadataImportsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMetadataImportsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "metadata_import.name", + String.valueOf(request.getMetadataImport().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings exportMetadataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportMetadataMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings restoreServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restoreServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings listBackupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBackupsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + removeIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings queryMetadataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(queryMetadataMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings moveTableToDatabaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings + alterMetadataResourceLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + operationsStub); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + operationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + operationsStub); + this.listMetadataImportsCallable = + callableFactory.createUnaryCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.listMetadataImportsPagedCallable = + callableFactory.createPagedCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.getMetadataImportCallable = + callableFactory.createUnaryCallable( + getMetadataImportTransportSettings, + settings.getMetadataImportSettings(), + clientContext); + this.createMetadataImportCallable = + callableFactory.createUnaryCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportSettings(), + clientContext); + this.createMetadataImportOperationCallable = + callableFactory.createOperationCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportOperationSettings(), + clientContext, + operationsStub); + this.updateMetadataImportCallable = + callableFactory.createUnaryCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportSettings(), + clientContext); + this.updateMetadataImportOperationCallable = + callableFactory.createOperationCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportOperationSettings(), + clientContext, + operationsStub); + this.exportMetadataCallable = + callableFactory.createUnaryCallable( + exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); + this.exportMetadataOperationCallable = + callableFactory.createOperationCallable( + exportMetadataTransportSettings, + settings.exportMetadataOperationSettings(), + clientContext, + operationsStub); + this.restoreServiceCallable = + callableFactory.createUnaryCallable( + restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); + this.restoreServiceOperationCallable = + callableFactory.createOperationCallable( + restoreServiceTransportSettings, + settings.restoreServiceOperationSettings(), + clientContext, + operationsStub); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.createBackupCallable = + callableFactory.createUnaryCallable( + createBackupTransportSettings, settings.createBackupSettings(), clientContext); + this.createBackupOperationCallable = + callableFactory.createOperationCallable( + createBackupTransportSettings, + settings.createBackupOperationSettings(), + clientContext, + operationsStub); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + operationsStub); + this.removeIamPolicyCallable = + callableFactory.createUnaryCallable( + removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); + this.queryMetadataCallable = + callableFactory.createUnaryCallable( + queryMetadataTransportSettings, settings.queryMetadataSettings(), clientContext); + this.queryMetadataOperationCallable = + callableFactory.createOperationCallable( + queryMetadataTransportSettings, + settings.queryMetadataOperationSettings(), + clientContext, + operationsStub); + this.moveTableToDatabaseCallable = + callableFactory.createUnaryCallable( + moveTableToDatabaseTransportSettings, + settings.moveTableToDatabaseSettings(), + clientContext); + this.moveTableToDatabaseOperationCallable = + callableFactory.createOperationCallable( + moveTableToDatabaseTransportSettings, + settings.moveTableToDatabaseOperationSettings(), + clientContext, + operationsStub); + this.alterMetadataResourceLocationCallable = + callableFactory.createUnaryCallable( + alterMetadataResourceLocationTransportSettings, + settings.alterMetadataResourceLocationSettings(), + clientContext); + this.alterMetadataResourceLocationOperationCallable = + callableFactory.createOperationCallable( + alterMetadataResourceLocationTransportSettings, + settings.alterMetadataResourceLocationOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable + listMetadataImportsCallable() { + return listMetadataImportsCallable; + } + + @Override + public UnaryCallable + listMetadataImportsPagedCallable() { + return listMetadataImportsPagedCallable; + } + + @Override + public UnaryCallable getMetadataImportCallable() { + return getMetadataImportCallable; + } + + @Override + public UnaryCallable createMetadataImportCallable() { + return createMetadataImportCallable; + } + + @Override + public OperationCallable + createMetadataImportOperationCallable() { + return createMetadataImportOperationCallable; + } + + @Override + public UnaryCallable updateMetadataImportCallable() { + return updateMetadataImportCallable; + } + + @Override + public OperationCallable + updateMetadataImportOperationCallable() { + return updateMetadataImportOperationCallable; + } + + @Override + public UnaryCallable exportMetadataCallable() { + return exportMetadataCallable; + } + + @Override + public OperationCallable + exportMetadataOperationCallable() { + return exportMetadataOperationCallable; + } + + @Override + public UnaryCallable restoreServiceCallable() { + return restoreServiceCallable; + } + + @Override + public OperationCallable + restoreServiceOperationCallable() { + return restoreServiceOperationCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable createBackupCallable() { + return createBackupCallable; + } + + @Override + public OperationCallable + createBackupOperationCallable() { + return createBackupOperationCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable removeIamPolicyCallable() { + return removeIamPolicyCallable; + } + + @Override + public UnaryCallable queryMetadataCallable() { + return queryMetadataCallable; + } + + @Override + public OperationCallable + queryMetadataOperationCallable() { + return queryMetadataOperationCallable; + } + + @Override + public UnaryCallable moveTableToDatabaseCallable() { + return moveTableToDatabaseCallable; + } + + @Override + public OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable() { + return moveTableToDatabaseOperationCallable; + } + + @Override + public UnaryCallable + alterMetadataResourceLocationCallable() { + return alterMetadataResourceLocationCallable; + } + + @Override + public OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable() { + return alterMetadataResourceLocationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreCallableFactory.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..21c4950a55cc --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreFederationStub.java @@ -0,0 +1,823 @@ +/* + * 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.v1alpha.stub; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.CreateFederationRequest; +import com.google.cloud.metastore.v1alpha.DeleteFederationRequest; +import com.google.cloud.metastore.v1alpha.Federation; +import com.google.cloud.metastore.v1alpha.GetFederationRequest; +import com.google.cloud.metastore.v1alpha.ListFederationsRequest; +import com.google.cloud.metastore.v1alpha.ListFederationsResponse; +import com.google.cloud.metastore.v1alpha.OperationMetadata; +import com.google.cloud.metastore.v1alpha.UpdateFederationRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataprocMetastoreFederation service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Federation.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listFederationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/ListFederations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/federations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListFederationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/GetFederation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Federation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/CreateFederation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/federations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "federationId", request.getFederationId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("federation", request.getFederation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/UpdateFederation") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{federation.name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "federation.name", request.getFederation().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("federation", request.getFederation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastoreFederation/DeleteFederation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{resource=projects/*/locations/*/services/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/federations/*}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{resource=projects/*/locations/*/services/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/federations/*}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{resource=projects/*/locations/*/services/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions", + "/v1alpha/{resource=projects/*/locations/*/federations/*}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + listFederationsCallable; + private final UnaryCallable + listFederationsPagedCallable; + private final UnaryCallable getFederationCallable; + private final UnaryCallable createFederationCallable; + private final OperationCallable + createFederationOperationCallable; + private final UnaryCallable updateFederationCallable; + private final OperationCallable + updateFederationOperationCallable; + private final UnaryCallable deleteFederationCallable; + private final OperationCallable + deleteFederationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataprocMetastoreFederationStub create( + DataprocMetastoreFederationStubSettings settings) throws IOException { + return new HttpJsonDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataprocMetastoreFederationStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataprocMetastoreFederationStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonDataprocMetastoreFederationCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1alpha/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listFederationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listFederationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listFederationsCallable = + callableFactory.createUnaryCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.listFederationsPagedCallable = + callableFactory.createPagedCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.getFederationCallable = + callableFactory.createUnaryCallable( + getFederationTransportSettings, settings.getFederationSettings(), clientContext); + this.createFederationCallable = + callableFactory.createUnaryCallable( + createFederationTransportSettings, settings.createFederationSettings(), clientContext); + this.createFederationOperationCallable = + callableFactory.createOperationCallable( + createFederationTransportSettings, + settings.createFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateFederationCallable = + callableFactory.createUnaryCallable( + updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); + this.updateFederationOperationCallable = + callableFactory.createOperationCallable( + updateFederationTransportSettings, + settings.updateFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteFederationCallable = + callableFactory.createUnaryCallable( + deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); + this.deleteFederationOperationCallable = + callableFactory.createOperationCallable( + deleteFederationTransportSettings, + settings.deleteFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listFederationsMethodDescriptor); + methodDescriptors.add(getFederationMethodDescriptor); + methodDescriptors.add(createFederationMethodDescriptor); + methodDescriptors.add(updateFederationMethodDescriptor); + methodDescriptors.add(deleteFederationMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listFederationsCallable() { + return listFederationsCallable; + } + + @Override + public UnaryCallable + listFederationsPagedCallable() { + return listFederationsPagedCallable; + } + + @Override + public UnaryCallable getFederationCallable() { + return getFederationCallable; + } + + @Override + public UnaryCallable createFederationCallable() { + return createFederationCallable; + } + + @Override + public OperationCallable + createFederationOperationCallable() { + return createFederationOperationCallable; + } + + @Override + public UnaryCallable updateFederationCallable() { + return updateFederationCallable; + } + + @Override + public OperationCallable + updateFederationOperationCallable() { + return updateFederationOperationCallable; + } + + @Override + public UnaryCallable deleteFederationCallable() { + return deleteFederationCallable; + } + + @Override + public OperationCallable + deleteFederationOperationCallable() { + return deleteFederationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreStub.java new file mode 100644 index 000000000000..b47d58090305 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/HttpJsonDataprocMetastoreStub.java @@ -0,0 +1,1789 @@ +/* + * 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.v1alpha.stub; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1alpha.Backup; +import com.google.cloud.metastore.v1alpha.CreateBackupRequest; +import com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.CreateServiceRequest; +import com.google.cloud.metastore.v1alpha.DeleteBackupRequest; +import com.google.cloud.metastore.v1alpha.DeleteServiceRequest; +import com.google.cloud.metastore.v1alpha.ExportMetadataRequest; +import com.google.cloud.metastore.v1alpha.GetBackupRequest; +import com.google.cloud.metastore.v1alpha.GetMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.GetServiceRequest; +import com.google.cloud.metastore.v1alpha.ListBackupsRequest; +import com.google.cloud.metastore.v1alpha.ListBackupsResponse; +import com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1alpha.ListServicesRequest; +import com.google.cloud.metastore.v1alpha.ListServicesResponse; +import com.google.cloud.metastore.v1alpha.MetadataExport; +import com.google.cloud.metastore.v1alpha.MetadataImport; +import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1alpha.OperationMetadata; +import com.google.cloud.metastore.v1alpha.QueryMetadataRequest; +import com.google.cloud.metastore.v1alpha.QueryMetadataResponse; +import com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest; +import com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse; +import com.google.cloud.metastore.v1alpha.Restore; +import com.google.cloud.metastore.v1alpha.RestoreServiceRequest; +import com.google.cloud.metastore.v1alpha.Service; +import com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1alpha.UpdateServiceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Service.getDescriptor()) + .add(Empty.getDescriptor()) + .add(AlterMetadataResourceLocationResponse.getDescriptor()) + .add(MetadataImport.getDescriptor()) + .add(MoveTableToDatabaseResponse.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Backup.getDescriptor()) + .add(MetadataExport.getDescriptor()) + .add(Restore.getDescriptor()) + .add(QueryMetadataResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listServicesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ListServices") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/services", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListServicesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/GetService") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Service.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/CreateService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/services", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "serviceId", request.getServiceId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("service", request.getService(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/UpdateService") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{service.name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "service.name", request.getService().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("service", request.getService(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/DeleteService") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listMetadataImportsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/ListMetadataImports") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListMetadataImportsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/GetMetadataImport") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MetadataImport.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/CreateMetadataImport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "metadataImportId", request.getMetadataImportId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("metadataImport", request.getMetadataImport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateMetadataImportRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/UpdateMetadataImport") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{metadataImport.name=projects/*/locations/*/services/*/metadataImports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "metadataImport.name", + request.getMetadataImport().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("metadataImport", request.getMetadataImport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateMetadataImportRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + exportMetadataMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ExportMetadata") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportMetadataRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + restoreServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/RestoreService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{service=projects/*/locations/*/services/*}:restore", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RestoreServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listBackupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/ListBackups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/services/*}/backups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/GetBackup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Backup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/CreateBackup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/services/*}/backups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "backupId", request.getBackupId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backup", request.getBackup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/DeleteBackup") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + removeIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/RemoveIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RemoveIamPolicyResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + queryMetadataMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1alpha.DataprocMetastore/QueryMetadata") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{service=projects/*/locations/*/services/*}:queryMetadata", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (QueryMetadataRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + moveTableToDatabaseMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/MoveTableToDatabase") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{service=projects/*/locations/*/services/*}:moveTableToDatabase", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (MoveTableToDatabaseRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + alterMetadataResourceLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1alpha.DataprocMetastore/AlterMetadataResourceLocation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{service=projects/*/locations/*/services/*}:alterLocation", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AlterMetadataResourceLocationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{resource=projects/*/locations/*/services/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/federations/*}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{resource=projects/*/locations/*/services/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy", + "/v1alpha/{resource=projects/*/locations/*/federations/*}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{resource=projects/*/locations/*/services/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions", + "/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions", + "/v1alpha/{resource=projects/*/locations/*/federations/*}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable + listMetadataImportsCallable; + private final UnaryCallable + listMetadataImportsPagedCallable; + private final UnaryCallable getMetadataImportCallable; + private final UnaryCallable createMetadataImportCallable; + private final OperationCallable + createMetadataImportOperationCallable; + private final UnaryCallable updateMetadataImportCallable; + private final OperationCallable + updateMetadataImportOperationCallable; + private final UnaryCallable exportMetadataCallable; + private final OperationCallable + exportMetadataOperationCallable; + private final UnaryCallable restoreServiceCallable; + private final OperationCallable + restoreServiceOperationCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable createBackupCallable; + private final OperationCallable + createBackupOperationCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable + removeIamPolicyCallable; + private final UnaryCallable queryMetadataCallable; + private final OperationCallable + queryMetadataOperationCallable; + private final UnaryCallable moveTableToDatabaseCallable; + private final OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable; + private final UnaryCallable + alterMetadataResourceLocationCallable; + private final OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) + throws IOException { + return new HttpJsonDataprocMetastoreStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataprocMetastoreStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataprocMetastoreStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDataprocMetastoreCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1alpha/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listServicesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listMetadataImportsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listMetadataImportsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings exportMetadataTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportMetadataMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings restoreServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(restoreServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listBackupsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBackupsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + removeIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings queryMetadataTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(queryMetadataMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + moveTableToDatabaseTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + alterMetadataResourceLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listMetadataImportsCallable = + callableFactory.createUnaryCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.listMetadataImportsPagedCallable = + callableFactory.createPagedCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.getMetadataImportCallable = + callableFactory.createUnaryCallable( + getMetadataImportTransportSettings, + settings.getMetadataImportSettings(), + clientContext); + this.createMetadataImportCallable = + callableFactory.createUnaryCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportSettings(), + clientContext); + this.createMetadataImportOperationCallable = + callableFactory.createOperationCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateMetadataImportCallable = + callableFactory.createUnaryCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportSettings(), + clientContext); + this.updateMetadataImportOperationCallable = + callableFactory.createOperationCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.exportMetadataCallable = + callableFactory.createUnaryCallable( + exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); + this.exportMetadataOperationCallable = + callableFactory.createOperationCallable( + exportMetadataTransportSettings, + settings.exportMetadataOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.restoreServiceCallable = + callableFactory.createUnaryCallable( + restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); + this.restoreServiceOperationCallable = + callableFactory.createOperationCallable( + restoreServiceTransportSettings, + settings.restoreServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.createBackupCallable = + callableFactory.createUnaryCallable( + createBackupTransportSettings, settings.createBackupSettings(), clientContext); + this.createBackupOperationCallable = + callableFactory.createOperationCallable( + createBackupTransportSettings, + settings.createBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.removeIamPolicyCallable = + callableFactory.createUnaryCallable( + removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); + this.queryMetadataCallable = + callableFactory.createUnaryCallable( + queryMetadataTransportSettings, settings.queryMetadataSettings(), clientContext); + this.queryMetadataOperationCallable = + callableFactory.createOperationCallable( + queryMetadataTransportSettings, + settings.queryMetadataOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.moveTableToDatabaseCallable = + callableFactory.createUnaryCallable( + moveTableToDatabaseTransportSettings, + settings.moveTableToDatabaseSettings(), + clientContext); + this.moveTableToDatabaseOperationCallable = + callableFactory.createOperationCallable( + moveTableToDatabaseTransportSettings, + settings.moveTableToDatabaseOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.alterMetadataResourceLocationCallable = + callableFactory.createUnaryCallable( + alterMetadataResourceLocationTransportSettings, + settings.alterMetadataResourceLocationSettings(), + clientContext); + this.alterMetadataResourceLocationOperationCallable = + callableFactory.createOperationCallable( + alterMetadataResourceLocationTransportSettings, + settings.alterMetadataResourceLocationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listServicesMethodDescriptor); + methodDescriptors.add(getServiceMethodDescriptor); + methodDescriptors.add(createServiceMethodDescriptor); + methodDescriptors.add(updateServiceMethodDescriptor); + methodDescriptors.add(deleteServiceMethodDescriptor); + methodDescriptors.add(listMetadataImportsMethodDescriptor); + methodDescriptors.add(getMetadataImportMethodDescriptor); + methodDescriptors.add(createMetadataImportMethodDescriptor); + methodDescriptors.add(updateMetadataImportMethodDescriptor); + methodDescriptors.add(exportMetadataMethodDescriptor); + methodDescriptors.add(restoreServiceMethodDescriptor); + methodDescriptors.add(listBackupsMethodDescriptor); + methodDescriptors.add(getBackupMethodDescriptor); + methodDescriptors.add(createBackupMethodDescriptor); + methodDescriptors.add(deleteBackupMethodDescriptor); + methodDescriptors.add(removeIamPolicyMethodDescriptor); + methodDescriptors.add(queryMetadataMethodDescriptor); + methodDescriptors.add(moveTableToDatabaseMethodDescriptor); + methodDescriptors.add(alterMetadataResourceLocationMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable + listMetadataImportsCallable() { + return listMetadataImportsCallable; + } + + @Override + public UnaryCallable + listMetadataImportsPagedCallable() { + return listMetadataImportsPagedCallable; + } + + @Override + public UnaryCallable getMetadataImportCallable() { + return getMetadataImportCallable; + } + + @Override + public UnaryCallable createMetadataImportCallable() { + return createMetadataImportCallable; + } + + @Override + public OperationCallable + createMetadataImportOperationCallable() { + return createMetadataImportOperationCallable; + } + + @Override + public UnaryCallable updateMetadataImportCallable() { + return updateMetadataImportCallable; + } + + @Override + public OperationCallable + updateMetadataImportOperationCallable() { + return updateMetadataImportOperationCallable; + } + + @Override + public UnaryCallable exportMetadataCallable() { + return exportMetadataCallable; + } + + @Override + public OperationCallable + exportMetadataOperationCallable() { + return exportMetadataOperationCallable; + } + + @Override + public UnaryCallable restoreServiceCallable() { + return restoreServiceCallable; + } + + @Override + public OperationCallable + restoreServiceOperationCallable() { + return restoreServiceOperationCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable createBackupCallable() { + return createBackupCallable; + } + + @Override + public OperationCallable + createBackupOperationCallable() { + return createBackupOperationCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable removeIamPolicyCallable() { + return removeIamPolicyCallable; + } + + @Override + public UnaryCallable queryMetadataCallable() { + return queryMetadataCallable; + } + + @Override + public OperationCallable + queryMetadataOperationCallable() { + return queryMetadataOperationCallable; + } + + @Override + public UnaryCallable moveTableToDatabaseCallable() { + return moveTableToDatabaseCallable; + } + + @Override + public OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable() { + return moveTableToDatabaseOperationCallable; + } + + @Override + public UnaryCallable + alterMetadataResourceLocationCallable() { + return alterMetadataResourceLocationCallable; + } + + @Override + public OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable() { + return alterMetadataResourceLocationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientHttpJsonTest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientHttpJsonTest.java new file mode 100644 index 000000000000..c9f49eae5418 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientHttpJsonTest.java @@ -0,0 +1,2245 @@ +/* + * 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.v1alpha; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.stub.HttpJsonDataprocMetastoreStub; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreClientHttpJsonTest { + private static MockHttpService mockService; + private static DataprocMetastoreClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataprocMetastoreStub.getMethodDescriptors(), + DataprocMetastoreSettings.getDefaultEndpoint()); + DataprocMetastoreSettings settings = + DataprocMetastoreSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataprocMetastoreSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listServicesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest2() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listServicesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Service service = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Service actualResponse = client.updateServiceAsync(service, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Service service = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServiceAsync(service, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listMetadataImportsTest() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMetadataImportsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMetadataImportsTest2() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMetadataImportsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMetadataImportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMetadataImportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + MetadataImport metadataImport = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MetadataImport actualResponse = + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MetadataImport metadataImport = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void exportMetadataTest() throws Exception { + MetadataExport expectedResponse = + MetadataExport.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + + MetadataExport actualResponse = client.exportMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportMetadataExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + client.exportMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest2() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest3() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest4() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void removeIamPolicyTest() throws Exception { + RemoveIamPolicyResponse expectedResponse = + RemoveIamPolicyResponse.newBuilder().setSuccess(true).build(); + mockService.addResponse(expectedResponse); + + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setAsynchronous(true) + .build(); + + RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setAsynchronous(true) + .build(); + client.removeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryMetadataTest() throws Exception { + QueryMetadataResponse expectedResponse = + QueryMetadataResponse.newBuilder() + .setResultManifestUri("resultManifestUri233134176") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("queryMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + + QueryMetadataResponse actualResponse = client.queryMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void queryMetadataExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + client.queryMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void moveTableToDatabaseTest() throws Exception { + MoveTableToDatabaseResponse expectedResponse = MoveTableToDatabaseResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("moveTableToDatabaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + MoveTableToDatabaseRequest request = + MoveTableToDatabaseRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setTableName("tableName-1988717703") + .setDbName("dbName-1339126743") + .setDestinationDbName("destinationDbName-2077361705") + .build(); + + MoveTableToDatabaseResponse actualResponse = client.moveTableToDatabaseAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void moveTableToDatabaseExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MoveTableToDatabaseRequest request = + MoveTableToDatabaseRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setTableName("tableName-1988717703") + .setDbName("dbName-1339126743") + .setDestinationDbName("destinationDbName-2077361705") + .build(); + client.moveTableToDatabaseAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void alterMetadataResourceLocationTest() throws Exception { + AlterMetadataResourceLocationResponse expectedResponse = + AlterMetadataResourceLocationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("alterMetadataResourceLocationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + + AlterMetadataResourceLocationResponse actualResponse = + client.alterMetadataResourceLocationAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void alterMetadataResourceLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + client.alterMetadataResourceLocationAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientTest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientTest.java new file mode 100644 index 000000000000..32a43df0bee0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientTest.java @@ -0,0 +1,2057 @@ +/* + * 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.v1alpha; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreClientTest { + private static MockDataprocMetastore mockDataprocMetastore; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataprocMetastoreClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataprocMetastore = new MockDataprocMetastore(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockDataprocMetastore, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataprocMetastoreSettings settings = + DataprocMetastoreSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest2() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(serviceId, actualRequest.getServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(serviceId, actualRequest.getServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Service actualResponse = client.updateServiceAsync(service, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateServiceRequest actualRequest = ((UpdateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServiceAsync(service, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listMetadataImportsTest() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMetadataImportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMetadataImportsTest2() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMetadataImportsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMetadataImportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMetadataImportRequest actualRequest = + ((CreateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMetadataImportRequest actualRequest = + ((CreateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMetadataImportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MetadataImport actualResponse = + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateMetadataImportRequest actualRequest = + ((UpdateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportMetadataTest() throws Exception { + MetadataExport expectedResponse = + MetadataExport.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + + MetadataExport actualResponse = client.exportMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportMetadataRequest actualRequest = ((ExportMetadataRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getDestinationGcsFolder(), actualRequest.getDestinationGcsFolder()); + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertEquals(request.getDatabaseDumpType(), actualRequest.getDatabaseDumpType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportMetadataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + client.exportMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service.toString(), actualRequest.getService()); + Assert.assertEquals(backup.toString(), actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest2() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service.toString(), actualRequest.getService()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest3() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String service = "service1984153269"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(backup.toString(), actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String service = "service1984153269"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest4() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String service = "service1984153269"; + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String service = "service1984153269"; + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void removeIamPolicyTest() throws Exception { + RemoveIamPolicyResponse expectedResponse = + RemoveIamPolicyResponse.newBuilder().setSuccess(true).build(); + mockDataprocMetastore.addResponse(expectedResponse); + + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setAsynchronous(true) + .build(); + + RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveIamPolicyRequest actualRequest = ((RemoveIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getAsynchronous(), actualRequest.getAsynchronous()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setAsynchronous(true) + .build(); + client.removeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryMetadataTest() throws Exception { + QueryMetadataResponse expectedResponse = + QueryMetadataResponse.newBuilder() + .setResultManifestUri("resultManifestUri233134176") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("queryMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + + QueryMetadataResponse actualResponse = client.queryMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + QueryMetadataRequest actualRequest = ((QueryMetadataRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void queryMetadataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + client.queryMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void moveTableToDatabaseTest() throws Exception { + MoveTableToDatabaseResponse expectedResponse = MoveTableToDatabaseResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("moveTableToDatabaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + MoveTableToDatabaseRequest request = + MoveTableToDatabaseRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setTableName("tableName-1988717703") + .setDbName("dbName-1339126743") + .setDestinationDbName("destinationDbName-2077361705") + .build(); + + MoveTableToDatabaseResponse actualResponse = client.moveTableToDatabaseAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + MoveTableToDatabaseRequest actualRequest = ((MoveTableToDatabaseRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getTableName(), actualRequest.getTableName()); + Assert.assertEquals(request.getDbName(), actualRequest.getDbName()); + Assert.assertEquals(request.getDestinationDbName(), actualRequest.getDestinationDbName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void moveTableToDatabaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + MoveTableToDatabaseRequest request = + MoveTableToDatabaseRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setTableName("tableName-1988717703") + .setDbName("dbName-1339126743") + .setDestinationDbName("destinationDbName-2077361705") + .build(); + client.moveTableToDatabaseAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void alterMetadataResourceLocationTest() throws Exception { + AlterMetadataResourceLocationResponse expectedResponse = + AlterMetadataResourceLocationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("alterMetadataResourceLocationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + + AlterMetadataResourceLocationResponse actualResponse = + client.alterMetadataResourceLocationAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AlterMetadataResourceLocationRequest actualRequest = + ((AlterMetadataResourceLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getResourceName(), actualRequest.getResourceName()); + Assert.assertEquals(request.getLocationUri(), actualRequest.getLocationUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void alterMetadataResourceLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + client.alterMetadataResourceLocationAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientHttpJsonTest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientHttpJsonTest.java new file mode 100644 index 000000000000..9c56995d6ed9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientHttpJsonTest.java @@ -0,0 +1,882 @@ +/* + * 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.v1alpha; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.stub.HttpJsonDataprocMetastoreFederationStub; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationClientHttpJsonTest { + private static MockHttpService mockService; + private static DataprocMetastoreFederationClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataprocMetastoreFederationStub.getMethodDescriptors(), + DataprocMetastoreFederationSettings.getDefaultEndpoint()); + DataprocMetastoreFederationSettings settings = + DataprocMetastoreFederationSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataprocMetastoreFederationSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreFederationClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listFederationsTest() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFederationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFederationsTest2() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFederationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockService.addResponse(expectedResponse); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Federation federation = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Federation federation = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFederationAsync(federation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteFederationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteFederationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientTest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientTest.java new file mode 100644 index 000000000000..90427b63233d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationClientTest.java @@ -0,0 +1,807 @@ +/* + * 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.v1alpha; + +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationClientTest { + private static MockDataprocMetastoreFederation mockDataprocMetastoreFederation; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataprocMetastoreFederationClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataprocMetastoreFederation = new MockDataprocMetastoreFederation(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockDataprocMetastoreFederation, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataprocMetastoreFederationSettings settings = + DataprocMetastoreFederationSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreFederationClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listFederationsTest() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFederationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFederationsTest2() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFederationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + String name = "name3373707"; + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String name = "name3373707"; + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(federationId, actualRequest.getFederationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + String parent = "parent-995424086"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(federationId, actualRequest.getFederationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String parent = "parent-995424086"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + Federation federation = Federation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFederationRequest actualRequest = ((UpdateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + Federation federation = Federation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFederationAsync(federation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteFederationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteFederationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String name = "name3373707"; + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastore.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastore.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastore.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastore.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreFederation.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreFederation.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreFederationImpl.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreFederationImpl.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreFederationImpl.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreFederationImpl.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreImpl.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreImpl.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreImpl.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockDataprocMetastoreImpl.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockIAMPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockIAMPolicy.java new file mode 100644 index 000000000000..76f3d0490425 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * 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.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockIAMPolicyImpl.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..3a5c70bf83de --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * 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.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockLocations.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockLocations.java new file mode 100644 index 000000000000..80986afb6adf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockLocations.java @@ -0,0 +1,59 @@ +/* + * 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.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockLocationsImpl.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockLocationsImpl.java new file mode 100644 index 000000000000..e4eb77a0dd24 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * 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.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationGrpc.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationGrpc.java new file mode 100644 index 000000000000..127cc62ee44f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreFederationGrpc.java @@ -0,0 +1,733 @@ +package com.google.cloud.metastore.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Configures and manages metastore federation services.
+ * Dataproc Metastore Federation Service allows federating a collection of
+ * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+ * Metastores. The Federation Service exposes a gRPC URL through which metadata
+ * from the backend metastores are served at query time.
+ * The Dataproc Metastore Federation API defines the following resource model:
+ * * The service works with a collection of Google Cloud projects.
+ * * Each project has a collection of available locations.
+ * * Each location has a collection of federations.
+ * * Dataproc Metastore Federations are resources with names of the
+ * form:
+ * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/metastore/v1alpha/metastore_federation.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DataprocMetastoreFederationGrpc { + + private DataprocMetastoreFederationGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.metastore.v1alpha.DataprocMetastoreFederation"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListFederationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFederations", + requestType = com.google.cloud.metastore.v1alpha.ListFederationsRequest.class, + responseType = com.google.cloud.metastore.v1alpha.ListFederationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListFederationsMethod() { + io.grpc.MethodDescriptor getListFederationsMethod; + if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) == null) { + DataprocMetastoreFederationGrpc.getListFederationsMethod = getListFederationsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFederations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ListFederationsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ListFederationsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("ListFederations")) + .build(); + } + } + } + return getListFederationsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFederation", + requestType = com.google.cloud.metastore.v1alpha.GetFederationRequest.class, + responseType = com.google.cloud.metastore.v1alpha.Federation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetFederationMethod() { + io.grpc.MethodDescriptor getGetFederationMethod; + if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getGetFederationMethod = getGetFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.GetFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("GetFederation")) + .build(); + } + } + } + return getGetFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFederation", + requestType = com.google.cloud.metastore.v1alpha.CreateFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateFederationMethod() { + io.grpc.MethodDescriptor getCreateFederationMethod; + if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getCreateFederationMethod = getCreateFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.CreateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("CreateFederation")) + .build(); + } + } + } + return getCreateFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFederation", + requestType = com.google.cloud.metastore.v1alpha.UpdateFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateFederationMethod() { + io.grpc.MethodDescriptor getUpdateFederationMethod; + if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getUpdateFederationMethod = getUpdateFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.UpdateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("UpdateFederation")) + .build(); + } + } + } + return getUpdateFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFederation", + requestType = com.google.cloud.metastore.v1alpha.DeleteFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteFederationMethod() { + io.grpc.MethodDescriptor getDeleteFederationMethod; + if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getDeleteFederationMethod = getDeleteFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.DeleteFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("DeleteFederation")) + .build(); + } + } + } + return getDeleteFederationMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DataprocMetastoreFederationStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataprocMetastoreFederationBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationBlockingStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DataprocMetastoreFederationFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationFutureStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationFutureStub.newStub(factory, channel); + } + + /** + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + default void listFederations(com.google.cloud.metastore.v1alpha.ListFederationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFederationsMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + default void getFederation(com.google.cloud.metastore.v1alpha.GetFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFederationMethod(), responseObserver); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + default void createFederation(com.google.cloud.metastore.v1alpha.CreateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFederationMethod(), responseObserver); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + default void updateFederation(com.google.cloud.metastore.v1alpha.UpdateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFederationMethod(), responseObserver); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + default void deleteFederation(com.google.cloud.metastore.v1alpha.DeleteFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFederationMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static abstract class DataprocMetastoreFederationImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return DataprocMetastoreFederationGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationStub + extends io.grpc.stub.AbstractAsyncStub { + private DataprocMetastoreFederationStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public void listFederations(com.google.cloud.metastore.v1alpha.ListFederationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFederationsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public void getFederation(com.google.cloud.metastore.v1alpha.GetFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public void createFederation(com.google.cloud.metastore.v1alpha.CreateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public void updateFederation(com.google.cloud.metastore.v1alpha.UpdateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public void deleteFederation(com.google.cloud.metastore.v1alpha.DeleteFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataprocMetastoreFederationBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.ListFederationsResponse listFederations(com.google.cloud.metastore.v1alpha.ListFederationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFederationsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.Federation getFederation(com.google.cloud.metastore.v1alpha.GetFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public com.google.longrunning.Operation createFederation(com.google.cloud.metastore.v1alpha.CreateFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public com.google.longrunning.Operation updateFederation(com.google.cloud.metastore.v1alpha.UpdateFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public com.google.longrunning.Operation deleteFederation(com.google.cloud.metastore.v1alpha.DeleteFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFederationMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataprocMetastoreFederationFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationFutureStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listFederations( + com.google.cloud.metastore.v1alpha.ListFederationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFederationsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getFederation( + com.google.cloud.metastore.v1alpha.GetFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createFederation( + com.google.cloud.metastore.v1alpha.CreateFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateFederation( + com.google.cloud.metastore.v1alpha.UpdateFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteFederation( + com.google.cloud.metastore.v1alpha.DeleteFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_FEDERATIONS = 0; + private static final int METHODID_GET_FEDERATION = 1; + private static final int METHODID_CREATE_FEDERATION = 2; + private static final int METHODID_UPDATE_FEDERATION = 3; + private static final int METHODID_DELETE_FEDERATION = 4; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_FEDERATIONS: + serviceImpl.listFederations((com.google.cloud.metastore.v1alpha.ListFederationsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FEDERATION: + serviceImpl.getFederation((com.google.cloud.metastore.v1alpha.GetFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_FEDERATION: + serviceImpl.createFederation((com.google.cloud.metastore.v1alpha.CreateFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_FEDERATION: + serviceImpl.updateFederation((com.google.cloud.metastore.v1alpha.UpdateFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FEDERATION: + serviceImpl.deleteFederation((com.google.cloud.metastore.v1alpha.DeleteFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListFederationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.ListFederationsRequest, + com.google.cloud.metastore.v1alpha.ListFederationsResponse>( + service, METHODID_LIST_FEDERATIONS))) + .addMethod( + getGetFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.GetFederationRequest, + com.google.cloud.metastore.v1alpha.Federation>( + service, METHODID_GET_FEDERATION))) + .addMethod( + getCreateFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.CreateFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_FEDERATION))) + .addMethod( + getUpdateFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.UpdateFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_FEDERATION))) + .addMethod( + getDeleteFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.DeleteFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_FEDERATION))) + .build(); + } + + private static abstract class DataprocMetastoreFederationBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataprocMetastoreFederationBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataprocMetastoreFederation"); + } + } + + private static final class DataprocMetastoreFederationFileDescriptorSupplier + extends DataprocMetastoreFederationBaseDescriptorSupplier { + DataprocMetastoreFederationFileDescriptorSupplier() {} + } + + private static final class DataprocMetastoreFederationMethodDescriptorSupplier + extends DataprocMetastoreFederationBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataprocMetastoreFederationMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataprocMetastoreFederationFileDescriptorSupplier()) + .addMethod(getListFederationsMethod()) + .addMethod(getGetFederationMethod()) + .addMethod(getCreateFederationMethod()) + .addMethod(getUpdateFederationMethod()) + .addMethod(getDeleteFederationMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreGrpc.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreGrpc.java new file mode 100644 index 000000000000..cf8a8bf697cf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/grpc-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreGrpc.java @@ -0,0 +1,1965 @@ +package com.google.cloud.metastore.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * 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:
+ * * The service works with a collection of Google Cloud projects, named:
+ * `/projects/*`
+ * * Each project has a collection of available locations, named: `/locations/*`
+ *   (a location must refer to a Google Cloud `region`)
+ * * Each location has a collection of services, named: `/services/*`
+ * * Dataproc Metastore services are resources with names of the form:
+ *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/metastore/v1alpha/metastore.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DataprocMetastoreGrpc { + + private DataprocMetastoreGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.metastore.v1alpha.DataprocMetastore"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListServicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListServices", + requestType = com.google.cloud.metastore.v1alpha.ListServicesRequest.class, + responseType = com.google.cloud.metastore.v1alpha.ListServicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListServicesMethod() { + io.grpc.MethodDescriptor getListServicesMethod; + if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { + DataprocMetastoreGrpc.getListServicesMethod = getListServicesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ListServicesResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListServices")) + .build(); + } + } + } + return getListServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetService", + requestType = com.google.cloud.metastore.v1alpha.GetServiceRequest.class, + responseType = com.google.cloud.metastore.v1alpha.Service.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetServiceMethod() { + io.grpc.MethodDescriptor getGetServiceMethod; + if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { + DataprocMetastoreGrpc.getGetServiceMethod = getGetServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.Service.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetService")) + .build(); + } + } + } + return getGetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateService", + requestType = com.google.cloud.metastore.v1alpha.CreateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateServiceMethod() { + io.grpc.MethodDescriptor getCreateServiceMethod; + if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { + DataprocMetastoreGrpc.getCreateServiceMethod = getCreateServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.CreateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateService")) + .build(); + } + } + } + return getCreateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateService", + requestType = com.google.cloud.metastore.v1alpha.UpdateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateServiceMethod() { + io.grpc.MethodDescriptor getUpdateServiceMethod; + if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { + DataprocMetastoreGrpc.getUpdateServiceMethod = getUpdateServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("UpdateService")) + .build(); + } + } + } + return getUpdateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteService", + requestType = com.google.cloud.metastore.v1alpha.DeleteServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteServiceMethod() { + io.grpc.MethodDescriptor getDeleteServiceMethod; + if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { + DataprocMetastoreGrpc.getDeleteServiceMethod = getDeleteServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("DeleteService")) + .build(); + } + } + } + return getDeleteServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListMetadataImportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMetadataImports", + requestType = com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.class, + responseType = com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListMetadataImportsMethod() { + io.grpc.MethodDescriptor getListMetadataImportsMethod; + if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) == null) { + DataprocMetastoreGrpc.getListMetadataImportsMethod = getListMetadataImportsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMetadataImports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListMetadataImports")) + .build(); + } + } + } + return getListMetadataImportsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMetadataImport", + requestType = com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.class, + responseType = com.google.cloud.metastore.v1alpha.MetadataImport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetMetadataImportMethod() { + io.grpc.MethodDescriptor getGetMetadataImportMethod; + if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getGetMetadataImportMethod = getGetMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetMetadataImport")) + .build(); + } + } + } + return getGetMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMetadataImport", + requestType = com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateMetadataImportMethod() { + io.grpc.MethodDescriptor getCreateMetadataImportMethod; + if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getCreateMetadataImportMethod = getCreateMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateMetadataImport")) + .build(); + } + } + } + return getCreateMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMetadataImport", + requestType = com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateMetadataImportMethod() { + io.grpc.MethodDescriptor getUpdateMetadataImportMethod; + if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getUpdateMetadataImportMethod = getUpdateMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("UpdateMetadataImport")) + .build(); + } + } + } + return getUpdateMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getExportMetadataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportMetadata", + requestType = com.google.cloud.metastore.v1alpha.ExportMetadataRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExportMetadataMethod() { + io.grpc.MethodDescriptor getExportMetadataMethod; + if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { + DataprocMetastoreGrpc.getExportMetadataMethod = getExportMetadataMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportMetadata")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ExportMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ExportMetadata")) + .build(); + } + } + } + return getExportMetadataMethod; + } + + private static volatile io.grpc.MethodDescriptor getRestoreServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestoreService", + requestType = com.google.cloud.metastore.v1alpha.RestoreServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRestoreServiceMethod() { + io.grpc.MethodDescriptor getRestoreServiceMethod; + if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { + DataprocMetastoreGrpc.getRestoreServiceMethod = getRestoreServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.RestoreServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("RestoreService")) + .build(); + } + } + } + return getRestoreServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListBackupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackups", + requestType = com.google.cloud.metastore.v1alpha.ListBackupsRequest.class, + responseType = com.google.cloud.metastore.v1alpha.ListBackupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListBackupsMethod() { + io.grpc.MethodDescriptor getListBackupsMethod; + if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { + DataprocMetastoreGrpc.getListBackupsMethod = getListBackupsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.ListBackupsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListBackups")) + .build(); + } + } + } + return getListBackupsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackup", + requestType = com.google.cloud.metastore.v1alpha.GetBackupRequest.class, + responseType = com.google.cloud.metastore.v1alpha.Backup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBackupMethod() { + io.grpc.MethodDescriptor getGetBackupMethod; + if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { + DataprocMetastoreGrpc.getGetBackupMethod = getGetBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetBackup")) + .build(); + } + } + } + return getGetBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackup", + requestType = com.google.cloud.metastore.v1alpha.CreateBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateBackupMethod() { + io.grpc.MethodDescriptor getCreateBackupMethod; + if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { + DataprocMetastoreGrpc.getCreateBackupMethod = getCreateBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.CreateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateBackup")) + .build(); + } + } + } + return getCreateBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", + requestType = com.google.cloud.metastore.v1alpha.DeleteBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteBackupMethod() { + io.grpc.MethodDescriptor getDeleteBackupMethod; + if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { + DataprocMetastoreGrpc.getDeleteBackupMethod = getDeleteBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("DeleteBackup")) + .build(); + } + } + } + return getDeleteBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveIamPolicy", + requestType = com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.class, + responseType = com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveIamPolicyMethod() { + io.grpc.MethodDescriptor getRemoveIamPolicyMethod; + if ((getRemoveIamPolicyMethod = DataprocMetastoreGrpc.getRemoveIamPolicyMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getRemoveIamPolicyMethod = DataprocMetastoreGrpc.getRemoveIamPolicyMethod) == null) { + DataprocMetastoreGrpc.getRemoveIamPolicyMethod = getRemoveIamPolicyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("RemoveIamPolicy")) + .build(); + } + } + } + return getRemoveIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor getQueryMetadataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "QueryMetadata", + requestType = com.google.cloud.metastore.v1alpha.QueryMetadataRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getQueryMetadataMethod() { + io.grpc.MethodDescriptor getQueryMetadataMethod; + if ((getQueryMetadataMethod = DataprocMetastoreGrpc.getQueryMetadataMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getQueryMetadataMethod = DataprocMetastoreGrpc.getQueryMetadataMethod) == null) { + DataprocMetastoreGrpc.getQueryMetadataMethod = getQueryMetadataMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryMetadata")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.QueryMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("QueryMetadata")) + .build(); + } + } + } + return getQueryMetadataMethod; + } + + private static volatile io.grpc.MethodDescriptor getMoveTableToDatabaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "MoveTableToDatabase", + requestType = com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getMoveTableToDatabaseMethod() { + io.grpc.MethodDescriptor getMoveTableToDatabaseMethod; + if ((getMoveTableToDatabaseMethod = DataprocMetastoreGrpc.getMoveTableToDatabaseMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getMoveTableToDatabaseMethod = DataprocMetastoreGrpc.getMoveTableToDatabaseMethod) == null) { + DataprocMetastoreGrpc.getMoveTableToDatabaseMethod = getMoveTableToDatabaseMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MoveTableToDatabase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("MoveTableToDatabase")) + .build(); + } + } + } + return getMoveTableToDatabaseMethod; + } + + private static volatile io.grpc.MethodDescriptor getAlterMetadataResourceLocationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AlterMetadataResourceLocation", + requestType = com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAlterMetadataResourceLocationMethod() { + io.grpc.MethodDescriptor getAlterMetadataResourceLocationMethod; + if ((getAlterMetadataResourceLocationMethod = DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getAlterMetadataResourceLocationMethod = DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod) == null) { + DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod = getAlterMetadataResourceLocationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AlterMetadataResourceLocation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("AlterMetadataResourceLocation")) + .build(); + } + } + } + return getAlterMetadataResourceLocationMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DataprocMetastoreStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreStub(channel, callOptions); + } + }; + return DataprocMetastoreStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataprocMetastoreBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreBlockingStub(channel, callOptions); + } + }; + return DataprocMetastoreBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DataprocMetastoreFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFutureStub(channel, callOptions); + } + }; + return DataprocMetastoreFutureStub.newStub(factory, channel); + } + + /** + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + default void listServices(com.google.cloud.metastore.v1alpha.ListServicesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + default void getService(com.google.cloud.metastore.v1alpha.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + default void createService(com.google.cloud.metastore.v1alpha.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateServiceMethod(), responseObserver); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + default void updateService(com.google.cloud.metastore.v1alpha.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateServiceMethod(), responseObserver); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + default void deleteService(com.google.cloud.metastore.v1alpha.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteServiceMethod(), responseObserver); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + default void listMetadataImports(com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMetadataImportsMethod(), responseObserver); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + default void getMetadataImport(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + default void createMetadataImport(com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + default void updateMetadataImport(com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + default void exportMetadata(com.google.cloud.metastore.v1alpha.ExportMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportMetadataMethod(), responseObserver); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + default void restoreService(com.google.cloud.metastore.v1alpha.RestoreServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRestoreServiceMethod(), responseObserver); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + default void listBackups(com.google.cloud.metastore.v1alpha.ListBackupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListBackupsMethod(), responseObserver); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + default void getBackup(com.google.cloud.metastore.v1alpha.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + default void createBackup(com.google.cloud.metastore.v1alpha.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateBackupMethod(), responseObserver); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + default void deleteBackup(com.google.cloud.metastore.v1alpha.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteBackupMethod(), responseObserver); + } + + /** + *
+     * Removes the attached IAM policies for a resource
+     * 
+ */ + default void removeIamPolicy(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveIamPolicyMethod(), responseObserver); + } + + /** + *
+     * Query DPMS metadata.
+     * 
+ */ + default void queryMetadata(com.google.cloud.metastore.v1alpha.QueryMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryMetadataMethod(), responseObserver); + } + + /** + *
+     * Move a table to another database.
+     * 
+ */ + default void moveTableToDatabase(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMoveTableToDatabaseMethod(), responseObserver); + } + + /** + *
+     * Alter metadata resource location. The metadata resource can be a database,
+     * table, or partition. This functionality only updates the parent directory
+     * for the respective metadata resource and does not transfer any existing
+     * data to the new location.
+     * 
+ */ + default void alterMetadataResourceLocation(com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAlterMetadataResourceLocationMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static abstract class DataprocMetastoreImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return DataprocMetastoreGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreStub + extends io.grpc.stub.AbstractAsyncStub { + private DataprocMetastoreStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public void listServices(com.google.cloud.metastore.v1alpha.ListServicesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public void getService(com.google.cloud.metastore.v1alpha.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public void createService(com.google.cloud.metastore.v1alpha.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public void updateService(com.google.cloud.metastore.v1alpha.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public void deleteService(com.google.cloud.metastore.v1alpha.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public void listMetadataImports(com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public void getMetadataImport(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public void createMetadataImport(com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public void updateMetadataImport(com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public void exportMetadata(com.google.cloud.metastore.v1alpha.ExportMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public void restoreService(com.google.cloud.metastore.v1alpha.RestoreServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public void listBackups(com.google.cloud.metastore.v1alpha.ListBackupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public void getBackup(com.google.cloud.metastore.v1alpha.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public void createBackup(com.google.cloud.metastore.v1alpha.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public void deleteBackup(com.google.cloud.metastore.v1alpha.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes the attached IAM policies for a resource
+     * 
+ */ + public void removeIamPolicy(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Query DPMS metadata.
+     * 
+ */ + public void queryMetadata(com.google.cloud.metastore.v1alpha.QueryMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getQueryMetadataMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Move a table to another database.
+     * 
+ */ + public void moveTableToDatabase(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getMoveTableToDatabaseMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Alter metadata resource location. The metadata resource can be a database,
+     * table, or partition. This functionality only updates the parent directory
+     * for the respective metadata resource and does not transfer any existing
+     * data to the new location.
+     * 
+ */ + public void alterMetadataResourceLocation(com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataprocMetastoreBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.ListServicesResponse listServices(com.google.cloud.metastore.v1alpha.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.Service getService(com.google.cloud.metastore.v1alpha.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public com.google.longrunning.Operation createService(com.google.cloud.metastore.v1alpha.CreateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public com.google.longrunning.Operation updateService(com.google.cloud.metastore.v1alpha.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public com.google.longrunning.Operation deleteService(com.google.cloud.metastore.v1alpha.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse listMetadataImports(com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMetadataImportsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createMetadataImport(com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public com.google.longrunning.Operation updateMetadataImport(com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public com.google.longrunning.Operation exportMetadata(com.google.cloud.metastore.v1alpha.ExportMetadataRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportMetadataMethod(), getCallOptions(), request); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public com.google.longrunning.Operation restoreService(com.google.cloud.metastore.v1alpha.RestoreServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestoreServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.ListBackupsResponse listBackups(com.google.cloud.metastore.v1alpha.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.Backup getBackup(com.google.cloud.metastore.v1alpha.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createBackup(com.google.cloud.metastore.v1alpha.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackup(com.google.cloud.metastore.v1alpha.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes the attached IAM policies for a resource
+     * 
+ */ + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse removeIamPolicy(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveIamPolicyMethod(), getCallOptions(), request); + } + + /** + *
+     * Query DPMS metadata.
+     * 
+ */ + public com.google.longrunning.Operation queryMetadata(com.google.cloud.metastore.v1alpha.QueryMetadataRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getQueryMetadataMethod(), getCallOptions(), request); + } + + /** + *
+     * Move a table to another database.
+     * 
+ */ + public com.google.longrunning.Operation moveTableToDatabase(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getMoveTableToDatabaseMethod(), getCallOptions(), request); + } + + /** + *
+     * Alter metadata resource location. The metadata resource can be a database,
+     * table, or partition. This functionality only updates the parent directory
+     * for the respective metadata resource and does not transfer any existing
+     * data to the new location.
+     * 
+ */ + public com.google.longrunning.Operation alterMetadataResourceLocation(com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAlterMetadataResourceLocationMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataprocMetastoreFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFutureStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listServices( + com.google.cloud.metastore.v1alpha.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getService( + com.google.cloud.metastore.v1alpha.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createService( + com.google.cloud.metastore.v1alpha.CreateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateService( + com.google.cloud.metastore.v1alpha.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteService( + com.google.cloud.metastore.v1alpha.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listMetadataImports( + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getMetadataImport( + com.google.cloud.metastore.v1alpha.GetMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createMetadataImport( + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateMetadataImport( + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture exportMetadata( + com.google.cloud.metastore.v1alpha.ExportMetadataRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture restoreService( + com.google.cloud.metastore.v1alpha.RestoreServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listBackups( + com.google.cloud.metastore.v1alpha.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBackup( + com.google.cloud.metastore.v1alpha.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createBackup( + com.google.cloud.metastore.v1alpha.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteBackup( + com.google.cloud.metastore.v1alpha.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes the attached IAM policies for a resource
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture removeIamPolicy( + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), request); + } + + /** + *
+     * Query DPMS metadata.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture queryMetadata( + com.google.cloud.metastore.v1alpha.QueryMetadataRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getQueryMetadataMethod(), getCallOptions()), request); + } + + /** + *
+     * Move a table to another database.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture moveTableToDatabase( + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getMoveTableToDatabaseMethod(), getCallOptions()), request); + } + + /** + *
+     * Alter metadata resource location. The metadata resource can be a database,
+     * table, or partition. This functionality only updates the parent directory
+     * for the respective metadata resource and does not transfer any existing
+     * data to the new location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture alterMetadataResourceLocation( + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_SERVICES = 0; + private static final int METHODID_GET_SERVICE = 1; + private static final int METHODID_CREATE_SERVICE = 2; + private static final int METHODID_UPDATE_SERVICE = 3; + private static final int METHODID_DELETE_SERVICE = 4; + private static final int METHODID_LIST_METADATA_IMPORTS = 5; + private static final int METHODID_GET_METADATA_IMPORT = 6; + private static final int METHODID_CREATE_METADATA_IMPORT = 7; + private static final int METHODID_UPDATE_METADATA_IMPORT = 8; + private static final int METHODID_EXPORT_METADATA = 9; + private static final int METHODID_RESTORE_SERVICE = 10; + private static final int METHODID_LIST_BACKUPS = 11; + private static final int METHODID_GET_BACKUP = 12; + private static final int METHODID_CREATE_BACKUP = 13; + private static final int METHODID_DELETE_BACKUP = 14; + private static final int METHODID_REMOVE_IAM_POLICY = 15; + private static final int METHODID_QUERY_METADATA = 16; + private static final int METHODID_MOVE_TABLE_TO_DATABASE = 17; + private static final int METHODID_ALTER_METADATA_RESOURCE_LOCATION = 18; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_SERVICES: + serviceImpl.listServices((com.google.cloud.metastore.v1alpha.ListServicesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SERVICE: + serviceImpl.getService((com.google.cloud.metastore.v1alpha.GetServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SERVICE: + serviceImpl.createService((com.google.cloud.metastore.v1alpha.CreateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SERVICE: + serviceImpl.updateService((com.google.cloud.metastore.v1alpha.UpdateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SERVICE: + serviceImpl.deleteService((com.google.cloud.metastore.v1alpha.DeleteServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_METADATA_IMPORTS: + serviceImpl.listMetadataImports((com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_METADATA_IMPORT: + serviceImpl.getMetadataImport((com.google.cloud.metastore.v1alpha.GetMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_METADATA_IMPORT: + serviceImpl.createMetadataImport((com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_METADATA_IMPORT: + serviceImpl.updateMetadataImport((com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_METADATA: + serviceImpl.exportMetadata((com.google.cloud.metastore.v1alpha.ExportMetadataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTORE_SERVICE: + serviceImpl.restoreService((com.google.cloud.metastore.v1alpha.RestoreServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_BACKUPS: + serviceImpl.listBackups((com.google.cloud.metastore.v1alpha.ListBackupsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP: + serviceImpl.getBackup((com.google.cloud.metastore.v1alpha.GetBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BACKUP: + serviceImpl.createBackup((com.google.cloud.metastore.v1alpha.CreateBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_BACKUP: + serviceImpl.deleteBackup((com.google.cloud.metastore.v1alpha.DeleteBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_IAM_POLICY: + serviceImpl.removeIamPolicy((com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_QUERY_METADATA: + serviceImpl.queryMetadata((com.google.cloud.metastore.v1alpha.QueryMetadataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MOVE_TABLE_TO_DATABASE: + serviceImpl.moveTableToDatabase((com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ALTER_METADATA_RESOURCE_LOCATION: + serviceImpl.alterMetadataResourceLocation((com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListServicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.ListServicesRequest, + com.google.cloud.metastore.v1alpha.ListServicesResponse>( + service, METHODID_LIST_SERVICES))) + .addMethod( + getGetServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.GetServiceRequest, + com.google.cloud.metastore.v1alpha.Service>( + service, METHODID_GET_SERVICE))) + .addMethod( + getCreateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.CreateServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_SERVICE))) + .addMethod( + getUpdateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.UpdateServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_SERVICE))) + .addMethod( + getDeleteServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.DeleteServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_SERVICE))) + .addMethod( + getListMetadataImportsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest, + com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse>( + service, METHODID_LIST_METADATA_IMPORTS))) + .addMethod( + getGetMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.GetMetadataImportRequest, + com.google.cloud.metastore.v1alpha.MetadataImport>( + service, METHODID_GET_METADATA_IMPORT))) + .addMethod( + getCreateMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_METADATA_IMPORT))) + .addMethod( + getUpdateMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_METADATA_IMPORT))) + .addMethod( + getExportMetadataMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.ExportMetadataRequest, + com.google.longrunning.Operation>( + service, METHODID_EXPORT_METADATA))) + .addMethod( + getRestoreServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.RestoreServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_RESTORE_SERVICE))) + .addMethod( + getListBackupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.ListBackupsRequest, + com.google.cloud.metastore.v1alpha.ListBackupsResponse>( + service, METHODID_LIST_BACKUPS))) + .addMethod( + getGetBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.GetBackupRequest, + com.google.cloud.metastore.v1alpha.Backup>( + service, METHODID_GET_BACKUP))) + .addMethod( + getCreateBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.CreateBackupRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_BACKUP))) + .addMethod( + getDeleteBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.DeleteBackupRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_BACKUP))) + .addMethod( + getRemoveIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest, + com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse>( + service, METHODID_REMOVE_IAM_POLICY))) + .addMethod( + getQueryMetadataMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.QueryMetadataRequest, + com.google.longrunning.Operation>( + service, METHODID_QUERY_METADATA))) + .addMethod( + getMoveTableToDatabaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest, + com.google.longrunning.Operation>( + service, METHODID_MOVE_TABLE_TO_DATABASE))) + .addMethod( + getAlterMetadataResourceLocationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest, + com.google.longrunning.Operation>( + service, METHODID_ALTER_METADATA_RESOURCE_LOCATION))) + .build(); + } + + private static abstract class DataprocMetastoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataprocMetastoreBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataprocMetastore"); + } + } + + private static final class DataprocMetastoreFileDescriptorSupplier + extends DataprocMetastoreBaseDescriptorSupplier { + DataprocMetastoreFileDescriptorSupplier() {} + } + + private static final class DataprocMetastoreMethodDescriptorSupplier + extends DataprocMetastoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataprocMetastoreMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataprocMetastoreGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataprocMetastoreFileDescriptorSupplier()) + .addMethod(getListServicesMethod()) + .addMethod(getGetServiceMethod()) + .addMethod(getCreateServiceMethod()) + .addMethod(getUpdateServiceMethod()) + .addMethod(getDeleteServiceMethod()) + .addMethod(getListMetadataImportsMethod()) + .addMethod(getGetMetadataImportMethod()) + .addMethod(getCreateMetadataImportMethod()) + .addMethod(getUpdateMetadataImportMethod()) + .addMethod(getExportMetadataMethod()) + .addMethod(getRestoreServiceMethod()) + .addMethod(getListBackupsMethod()) + .addMethod(getGetBackupMethod()) + .addMethod(getCreateBackupMethod()) + .addMethod(getDeleteBackupMethod()) + .addMethod(getRemoveIamPolicyMethod()) + .addMethod(getQueryMetadataMethod()) + .addMethod(getMoveTableToDatabaseMethod()) + .addMethod(getAlterMetadataResourceLocationMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequest.java new file mode 100644 index 000000000000..3f60b33ed61f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequest.java @@ -0,0 +1,959 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest} + */ +public final class AlterMetadataResourceLocationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) + AlterMetadataResourceLocationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AlterMetadataResourceLocationRequest.newBuilder() to construct. + private AlterMetadataResourceLocationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AlterMetadataResourceLocationRequest() { + service_ = ""; + resourceName_ = ""; + locationUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AlterMetadataResourceLocationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.class, com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceName_ = ""; + /** + *
+   * Required. The relative metadata resource name in the following format.
+   * `databases/{database_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+   * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The resourceName. + */ + @java.lang.Override + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } + } + /** + *
+   * Required. The relative metadata resource name in the following format.
+   * `databases/{database_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+   * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_URI_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object locationUri_ = ""; + /** + *
+   * Required. The new location URI for the metadata resource.
+   * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The locationUri. + */ + @java.lang.Override + public java.lang.String getLocationUri() { + java.lang.Object ref = locationUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationUri_ = s; + return s; + } + } + /** + *
+   * Required. The new location URI for the metadata resource.
+   * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for locationUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationUriBytes() { + java.lang.Object ref = locationUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, locationUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, locationUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest other = (com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getResourceName() + .equals(other.getResourceName())) return false; + if (!getLocationUri() + .equals(other.getLocationUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getResourceName().hashCode(); + hash = (37 * hash) + LOCATION_URI_FIELD_NUMBER; + hash = (53 * hash) + getLocationUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.class, com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + resourceName_ = ""; + locationUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest build() { + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest buildPartial() { + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest result = new com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceName_ = resourceName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.locationUri_ = locationUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest other) { + if (other == com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceName().isEmpty()) { + resourceName_ = other.resourceName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLocationUri().isEmpty()) { + locationUri_ = other.locationUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + resourceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + locationUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object resourceName_ = ""; + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The resourceName. + */ + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resourceName. + */ + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearResourceName() { + resourceName_ = getDefaultInstance().getResourceName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object locationUri_ = ""; + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The locationUri. + */ + public java.lang.String getLocationUri() { + java.lang.Object ref = locationUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for locationUri. + */ + public com.google.protobuf.ByteString + getLocationUriBytes() { + java.lang.Object ref = locationUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The locationUri to set. + * @return This builder for chaining. + */ + public Builder setLocationUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + locationUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearLocationUri() { + locationUri_ = getDefaultInstance().getLocationUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for locationUri to set. + * @return This builder for chaining. + */ + public Builder setLocationUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + locationUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) + private static final com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest(); + } + + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlterMetadataResourceLocationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequestOrBuilder.java new file mode 100644 index 000000000000..fe2062cb061c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationRequestOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface AlterMetadataResourceLocationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Required. The relative metadata resource name in the following format.
+   * `databases/{database_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+   * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The resourceName. + */ + java.lang.String getResourceName(); + /** + *
+   * Required. The relative metadata resource name in the following format.
+   * `databases/{database_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+   * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resourceName. + */ + com.google.protobuf.ByteString + getResourceNameBytes(); + + /** + *
+   * Required. The new location URI for the metadata resource.
+   * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The locationUri. + */ + java.lang.String getLocationUri(); + /** + *
+   * Required. The new location URI for the metadata resource.
+   * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for locationUri. + */ + com.google.protobuf.ByteString + getLocationUriBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponse.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponse.java new file mode 100644 index 000000000000..583403634414 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponse.java @@ -0,0 +1,411 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Response message for
+ * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse} + */ +public final class AlterMetadataResourceLocationResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) + AlterMetadataResourceLocationResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AlterMetadataResourceLocationResponse.newBuilder() to construct. + private AlterMetadataResourceLocationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AlterMetadataResourceLocationResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AlterMetadataResourceLocationResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.class, com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse other = (com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.class, com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse build() { + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse buildPartial() { + com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse result = new com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) { + return mergeFrom((com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse other) { + if (other == com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) + private static final com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse(); + } + + public static com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlterMetadataResourceLocationResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponseOrBuilder.java new file mode 100644 index 000000000000..412754968859 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface AlterMetadataResourceLocationResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfig.java new file mode 100644 index 000000000000..94cbe9eaba76 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfig.java @@ -0,0 +1,1195 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Configuration information for the auxiliary service versions.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} + */ +public final class AuxiliaryVersionConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) + AuxiliaryVersionConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use AuxiliaryVersionConfig.newBuilder() to construct. + private AuxiliaryVersionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuxiliaryVersionConfig() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuxiliaryVersionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.class, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; + private static final class ConfigOverridesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1alpha.NetworkConfig networkConfig_; + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig() { + return networkConfig_ == null ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() : networkConfig_; + } + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return networkConfig_ == null ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() : networkConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetConfigOverrides(), + ConfigOverridesDefaultEntryHolder.defaultEntry, + 2); + if (networkConfig_ != null) { + output.writeMessage(3, getNetworkConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + for (java.util.Map.Entry entry + : internalGetConfigOverrides().getMap().entrySet()) { + com.google.protobuf.MapEntry + configOverrides__ = ConfigOverridesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, configOverrides__); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNetworkConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig other = (com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetConfigOverrides().equals( + other.internalGetConfigOverrides())) return false; + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig() + .equals(other.getNetworkConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetConfigOverrides().getMap().isEmpty()) { + hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + internalGetConfigOverrides().hashCode(); + } + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration information for the auxiliary service versions.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.AuxiliaryVersionConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.class, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + internalGetMutableConfigOverrides().clear(); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig build() { + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig buildPartial() { + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig result = new com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configOverrides_ = internalGetConfigOverrides(); + result.configOverrides_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.networkConfig_ = networkConfigBuilder_ == null + ? networkConfig_ + : networkConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig other) { + if (other == com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableConfigOverrides().mergeFrom( + other.internalGetConfigOverrides()); + bitField0_ |= 0x00000002; + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + configOverrides__ = input.readMessage( + ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableConfigOverrides().getMutableMap().put( + configOverrides__.getKey(), configOverrides__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getNetworkConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + private com.google.protobuf.MapField + internalGetMutableConfigOverrides() { + if (configOverrides_ == null) { + configOverrides_ = com.google.protobuf.MapField.newMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + if (!configOverrides_.isMutable()) { + configOverrides_ = configOverrides_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearConfigOverrides() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableConfigOverrides().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder removeConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableConfigOverrides().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableConfigOverrides() { + bitField0_ |= 0x00000002; + return internalGetMutableConfigOverrides().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putConfigOverrides( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableConfigOverrides().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putAllConfigOverrides( + java.util.Map values) { + internalGetMutableConfigOverrides().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.cloud.metastore.v1alpha.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig, com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder> networkConfigBuilder_; + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setNetworkConfig(com.google.cloud.metastore.v1alpha.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + } else { + networkConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setNetworkConfig( + com.google.cloud.metastore.v1alpha.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeNetworkConfig(com.google.cloud.metastore.v1alpha.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + networkConfig_ != null && + networkConfig_ != com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance()) { + getNetworkConfigBuilder().mergeFrom(value); + } else { + networkConfig_ = value; + } + } else { + networkConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig.Builder getNetworkConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null ? + com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() : networkConfig_; + } + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig, com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig, com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder>( + getNetworkConfig(), + getParentForChildren(), + isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) + private static final com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig(); + } + + public static com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuxiliaryVersionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfigOrBuilder.java new file mode 100644 index 000000000000..8938484fd15c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AuxiliaryVersionConfigOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface AuxiliaryVersionConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.AuxiliaryVersionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + int getConfigOverridesCount(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + boolean containsConfigOverrides( + java.lang.String key); + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getConfigOverrides(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.util.Map + getConfigOverridesMap(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.lang.String getConfigOverridesOrThrow( + java.lang.String key); + + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig(); + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastore.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastore.java new file mode 100644 index 000000000000..7583d5a5db3c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastore.java @@ -0,0 +1,906 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Represents a backend metastore for the federation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.BackendMetastore} + */ +public final class BackendMetastore extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.BackendMetastore) + BackendMetastoreOrBuilder { +private static final long serialVersionUID = 0L; + // Use BackendMetastore.newBuilder() to construct. + private BackendMetastore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BackendMetastore() { + name_ = ""; + metastoreType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BackendMetastore(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_BackendMetastore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.BackendMetastore.class, com.google.cloud.metastore.v1alpha.BackendMetastore.Builder.class); + } + + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType} + */ + public enum MetastoreType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The metastore type is not set.
+     * 
+ * + * METASTORE_TYPE_UNSPECIFIED = 0; + */ + METASTORE_TYPE_UNSPECIFIED(0), + /** + *
+     * The backend metastore is Dataplex.
+     * 
+ * + * DATAPLEX = 1; + */ + DATAPLEX(1), + /** + *
+     * The backend metastore is BigQuery.
+     * 
+ * + * BIGQUERY = 2; + */ + BIGQUERY(2), + /** + *
+     * The backend metastore is Dataproc Metastore.
+     * 
+ * + * DATAPROC_METASTORE = 3; + */ + DATAPROC_METASTORE(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The metastore type is not set.
+     * 
+ * + * METASTORE_TYPE_UNSPECIFIED = 0; + */ + public static final int METASTORE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The backend metastore is Dataplex.
+     * 
+ * + * DATAPLEX = 1; + */ + public static final int DATAPLEX_VALUE = 1; + /** + *
+     * The backend metastore is BigQuery.
+     * 
+ * + * BIGQUERY = 2; + */ + public static final int BIGQUERY_VALUE = 2; + /** + *
+     * The backend metastore is Dataproc Metastore.
+     * 
+ * + * DATAPROC_METASTORE = 3; + */ + public static final int DATAPROC_METASTORE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetastoreType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetastoreType forNumber(int value) { + switch (value) { + case 0: return METASTORE_TYPE_UNSPECIFIED; + case 1: return DATAPLEX; + case 2: return BIGQUERY; + case 3: return DATAPROC_METASTORE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MetastoreType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetastoreType findValueByNumber(int number) { + return MetastoreType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.BackendMetastore.getDescriptor().getEnumTypes().get(0); + } + + private static final MetastoreType[] VALUES = values(); + + public static MetastoreType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetastoreType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METASTORE_TYPE_FIELD_NUMBER = 2; + private int metastoreType_ = 0; + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + @java.lang.Override public int getMetastoreTypeValue() { + return metastoreType_; + } + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType getMetastoreType() { + com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType result = com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.forNumber(metastoreType_); + return result == null ? com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (metastoreType_ != com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.METASTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, metastoreType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (metastoreType_ != com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.METASTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, metastoreType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.BackendMetastore)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.BackendMetastore other = (com.google.cloud.metastore.v1alpha.BackendMetastore) obj; + + if (!getName() + .equals(other.getName())) return false; + if (metastoreType_ != other.metastoreType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + METASTORE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + metastoreType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.BackendMetastore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.BackendMetastore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a backend metastore for the federation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.BackendMetastore} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.BackendMetastore) + com.google.cloud.metastore.v1alpha.BackendMetastoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_BackendMetastore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.BackendMetastore.class, com.google.cloud.metastore.v1alpha.BackendMetastore.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.BackendMetastore.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + metastoreType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackendMetastore getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.BackendMetastore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackendMetastore build() { + com.google.cloud.metastore.v1alpha.BackendMetastore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackendMetastore buildPartial() { + com.google.cloud.metastore.v1alpha.BackendMetastore result = new com.google.cloud.metastore.v1alpha.BackendMetastore(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.BackendMetastore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metastoreType_ = metastoreType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.BackendMetastore) { + return mergeFrom((com.google.cloud.metastore.v1alpha.BackendMetastore)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.BackendMetastore other) { + if (other == com.google.cloud.metastore.v1alpha.BackendMetastore.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.metastoreType_ != 0) { + setMetastoreTypeValue(other.getMetastoreTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + metastoreType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int metastoreType_ = 0; + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + @java.lang.Override public int getMetastoreTypeValue() { + return metastoreType_; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @param value The enum numeric value on the wire for metastoreType to set. + * @return This builder for chaining. + */ + public Builder setMetastoreTypeValue(int value) { + metastoreType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType getMetastoreType() { + com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType result = com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.forNumber(metastoreType_); + return result == null ? com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType.UNRECOGNIZED : result; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @param value The metastoreType to set. + * @return This builder for chaining. + */ + public Builder setMetastoreType(com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + metastoreType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @return This builder for chaining. + */ + public Builder clearMetastoreType() { + bitField0_ = (bitField0_ & ~0x00000002); + metastoreType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.BackendMetastore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.BackendMetastore) + private static final com.google.cloud.metastore.v1alpha.BackendMetastore DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.BackendMetastore(); + } + + public static com.google.cloud.metastore.v1alpha.BackendMetastore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackendMetastore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackendMetastore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastoreOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastoreOrBuilder.java new file mode 100644 index 000000000000..ffa666e16e04 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackendMetastoreOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public interface BackendMetastoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.BackendMetastore) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + int getMetastoreTypeValue(); + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + com.google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType getMetastoreType(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Backup.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Backup.java new file mode 100644 index 000000000000..758cea6ccc4f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Backup.java @@ -0,0 +1,1993 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * The details of a backup resource.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Backup} + */ +public final class Backup extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Backup) + BackupOrBuilder { +private static final long serialVersionUID = 0L; + // Use Backup.newBuilder() to construct. + private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Backup() { + name_ = ""; + state_ = 0; + description_ = ""; + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Backup(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Backup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Backup.class, com.google.cloud.metastore.v1alpha.Backup.Builder.class); + } + + /** + *
+   * The current state of the backup.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.Backup.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the backup is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The backup is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The backup is being deleted.
+     * 
+ * + * DELETING = 2; + */ + DELETING(2), + /** + *
+     * The backup is active and ready to use.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + *
+     * The backup failed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + *
+     * The backup is being restored.
+     * 
+ * + * RESTORING = 5; + */ + RESTORING(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the backup is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The backup is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The backup is being deleted.
+     * 
+ * + * DELETING = 2; + */ + public static final int DELETING_VALUE = 2; + /** + *
+     * The backup is active and ready to use.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + *
+     * The backup failed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + *
+     * The backup is being restored.
+     * 
+ * + * RESTORING = 5; + */ + public static final int RESTORING_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return DELETING; + case 3: return ACTIVE; + case 4: return FAILED; + case 5: return RESTORING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.Backup.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Backup.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Backup.State getState() { + com.google.cloud.metastore.v1alpha.Backup.State result = com.google.cloud.metastore.v1alpha.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.Backup.State.UNRECOGNIZED : result; + } + + public static final int SERVICE_REVISION_FIELD_NUMBER = 5; + private com.google.cloud.metastore.v1alpha.Service serviceRevision_; + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + @java.lang.Override + public boolean hasServiceRevision() { + return serviceRevision_ != null; + } + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service getServiceRevision() { + return serviceRevision_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : serviceRevision_; + } + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceRevisionOrBuilder() { + return serviceRevision_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : serviceRevision_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESTORING_SERVICES_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList restoringServices_; + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + public com.google.protobuf.ProtocolStringList + getRestoringServicesList() { + return restoringServices_; + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + public int getRestoringServicesCount() { + return restoringServices_.size(); + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + public java.lang.String getRestoringServices(int index) { + return restoringServices_.get(index); + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + public com.google.protobuf.ByteString + getRestoringServicesBytes(int index) { + return restoringServices_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1alpha.Backup.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (serviceRevision_ != null) { + output.writeMessage(5, getServiceRevision()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + for (int i = 0; i < restoringServices_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, restoringServices_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1alpha.Backup.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, state_); + } + if (serviceRevision_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getServiceRevision()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + { + int dataSize = 0; + for (int i = 0; i < restoringServices_.size(); i++) { + dataSize += computeStringSizeNoTag(restoringServices_.getRaw(i)); + } + size += dataSize; + size += 1 * getRestoringServicesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.Backup)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.Backup other = (com.google.cloud.metastore.v1alpha.Backup) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (hasServiceRevision() != other.hasServiceRevision()) return false; + if (hasServiceRevision()) { + if (!getServiceRevision() + .equals(other.getServiceRevision())) return false; + } + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getRestoringServicesList() + .equals(other.getRestoringServicesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasServiceRevision()) { + hash = (37 * hash) + SERVICE_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getServiceRevision().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getRestoringServicesCount() > 0) { + hash = (37 * hash) + RESTORING_SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getRestoringServicesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.Backup parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Backup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Backup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Backup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Backup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a backup resource.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Backup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Backup) + com.google.cloud.metastore.v1alpha.BackupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Backup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Backup.class, com.google.cloud.metastore.v1alpha.Backup.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.Backup.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + serviceRevision_ = null; + if (serviceRevisionBuilder_ != null) { + serviceRevisionBuilder_.dispose(); + serviceRevisionBuilder_ = null; + } + description_ = ""; + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Backup_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Backup getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Backup build() { + com.google.cloud.metastore.v1alpha.Backup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Backup buildPartial() { + com.google.cloud.metastore.v1alpha.Backup result = new com.google.cloud.metastore.v1alpha.Backup(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.Backup result) { + if (((bitField0_ & 0x00000040) != 0)) { + restoringServices_ = restoringServices_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.restoringServices_ = restoringServices_; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.Backup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.serviceRevision_ = serviceRevisionBuilder_ == null + ? serviceRevision_ + : serviceRevisionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.Backup) { + return mergeFrom((com.google.cloud.metastore.v1alpha.Backup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Backup other) { + if (other == com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasServiceRevision()) { + mergeServiceRevision(other.getServiceRevision()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.restoringServices_.isEmpty()) { + if (restoringServices_.isEmpty()) { + restoringServices_ = other.restoringServices_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureRestoringServicesIsMutable(); + restoringServices_.addAll(other.restoringServices_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getServiceRevisionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureRestoringServicesIsMutable(); + restoringServices_.add(s); + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Backup.State getState() { + com.google.cloud.metastore.v1alpha.Backup.State result = com.google.cloud.metastore.v1alpha.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.Backup.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1alpha.Backup.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.Service serviceRevision_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder> serviceRevisionBuilder_; + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + public boolean hasServiceRevision() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + public com.google.cloud.metastore.v1alpha.Service getServiceRevision() { + if (serviceRevisionBuilder_ == null) { + return serviceRevision_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : serviceRevision_; + } else { + return serviceRevisionBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setServiceRevision(com.google.cloud.metastore.v1alpha.Service value) { + if (serviceRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceRevision_ = value; + } else { + serviceRevisionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setServiceRevision( + com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { + if (serviceRevisionBuilder_ == null) { + serviceRevision_ = builderForValue.build(); + } else { + serviceRevisionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeServiceRevision(com.google.cloud.metastore.v1alpha.Service value) { + if (serviceRevisionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + serviceRevision_ != null && + serviceRevision_ != com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()) { + getServiceRevisionBuilder().mergeFrom(value); + } else { + serviceRevision_ = value; + } + } else { + serviceRevisionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearServiceRevision() { + bitField0_ = (bitField0_ & ~0x00000010); + serviceRevision_ = null; + if (serviceRevisionBuilder_ != null) { + serviceRevisionBuilder_.dispose(); + serviceRevisionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.Service.Builder getServiceRevisionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getServiceRevisionFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceRevisionOrBuilder() { + if (serviceRevisionBuilder_ != null) { + return serviceRevisionBuilder_.getMessageOrBuilder(); + } else { + return serviceRevision_ == null ? + com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : serviceRevision_; + } + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder> + getServiceRevisionFieldBuilder() { + if (serviceRevisionBuilder_ == null) { + serviceRevisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder>( + getServiceRevision(), + getParentForChildren(), + isClean()); + serviceRevision_ = null; + } + return serviceRevisionBuilder_; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRestoringServicesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + restoringServices_ = new com.google.protobuf.LazyStringArrayList(restoringServices_); + bitField0_ |= 0x00000040; + } + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + public com.google.protobuf.ProtocolStringList + getRestoringServicesList() { + return restoringServices_.getUnmodifiableView(); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + public int getRestoringServicesCount() { + return restoringServices_.size(); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + public java.lang.String getRestoringServices(int index) { + return restoringServices_.get(index); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + public com.google.protobuf.ByteString + getRestoringServicesBytes(int index) { + return restoringServices_.getByteString(index); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index to set the value at. + * @param value The restoringServices to set. + * @return This builder for chaining. + */ + public Builder setRestoringServices( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRestoringServicesIsMutable(); + restoringServices_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The restoringServices to add. + * @return This builder for chaining. + */ + public Builder addRestoringServices( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRestoringServicesIsMutable(); + restoringServices_.add(value); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param values The restoringServices to add. + * @return This builder for chaining. + */ + public Builder addAllRestoringServices( + java.lang.Iterable values) { + ensureRestoringServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, restoringServices_); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearRestoringServices() { + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes of the restoringServices to add. + * @return This builder for chaining. + */ + public Builder addRestoringServicesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureRestoringServicesIsMutable(); + restoringServices_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Backup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Backup) + private static final com.google.cloud.metastore.v1alpha.Backup DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Backup(); + } + + public static com.google.cloud.metastore.v1alpha.Backup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Backup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Backup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupName.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupName.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupOrBuilder.java new file mode 100644 index 000000000000..4b01dde6b25e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/BackupOrBuilder.java @@ -0,0 +1,192 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface BackupOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Backup) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1alpha.Backup.State getState(); + + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + boolean hasServiceRevision(); + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + com.google.cloud.metastore.v1alpha.Service getServiceRevision(); + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceRevisionOrBuilder(); + + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + java.util.List + getRestoringServicesList(); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + int getRestoringServicesCount(); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + java.lang.String getRestoringServices(int index); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + com.google.protobuf.ByteString + getRestoringServicesBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequest.java new file mode 100644 index 000000000000..de96ff052dd1 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequest.java @@ -0,0 +1,1256 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.CreateBackupRequest} + */ +public final class CreateBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.CreateBackupRequest) + CreateBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateBackupRequest.newBuilder() to construct. + private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateBackupRequest() { + parent_ = ""; + backupId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.CreateBackupRequest.class, com.google.cloud.metastore.v1alpha.CreateBackupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1alpha.Backup 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return backup_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Backup getBackup() { + return backup_ == null ? com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupOrBuilder() { + return backup_ == null ? com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance() : backup_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); + } + if (backup_ != null) { + output.writeMessage(3, getBackup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); + } + if (backup_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBackup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.CreateBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.CreateBackupRequest other = (com.google.cloud.metastore.v1alpha.CreateBackupRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getBackupId() + .equals(other.getBackupId())) return false; + if (hasBackup() != other.hasBackup()) return false; + if (hasBackup()) { + if (!getBackup() + .equals(other.getBackup())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + if (hasBackup()) { + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.CreateBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.CreateBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.CreateBackupRequest) + com.google.cloud.metastore.v1alpha.CreateBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.CreateBackupRequest.class, com.google.cloud.metastore.v1alpha.CreateBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.CreateBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupId_ = ""; + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.CreateBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateBackupRequest build() { + com.google.cloud.metastore.v1alpha.CreateBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateBackupRequest buildPartial() { + com.google.cloud.metastore.v1alpha.CreateBackupRequest result = new com.google.cloud.metastore.v1alpha.CreateBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.CreateBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupId_ = backupId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backup_ = backupBuilder_ == null + ? backup_ + : backupBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.CreateBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.CreateBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.CreateBackupRequest other) { + if (other == com.google.cloud.metastore.v1alpha.CreateBackupRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBackup()) { + mergeBackup(other.getBackup()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + backupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBackupFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString + getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.Backup backup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Backup, com.google.cloud.metastore.v1alpha.Backup.Builder, com.google.cloud.metastore.v1alpha.BackupOrBuilder> backupBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + public boolean hasBackup() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + public com.google.cloud.metastore.v1alpha.Backup getBackup() { + if (backupBuilder_ == null) { + return backup_ == null ? com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance() : backup_; + } else { + return backupBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setBackup(com.google.cloud.metastore.v1alpha.Backup value) { + if (backupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backup_ = value; + } else { + backupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setBackup( + com.google.cloud.metastore.v1alpha.Backup.Builder builderForValue) { + if (backupBuilder_ == null) { + backup_ = builderForValue.build(); + } else { + backupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeBackup(com.google.cloud.metastore.v1alpha.Backup value) { + if (backupBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + backup_ != null && + backup_ != com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance()) { + getBackupBuilder().mergeFrom(value); + } else { + backup_ = value; + } + } else { + backupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearBackup() { + bitField0_ = (bitField0_ & ~0x00000004); + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.Backup.Builder getBackupBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBackupFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupOrBuilder() { + if (backupBuilder_ != null) { + return backupBuilder_.getMessageOrBuilder(); + } else { + return backup_ == null ? + com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Backup, com.google.cloud.metastore.v1alpha.Backup.Builder, com.google.cloud.metastore.v1alpha.BackupOrBuilder> + getBackupFieldBuilder() { + if (backupBuilder_ == null) { + backupBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Backup, com.google.cloud.metastore.v1alpha.Backup.Builder, com.google.cloud.metastore.v1alpha.BackupOrBuilder>( + getBackup(), + getParentForChildren(), + isClean()); + backup_ = null; + } + return backupBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.CreateBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.CreateBackupRequest) + private static final com.google.cloud.metastore.v1alpha.CreateBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.CreateBackupRequest(); + } + + public static com.google.cloud.metastore.v1alpha.CreateBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequestOrBuilder.java new file mode 100644 index 000000000000..a309ff1c1434 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateBackupRequestOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface CreateBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.CreateBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString + getBackupIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + boolean hasBackup(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + com.google.cloud.metastore.v1alpha.Backup getBackup(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequest.java new file mode 100644 index 000000000000..e28421d00fb5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequest.java @@ -0,0 +1,1266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for CreateFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.CreateFederationRequest} + */ +public final class CreateFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.CreateFederationRequest) + CreateFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateFederationRequest.newBuilder() to construct. + private CreateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateFederationRequest() { + parent_ = ""; + federationId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.CreateFederationRequest.class, com.google.cloud.metastore.v1alpha.CreateFederationRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEDERATION_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + @java.lang.Override + public java.lang.String getFederationId() { + java.lang.Object ref = federationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + federationId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFederationIdBytes() { + java.lang.Object ref = federationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + federationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEDERATION_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1alpha.Federation 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + @java.lang.Override + public boolean hasFederation() { + return federation_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Federation getFederation() { + return federation_ == null ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder() { + return federation_ == null ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() : federation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, federationId_); + } + if (federation_ != null) { + output.writeMessage(3, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, federationId_); + } + if (federation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.CreateFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.CreateFederationRequest other = (com.google.cloud.metastore.v1alpha.CreateFederationRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFederationId() + .equals(other.getFederationId())) return false; + if (hasFederation() != other.hasFederation()) return false; + if (hasFederation()) { + if (!getFederation() + .equals(other.getFederation())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FEDERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getFederationId().hashCode(); + if (hasFederation()) { + hash = (37 * hash) + FEDERATION_FIELD_NUMBER; + hash = (53 * hash) + getFederation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.CreateFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.CreateFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.CreateFederationRequest) + com.google.cloud.metastore.v1alpha.CreateFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.CreateFederationRequest.class, com.google.cloud.metastore.v1alpha.CreateFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.CreateFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + federationId_ = ""; + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.CreateFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateFederationRequest build() { + com.google.cloud.metastore.v1alpha.CreateFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateFederationRequest buildPartial() { + com.google.cloud.metastore.v1alpha.CreateFederationRequest result = new com.google.cloud.metastore.v1alpha.CreateFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.CreateFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.federationId_ = federationId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.federation_ = federationBuilder_ == null + ? federation_ + : federationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.CreateFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.CreateFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.CreateFederationRequest other) { + if (other == com.google.cloud.metastore.v1alpha.CreateFederationRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFederationId().isEmpty()) { + federationId_ = other.federationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasFederation()) { + mergeFederation(other.getFederation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + federationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getFederationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + public java.lang.String getFederationId() { + java.lang.Object ref = federationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + federationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + public com.google.protobuf.ByteString + getFederationIdBytes() { + java.lang.Object ref = federationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + federationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The federationId to set. + * @return This builder for chaining. + */ + public Builder setFederationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + federationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearFederationId() { + federationId_ = getDefaultInstance().getFederationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for federationId to set. + * @return This builder for chaining. + */ + public Builder setFederationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + federationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.Federation federation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder> federationBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + public boolean hasFederation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + public com.google.cloud.metastore.v1alpha.Federation getFederation() { + if (federationBuilder_ == null) { + return federation_ == null ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() : federation_; + } else { + return federationBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation(com.google.cloud.metastore.v1alpha.Federation value) { + if (federationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + federation_ = value; + } else { + federationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation( + com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { + if (federationBuilder_ == null) { + federation_ = builderForValue.build(); + } else { + federationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFederation(com.google.cloud.metastore.v1alpha.Federation value) { + if (federationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + federation_ != null && + federation_ != com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()) { + getFederationBuilder().mergeFrom(value); + } else { + federation_ = value; + } + } else { + federationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFederation() { + bitField0_ = (bitField0_ & ~0x00000004); + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.Federation.Builder getFederationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFederationFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder() { + if (federationBuilder_ != null) { + return federationBuilder_.getMessageOrBuilder(); + } else { + return federation_ == null ? + com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder> + getFederationFieldBuilder() { + if (federationBuilder_ == null) { + federationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder>( + getFederation(), + getParentForChildren(), + isClean()); + federation_ = null; + } + return federationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.CreateFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.CreateFederationRequest) + private static final com.google.cloud.metastore.v1alpha.CreateFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.CreateFederationRequest(); + } + + public static com.google.cloud.metastore.v1alpha.CreateFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequestOrBuilder.java new file mode 100644 index 000000000000..935d27aeeea6 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateFederationRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public interface CreateFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.CreateFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + java.lang.String getFederationId(); + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + com.google.protobuf.ByteString + getFederationIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + boolean hasFederation(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + com.google.cloud.metastore.v1alpha.Federation getFederation(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequest.java new file mode 100644 index 000000000000..5a6d178a1fbe --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequest.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.CreateMetadataImportRequest} + */ +public final class CreateMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) + CreateMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateMetadataImportRequest.newBuilder() to construct. + private CreateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateMetadataImportRequest() { + parent_ = ""; + metadataImportId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.class, com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_IMPORT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + @java.lang.Override + public java.lang.String getMetadataImportId() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataImportId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataImportIdBytes() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataImportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_IMPORT_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1alpha.MetadataImport 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + @java.lang.Override + public boolean hasMetadataImport() { + return metadataImport_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport() { + return metadataImport_ == null ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder() { + return metadataImport_ == null ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() : metadataImport_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metadataImportId_); + } + if (metadataImport_ != null) { + output.writeMessage(3, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metadataImportId_); + } + if (metadataImport_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest other = (com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getMetadataImportId() + .equals(other.getMetadataImportId())) return false; + if (hasMetadataImport() != other.hasMetadataImport()) return false; + if (hasMetadataImport()) { + if (!getMetadataImport() + .equals(other.getMetadataImport())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + METADATA_IMPORT_ID_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImportId().hashCode(); + if (hasMetadataImport()) { + hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImport().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.CreateMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.class, com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + metadataImportId_ = ""; + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest build() { + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest result = new com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataImportId_ = metadataImportId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadataImport_ = metadataImportBuilder_ == null + ? metadataImport_ + : metadataImportBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMetadataImportId().isEmpty()) { + metadataImportId_ = other.metadataImportId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasMetadataImport()) { + mergeMetadataImport(other.getMetadataImport()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + metadataImportId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getMetadataImportFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + public java.lang.String getMetadataImportId() { + java.lang.Object ref = metadataImportId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataImportId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + public com.google.protobuf.ByteString + getMetadataImportIdBytes() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataImportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The metadataImportId to set. + * @return This builder for chaining. + */ + public Builder setMetadataImportId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataImportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearMetadataImportId() { + metadataImportId_ = getDefaultInstance().getMetadataImportId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for metadataImportId to set. + * @return This builder for chaining. + */ + public Builder setMetadataImportIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataImportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.MetadataImport metadataImport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> metadataImportBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + public boolean hasMetadataImport() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport() { + if (metadataImportBuilder_ == null) { + return metadataImport_ == null ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() : metadataImport_; + } else { + return metadataImportBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport(com.google.cloud.metastore.v1alpha.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataImport_ = value; + } else { + metadataImportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport( + com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { + if (metadataImportBuilder_ == null) { + metadataImport_ = builderForValue.build(); + } else { + metadataImportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeMetadataImport(com.google.cloud.metastore.v1alpha.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadataImport_ != null && + metadataImport_ != com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()) { + getMetadataImportBuilder().mergeFrom(value); + } else { + metadataImport_ = value; + } + } else { + metadataImportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearMetadataImport() { + bitField0_ = (bitField0_ & ~0x00000004); + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.MetadataImport.Builder getMetadataImportBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataImportFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder() { + if (metadataImportBuilder_ != null) { + return metadataImportBuilder_.getMessageOrBuilder(); + } else { + return metadataImport_ == null ? + com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> + getMetadataImportFieldBuilder() { + if (metadataImportBuilder_ == null) { + metadataImportBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder>( + getMetadataImport(), + getParentForChildren(), + isClean()); + metadataImport_ = null; + } + return metadataImportBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) + private static final com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..0e8b6b4d50fb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateMetadataImportRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface CreateMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.CreateMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + java.lang.String getMetadataImportId(); + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + com.google.protobuf.ByteString + getMetadataImportIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + boolean hasMetadataImport(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequest.java new file mode 100644 index 000000000000..b253b7a749e9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequest.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateService][google.cloud.metastore.v1alpha.DataprocMetastore.CreateService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.CreateServiceRequest} + */ +public final class CreateServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.CreateServiceRequest) + CreateServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateServiceRequest.newBuilder() to construct. + private CreateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateServiceRequest() { + parent_ = ""; + serviceId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.CreateServiceRequest.class, com.google.cloud.metastore.v1alpha.CreateServiceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + @java.lang.Override + public java.lang.String getServiceId() { + java.lang.Object ref = serviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceIdBytes() { + java.lang.Object ref = serviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1alpha.Service 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service getService() { + return service_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder() { + return service_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : service_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceId_); + } + if (service_ != null) { + output.writeMessage(3, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceId_); + } + if (service_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.CreateServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.CreateServiceRequest other = (com.google.cloud.metastore.v1alpha.CreateServiceRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getServiceId() + .equals(other.getServiceId())) return false; + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService() + .equals(other.getService())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.CreateServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateService][google.cloud.metastore.v1alpha.DataprocMetastore.CreateService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.CreateServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.CreateServiceRequest) + com.google.cloud.metastore.v1alpha.CreateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.CreateServiceRequest.class, com.google.cloud.metastore.v1alpha.CreateServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.CreateServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + serviceId_ = ""; + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.CreateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateServiceRequest build() { + com.google.cloud.metastore.v1alpha.CreateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateServiceRequest buildPartial() { + com.google.cloud.metastore.v1alpha.CreateServiceRequest result = new com.google.cloud.metastore.v1alpha.CreateServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.CreateServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceId_ = serviceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.service_ = serviceBuilder_ == null + ? service_ + : serviceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.CreateServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.CreateServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.CreateServiceRequest other) { + if (other == com.google.cloud.metastore.v1alpha.CreateServiceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getServiceId().isEmpty()) { + serviceId_ = other.serviceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + serviceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getServiceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + public java.lang.String getServiceId() { + java.lang.Object ref = serviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + public com.google.protobuf.ByteString + getServiceIdBytes() { + java.lang.Object ref = serviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The serviceId to set. + * @return This builder for chaining. + */ + public Builder setServiceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + serviceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearServiceId() { + serviceId_ = getDefaultInstance().getServiceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for serviceId to set. + * @return This builder for chaining. + */ + public Builder setServiceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + serviceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.Service service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder> serviceBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + public boolean hasService() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + public com.google.cloud.metastore.v1alpha.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService(com.google.cloud.metastore.v1alpha.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + } else { + serviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService( + com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeService(com.google.cloud.metastore.v1alpha.Service value) { + if (serviceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + service_ != null && + service_ != com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()) { + getServiceBuilder().mergeFrom(value); + } else { + service_ = value; + } + } else { + serviceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000004); + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.Service.Builder getServiceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null ? + com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder>( + getService(), + getParentForChildren(), + isClean()); + service_ = null; + } + return serviceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.CreateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.CreateServiceRequest) + private static final com.google.cloud.metastore.v1alpha.CreateServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.CreateServiceRequest(); + } + + public static com.google.cloud.metastore.v1alpha.CreateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.CreateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequestOrBuilder.java new file mode 100644 index 000000000000..a963d936711c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/CreateServiceRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface CreateServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.CreateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + java.lang.String getServiceId(); + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + com.google.protobuf.ByteString + getServiceIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + boolean hasService(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + com.google.cloud.metastore.v1alpha.Service getService(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfig.java new file mode 100644 index 000000000000..dd9bd8ec0b8b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfig.java @@ -0,0 +1,505 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Specifies how metastore metadata should be integrated with the Data Catalog
+ * service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DataCatalogConfig} + */ +public final class DataCatalogConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DataCatalogConfig) + DataCatalogConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataCatalogConfig.newBuilder() to construct. + private DataCatalogConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataCatalogConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataCatalogConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DataCatalogConfig.class, com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 2; + private boolean enabled_ = false; + /** + *
+   * Defines whether the metastore metadata should be synced to Data Catalog.
+   * The default value is to disable syncing metastore metadata to Data Catalog.
+   * 
+ * + * bool enabled = 2; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(2, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.DataCatalogConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.DataCatalogConfig other = (com.google.cloud.metastore.v1alpha.DataCatalogConfig) obj; + + if (getEnabled() + != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DataCatalogConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies how metastore metadata should be integrated with the Data Catalog
+   * service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DataCatalogConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DataCatalogConfig) + com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DataCatalogConfig.class, com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.DataCatalogConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataCatalogConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataCatalogConfig build() { + com.google.cloud.metastore.v1alpha.DataCatalogConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataCatalogConfig buildPartial() { + com.google.cloud.metastore.v1alpha.DataCatalogConfig result = new com.google.cloud.metastore.v1alpha.DataCatalogConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.DataCatalogConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.DataCatalogConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.DataCatalogConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DataCatalogConfig other) { + if (other == com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean enabled_ ; + /** + *
+     * Defines whether the metastore metadata should be synced to Data Catalog.
+     * The default value is to disable syncing metastore metadata to Data Catalog.
+     * 
+ * + * bool enabled = 2; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + *
+     * Defines whether the metastore metadata should be synced to Data Catalog.
+     * The default value is to disable syncing metastore metadata to Data Catalog.
+     * 
+ * + * bool enabled = 2; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Defines whether the metastore metadata should be synced to Data Catalog.
+     * The default value is to disable syncing metastore metadata to Data Catalog.
+     * 
+ * + * bool enabled = 2; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DataCatalogConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DataCatalogConfig) + private static final com.google.cloud.metastore.v1alpha.DataCatalogConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DataCatalogConfig(); + } + + public static com.google.cloud.metastore.v1alpha.DataCatalogConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataCatalogConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataCatalogConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfigOrBuilder.java new file mode 100644 index 000000000000..911acbfdebd9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataCatalogConfigOrBuilder.java @@ -0,0 +1,20 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface DataCatalogConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DataCatalogConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Defines whether the metastore metadata should be synced to Data Catalog.
+   * The default value is to disable syncing metastore metadata to Data Catalog.
+   * 
+ * + * bool enabled = 2; + * @return The enabled. + */ + boolean getEnabled(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpec.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpec.java new file mode 100644 index 000000000000..3cd9617adc66 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpec.java @@ -0,0 +1,554 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * The specification of database dump to import from or export to.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DatabaseDumpSpec} + */ +public final class DatabaseDumpSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DatabaseDumpSpec) + DatabaseDumpSpecOrBuilder { +private static final long serialVersionUID = 0L; + // Use DatabaseDumpSpec.newBuilder() to construct. + private DatabaseDumpSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DatabaseDumpSpec() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DatabaseDumpSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.class, com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Builder.class); + } + + /** + *
+   * The type of the database dump.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The type of the database dump is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Database dump is a MySQL dump file.
+     * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + /** + *
+     * Database dump contains Avro files.
+     * 
+ * + * AVRO = 2; + */ + AVRO(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The type of the database dump is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Database dump is a MySQL dump file.
+     * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + /** + *
+     * Database dump contains Avro files.
+     * 
+ * + * AVRO = 2; + */ + public static final int AVRO_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return MYSQL; + case 2: return AVRO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type) + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.DatabaseDumpSpec)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec other = (com.google.cloud.metastore.v1alpha.DatabaseDumpSpec) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DatabaseDumpSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The specification of database dump to import from or export to.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DatabaseDumpSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DatabaseDumpSpec) + com.google.cloud.metastore.v1alpha.DatabaseDumpSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.class, com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec build() { + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec buildPartial() { + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec result = new com.google.cloud.metastore.v1alpha.DatabaseDumpSpec(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.DatabaseDumpSpec) { + return mergeFrom((com.google.cloud.metastore.v1alpha.DatabaseDumpSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DatabaseDumpSpec other) { + if (other == com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DatabaseDumpSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DatabaseDumpSpec) + private static final com.google.cloud.metastore.v1alpha.DatabaseDumpSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DatabaseDumpSpec(); + } + + public static com.google.cloud.metastore.v1alpha.DatabaseDumpSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseDumpSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpecOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpecOrBuilder.java new file mode 100644 index 000000000000..8549264c3b27 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DatabaseDumpSpecOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface DatabaseDumpSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DatabaseDumpSpec) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfig.java new file mode 100644 index 000000000000..06e48d928f90 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfig.java @@ -0,0 +1,763 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Specifies how metastore metadata should be integrated with the Dataplex
+ * service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DataplexConfig} + */ +public final class DataplexConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DataplexConfig) + DataplexConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataplexConfig.newBuilder() to construct. + private DataplexConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataplexConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataplexConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataplexConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetLakeResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataplexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DataplexConfig.class, com.google.cloud.metastore.v1alpha.DataplexConfig.Builder.class); + } + + public static final int LAKE_RESOURCES_FIELD_NUMBER = 1; + private static final class LakeResourcesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.metastore.v1alpha.Lake> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataplexConfig_LakeResourcesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.metastore.v1alpha.Lake.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1alpha.Lake> lakeResources_; + private com.google.protobuf.MapField + internalGetLakeResources() { + if (lakeResources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LakeResourcesDefaultEntryHolder.defaultEntry); + } + return lakeResources_; + } + public int getLakeResourcesCount() { + return internalGetLakeResources().getMap().size(); + } + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + @java.lang.Override + public boolean containsLakeResources( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLakeResources().getMap().containsKey(key); + } + /** + * Use {@link #getLakeResourcesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLakeResources() { + return getLakeResourcesMap(); + } + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + @java.lang.Override + public java.util.Map getLakeResourcesMap() { + return internalGetLakeResources().getMap(); + } + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1alpha.Lake defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLakeResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLakeResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLakeResources(), + LakeResourcesDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetLakeResources().getMap().entrySet()) { + com.google.protobuf.MapEntry + lakeResources__ = LakeResourcesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, lakeResources__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.DataplexConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.DataplexConfig other = (com.google.cloud.metastore.v1alpha.DataplexConfig) obj; + + if (!internalGetLakeResources().equals( + other.internalGetLakeResources())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetLakeResources().getMap().isEmpty()) { + hash = (37 * hash) + LAKE_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + internalGetLakeResources().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DataplexConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DataplexConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies how metastore metadata should be integrated with the Dataplex
+   * service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DataplexConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DataplexConfig) + com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataplexConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetLakeResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableLakeResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataplexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DataplexConfig.class, com.google.cloud.metastore.v1alpha.DataplexConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.DataplexConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableLakeResources().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DataplexConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataplexConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataplexConfig build() { + com.google.cloud.metastore.v1alpha.DataplexConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataplexConfig buildPartial() { + com.google.cloud.metastore.v1alpha.DataplexConfig result = new com.google.cloud.metastore.v1alpha.DataplexConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.DataplexConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lakeResources_ = internalGetLakeResources(); + result.lakeResources_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.DataplexConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.DataplexConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DataplexConfig other) { + if (other == com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance()) return this; + internalGetMutableLakeResources().mergeFrom( + other.internalGetLakeResources()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + lakeResources__ = input.readMessage( + LakeResourcesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLakeResources().getMutableMap().put( + lakeResources__.getKey(), lakeResources__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1alpha.Lake> lakeResources_; + private com.google.protobuf.MapField + internalGetLakeResources() { + if (lakeResources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LakeResourcesDefaultEntryHolder.defaultEntry); + } + return lakeResources_; + } + private com.google.protobuf.MapField + internalGetMutableLakeResources() { + if (lakeResources_ == null) { + lakeResources_ = com.google.protobuf.MapField.newMapField( + LakeResourcesDefaultEntryHolder.defaultEntry); + } + if (!lakeResources_.isMutable()) { + lakeResources_ = lakeResources_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return lakeResources_; + } + public int getLakeResourcesCount() { + return internalGetLakeResources().getMap().size(); + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + @java.lang.Override + public boolean containsLakeResources( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLakeResources().getMap().containsKey(key); + } + /** + * Use {@link #getLakeResourcesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLakeResources() { + return getLakeResourcesMap(); + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + @java.lang.Override + public java.util.Map getLakeResourcesMap() { + return internalGetLakeResources().getMap(); + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1alpha.Lake defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLakeResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLakeResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLakeResources() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableLakeResources().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + public Builder removeLakeResources( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLakeResources().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLakeResources() { + bitField0_ |= 0x00000001; + return internalGetMutableLakeResources().getMutableMap(); + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + public Builder putLakeResources( + java.lang.String key, + com.google.cloud.metastore.v1alpha.Lake value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLakeResources().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + public Builder putAllLakeResources( + java.util.Map values) { + internalGetMutableLakeResources().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DataplexConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DataplexConfig) + private static final com.google.cloud.metastore.v1alpha.DataplexConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DataplexConfig(); + } + + public static com.google.cloud.metastore.v1alpha.DataplexConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataplexConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataplexConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfigOrBuilder.java new file mode 100644 index 000000000000..ac4b3018b2c7 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DataplexConfigOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface DataplexConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DataplexConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + int getLakeResourcesCount(); + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + boolean containsLakeResources( + java.lang.String key); + /** + * Use {@link #getLakeResourcesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLakeResources(); + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + java.util.Map + getLakeResourcesMap(); + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + /* nullable */ +com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1alpha.Lake defaultValue); + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.Lake> lake_resources = 1; + */ + com.google.cloud.metastore.v1alpha.Lake getLakeResourcesOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequest.java new file mode 100644 index 000000000000..950b3d1ed1f8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequest.java @@ -0,0 +1,823 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteBackupRequest} + */ +public final class DeleteBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DeleteBackupRequest) + DeleteBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteBackupRequest.newBuilder() to construct. + private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteBackupRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DeleteBackupRequest.class, com.google.cloud.metastore.v1alpha.DeleteBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.DeleteBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.DeleteBackupRequest other = (com.google.cloud.metastore.v1alpha.DeleteBackupRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DeleteBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DeleteBackupRequest) + com.google.cloud.metastore.v1alpha.DeleteBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DeleteBackupRequest.class, com.google.cloud.metastore.v1alpha.DeleteBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.DeleteBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.DeleteBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteBackupRequest build() { + com.google.cloud.metastore.v1alpha.DeleteBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteBackupRequest buildPartial() { + com.google.cloud.metastore.v1alpha.DeleteBackupRequest result = new com.google.cloud.metastore.v1alpha.DeleteBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.DeleteBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.DeleteBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.DeleteBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DeleteBackupRequest other) { + if (other == com.google.cloud.metastore.v1alpha.DeleteBackupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DeleteBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DeleteBackupRequest) + private static final com.google.cloud.metastore.v1alpha.DeleteBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DeleteBackupRequest(); + } + + public static com.google.cloud.metastore.v1alpha.DeleteBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequestOrBuilder.java new file mode 100644 index 000000000000..93531a4e66f9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteBackupRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface DeleteBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DeleteBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequest.java new file mode 100644 index 000000000000..2111a9c7e3cf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequest.java @@ -0,0 +1,821 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for DeleteFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteFederationRequest} + */ +public final class DeleteFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DeleteFederationRequest) + DeleteFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteFederationRequest.newBuilder() to construct. + private DeleteFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteFederationRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DeleteFederationRequest.class, com.google.cloud.metastore.v1alpha.DeleteFederationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.DeleteFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.DeleteFederationRequest other = (com.google.cloud.metastore.v1alpha.DeleteFederationRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DeleteFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DeleteFederationRequest) + com.google.cloud.metastore.v1alpha.DeleteFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DeleteFederationRequest.class, com.google.cloud.metastore.v1alpha.DeleteFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.DeleteFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.DeleteFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteFederationRequest build() { + com.google.cloud.metastore.v1alpha.DeleteFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteFederationRequest buildPartial() { + com.google.cloud.metastore.v1alpha.DeleteFederationRequest result = new com.google.cloud.metastore.v1alpha.DeleteFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.DeleteFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.DeleteFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.DeleteFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DeleteFederationRequest other) { + if (other == com.google.cloud.metastore.v1alpha.DeleteFederationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DeleteFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DeleteFederationRequest) + private static final com.google.cloud.metastore.v1alpha.DeleteFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DeleteFederationRequest(); + } + + public static com.google.cloud.metastore.v1alpha.DeleteFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequestOrBuilder.java new file mode 100644 index 000000000000..22ba13079fd0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteFederationRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public interface DeleteFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DeleteFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequest.java new file mode 100644 index 000000000000..27338a052a68 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequest.java @@ -0,0 +1,823 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.DeleteService][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteServiceRequest} + */ +public final class DeleteServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.DeleteServiceRequest) + DeleteServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteServiceRequest.newBuilder() to construct. + private DeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteServiceRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DeleteServiceRequest.class, com.google.cloud.metastore.v1alpha.DeleteServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.DeleteServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.DeleteServiceRequest other = (com.google.cloud.metastore.v1alpha.DeleteServiceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.DeleteServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.DeleteService][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.DeleteServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.DeleteServiceRequest) + com.google.cloud.metastore.v1alpha.DeleteServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.DeleteServiceRequest.class, com.google.cloud.metastore.v1alpha.DeleteServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.DeleteServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.DeleteServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteServiceRequest build() { + com.google.cloud.metastore.v1alpha.DeleteServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteServiceRequest buildPartial() { + com.google.cloud.metastore.v1alpha.DeleteServiceRequest result = new com.google.cloud.metastore.v1alpha.DeleteServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.DeleteServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.DeleteServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.DeleteServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.DeleteServiceRequest other) { + if (other == com.google.cloud.metastore.v1alpha.DeleteServiceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.DeleteServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.DeleteServiceRequest) + private static final com.google.cloud.metastore.v1alpha.DeleteServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.DeleteServiceRequest(); + } + + public static com.google.cloud.metastore.v1alpha.DeleteServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DeleteServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequestOrBuilder.java new file mode 100644 index 000000000000..7f9687d802cc --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/DeleteServiceRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface DeleteServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.DeleteServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfig.java new file mode 100644 index 000000000000..47bc3a959fca --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfig.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Encryption settings for the service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.EncryptionConfig} + */ +public final class EncryptionConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.EncryptionConfig) + EncryptionConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use EncryptionConfig.newBuilder() to construct. + private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EncryptionConfig() { + kmsKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EncryptionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.EncryptionConfig.class, com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder.class); + } + + public static final int KMS_KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } + } + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.EncryptionConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.EncryptionConfig other = (com.google.cloud.metastore.v1alpha.EncryptionConfig) obj; + + if (!getKmsKey() + .equals(other.getKmsKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.EncryptionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Encryption settings for the service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.EncryptionConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.EncryptionConfig) + com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.EncryptionConfig.class, com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.EncryptionConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.EncryptionConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.EncryptionConfig build() { + com.google.cloud.metastore.v1alpha.EncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.EncryptionConfig buildPartial() { + com.google.cloud.metastore.v1alpha.EncryptionConfig result = new com.google.cloud.metastore.v1alpha.EncryptionConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.EncryptionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kmsKey_ = kmsKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.EncryptionConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.EncryptionConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.EncryptionConfig other) { + if (other == com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance()) return this; + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + kmsKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object kmsKey_ = ""; + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString + getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.EncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.EncryptionConfig) + private static final com.google.cloud.metastore.v1alpha.EncryptionConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.EncryptionConfig(); + } + + public static com.google.cloud.metastore.v1alpha.EncryptionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EncryptionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.EncryptionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfigOrBuilder.java new file mode 100644 index 000000000000..4a790638797d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/EncryptionConfigOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface EncryptionConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString + getKmsKeyBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequest.java new file mode 100644 index 000000000000..de79b9bbb1e9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequest.java @@ -0,0 +1,1253 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ExportMetadataRequest} + */ +public final class ExportMetadataRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ExportMetadataRequest) + ExportMetadataRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExportMetadataRequest.newBuilder() to construct. + private ExportMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExportMetadataRequest() { + service_ = ""; + requestId_ = ""; + databaseDumpType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExportMetadataRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ExportMetadataRequest.class, com.google.cloud.metastore.v1alpha.ExportMetadataRequest.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DESTINATION_GCS_FOLDER(2), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 2: return DESTINATION_GCS_FOLDER; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int DESTINATION_GCS_FOLDER_FIELD_NUMBER = 2; + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + public boolean hasDestinationGcsFolder() { + return destinationCase_ == 2; + } + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + public java.lang.String getDestinationGcsFolder() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } + } + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + public com.google.protobuf.ByteString + getDestinationGcsFolderBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 4; + private int databaseDumpType_ = 0; + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (destinationCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, databaseDumpType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (destinationCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, databaseDumpType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ExportMetadataRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ExportMetadataRequest other = (com.google.cloud.metastore.v1alpha.ExportMetadataRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (databaseDumpType_ != other.databaseDumpType_) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 2: + if (!getDestinationGcsFolder() + .equals(other.getDestinationGcsFolder())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseDumpType_; + switch (destinationCase_) { + case 2: + hash = (37 * hash) + DESTINATION_GCS_FOLDER_FIELD_NUMBER; + hash = (53 * hash) + getDestinationGcsFolder().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ExportMetadataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ExportMetadataRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ExportMetadataRequest) + com.google.cloud.metastore.v1alpha.ExportMetadataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ExportMetadataRequest.class, com.google.cloud.metastore.v1alpha.ExportMetadataRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ExportMetadataRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + requestId_ = ""; + databaseDumpType_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ExportMetadataRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ExportMetadataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ExportMetadataRequest build() { + com.google.cloud.metastore.v1alpha.ExportMetadataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ExportMetadataRequest buildPartial() { + com.google.cloud.metastore.v1alpha.ExportMetadataRequest result = new com.google.cloud.metastore.v1alpha.ExportMetadataRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ExportMetadataRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.databaseDumpType_ = databaseDumpType_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.ExportMetadataRequest result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ExportMetadataRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ExportMetadataRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ExportMetadataRequest other) { + if (other == com.google.cloud.metastore.v1alpha.ExportMetadataRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.databaseDumpType_ != 0) { + setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); + } + switch (other.getDestinationCase()) { + case DESTINATION_GCS_FOLDER: { + destinationCase_ = 2; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 2; + destination_ = s; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + databaseDumpType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + @java.lang.Override + public boolean hasDestinationGcsFolder() { + return destinationCase_ == 2; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + @java.lang.Override + public java.lang.String getDestinationGcsFolder() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationGcsFolderBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @param value The destinationGcsFolder to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsFolder( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return This builder for chaining. + */ + public Builder clearDestinationGcsFolder() { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @param value The bytes for destinationGcsFolder to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsFolderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int databaseDumpType_ = 0; + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpTypeValue(int value) { + databaseDumpType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpType(com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + databaseDumpType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearDatabaseDumpType() { + bitField0_ = (bitField0_ & ~0x00000008); + databaseDumpType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ExportMetadataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ExportMetadataRequest) + private static final com.google.cloud.metastore.v1alpha.ExportMetadataRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ExportMetadataRequest(); + } + + public static com.google.cloud.metastore.v1alpha.ExportMetadataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportMetadataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ExportMetadataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequestOrBuilder.java new file mode 100644 index 000000000000..6f3e302fd530 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ExportMetadataRequestOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ExportMetadataRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ExportMetadataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + boolean hasDestinationGcsFolder(); + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + java.lang.String getDestinationGcsFolder(); + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + com.google.protobuf.ByteString + getDestinationGcsFolderBytes(); + + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); + + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + int getDatabaseDumpTypeValue(); + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType(); + + public com.google.cloud.metastore.v1alpha.ExportMetadataRequest.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Federation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Federation.java new file mode 100644 index 000000000000..d52860348526 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Federation.java @@ -0,0 +1,2724 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Represents a federation of multiple backend metastores.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Federation} + */ +public final class Federation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Federation) + FederationOrBuilder { +private static final long serialVersionUID = 0L; + // Use Federation.newBuilder() to construct. + private Federation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Federation() { + name_ = ""; + version_ = ""; + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + uid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Federation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_Federation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 6: + return internalGetBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_Federation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Federation.class, com.google.cloud.metastore.v1alpha.Federation.Builder.class); + } + + /** + *
+   * The current state of the federation.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.Federation.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metastore federation is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metastore federation is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The metastore federation is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + *
+     * The metastore federation is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + *
+     * The metastore federation is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + *
+     * The metastore federation has encountered an error and cannot be used. The
+     * metastore federation should be deleted.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metastore federation is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metastore federation is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The metastore federation is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + *
+     * The metastore federation is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + *
+     * The metastore federation is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + *
+     * The metastore federation has encountered an error and cannot be used. The
+     * metastore federation should be deleted.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return ACTIVE; + case 3: return UPDATING; + case 4: return DELETING; + case 5: return ERROR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.Federation.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Federation.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int VERSION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKEND_METASTORES_FIELD_NUMBER = 6; + private static final class BackendMetastoresDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.metastore.v1alpha.BackendMetastore.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> backendMetastores_; + private com.google.protobuf.MapField + internalGetBackendMetastores() { + if (backendMetastores_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + return backendMetastores_; + } + public int getBackendMetastoresCount() { + return internalGetBackendMetastores().getMap().size(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public boolean containsBackendMetastores( + int key) { + + return internalGetBackendMetastores().getMap().containsKey(key); + } + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBackendMetastores() { + return getBackendMetastoresMap(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public java.util.Map getBackendMetastoresMap() { + return internalGetBackendMetastores().getMap(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1alpha.BackendMetastore defaultValue) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrThrow( + int key) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_ = 0; + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Federation.State getState() { + com.google.cloud.metastore.v1alpha.Federation.State result = com.google.cloud.metastore.v1alpha.Federation.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.Federation.State.UNRECOGNIZED : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object stateMessage_ = ""; + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetBackendMetastores(), + BackendMetastoresDefaultEntryHolder.defaultEntry, + 6); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, endpointUri_); + } + if (state_ != com.google.cloud.metastore.v1alpha.Federation.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, uid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); + } + for (java.util.Map.Entry entry + : internalGetBackendMetastores().getMap().entrySet()) { + com.google.protobuf.MapEntry + backendMetastores__ = BackendMetastoresDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, backendMetastores__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, endpointUri_); + } + if (state_ != com.google.cloud.metastore.v1alpha.Federation.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, uid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.Federation)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.Federation other = (com.google.cloud.metastore.v1alpha.Federation) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetBackendMetastores().equals( + other.internalGetBackendMetastores())) return false; + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (state_ != other.state_) return false; + if (!getStateMessage() + .equals(other.getStateMessage())) return false; + if (!getUid() + .equals(other.getUid())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetBackendMetastores().getMap().isEmpty()) { + hash = (37 * hash) + BACKEND_METASTORES_FIELD_NUMBER; + hash = (53 * hash) + internalGetBackendMetastores().hashCode(); + } + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.Federation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Federation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Federation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Federation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Federation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a federation of multiple backend metastores.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Federation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Federation) + com.google.cloud.metastore.v1alpha.FederationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_Federation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 6: + return internalGetBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 6: + return internalGetMutableBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_Federation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Federation.class, com.google.cloud.metastore.v1alpha.Federation.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.Federation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + version_ = ""; + internalGetMutableBackendMetastores().clear(); + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + uid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_Federation_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Federation getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Federation build() { + com.google.cloud.metastore.v1alpha.Federation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Federation buildPartial() { + com.google.cloud.metastore.v1alpha.Federation result = new com.google.cloud.metastore.v1alpha.Federation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.Federation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.backendMetastores_ = internalGetBackendMetastores(); + result.backendMetastores_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endpointUri_ = endpointUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.stateMessage_ = stateMessage_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.uid_ = uid_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.Federation) { + return mergeFrom((com.google.cloud.metastore.v1alpha.Federation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Federation other) { + if (other == com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000010; + onChanged(); + } + internalGetMutableBackendMetastores().mergeFrom( + other.internalGetBackendMetastores()); + bitField0_ |= 0x00000020; + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + com.google.protobuf.MapEntry + backendMetastores__ = input.readMessage( + BackendMetastoresDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableBackendMetastores().getMutableMap().put( + backendMetastores__.getKey(), backendMetastores__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + state_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: { + stateMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, com.google.cloud.metastore.v1alpha.BackendMetastore> backendMetastores_; + private com.google.protobuf.MapField + internalGetBackendMetastores() { + if (backendMetastores_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + return backendMetastores_; + } + private com.google.protobuf.MapField + internalGetMutableBackendMetastores() { + if (backendMetastores_ == null) { + backendMetastores_ = com.google.protobuf.MapField.newMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + if (!backendMetastores_.isMutable()) { + backendMetastores_ = backendMetastores_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return backendMetastores_; + } + public int getBackendMetastoresCount() { + return internalGetBackendMetastores().getMap().size(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public boolean containsBackendMetastores( + int key) { + + return internalGetBackendMetastores().getMap().containsKey(key); + } + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBackendMetastores() { + return getBackendMetastoresMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public java.util.Map getBackendMetastoresMap() { + return internalGetBackendMetastores().getMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1alpha.BackendMetastore defaultValue) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrThrow( + int key) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearBackendMetastores() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableBackendMetastores().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + public Builder removeBackendMetastores( + int key) { + + internalGetMutableBackendMetastores().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableBackendMetastores() { + bitField0_ |= 0x00000020; + return internalGetMutableBackendMetastores().getMutableMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + public Builder putBackendMetastores( + int key, + com.google.cloud.metastore.v1alpha.BackendMetastore value) { + + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableBackendMetastores().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + public Builder putAllBackendMetastores( + java.util.Map values) { + internalGetMutableBackendMetastores().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Federation.State getState() { + com.google.cloud.metastore.v1alpha.Federation.State result = com.google.cloud.metastore.v1alpha.Federation.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.Federation.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1alpha.Federation.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000080); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + stateMessage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + stateMessage_ = getDefaultInstance().getStateMessage(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + stateMessage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Federation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Federation) + private static final com.google.cloud.metastore.v1alpha.Federation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Federation(); + } + + public static com.google.cloud.metastore.v1alpha.Federation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Federation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Federation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationName.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationName.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationOrBuilder.java new file mode 100644 index 000000000000..8aa89ee7c44c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/FederationOrBuilder.java @@ -0,0 +1,325 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public interface FederationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Federation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + int getBackendMetastoresCount(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + boolean containsBackendMetastores( + int key); + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getBackendMetastores(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + java.util.Map + getBackendMetastoresMap(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + /* nullable */ +com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1alpha.BackendMetastore defaultValue); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1alpha.BackendMetastore> backend_metastores = 6; + */ + com.google.cloud.metastore.v1alpha.BackendMetastore getBackendMetastoresOrThrow( + int key); + + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1alpha.Federation.State getState(); + + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString + getStateMessageBytes(); + + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + java.lang.String getUid(); + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequest.java new file mode 100644 index 000000000000..bd9f02d3debb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.GetBackupRequest} + */ +public final class GetBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.GetBackupRequest) + GetBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetBackupRequest.newBuilder() to construct. + private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBackupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.GetBackupRequest.class, com.google.cloud.metastore.v1alpha.GetBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.GetBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.GetBackupRequest other = (com.google.cloud.metastore.v1alpha.GetBackupRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.GetBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.GetBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.GetBackupRequest) + com.google.cloud.metastore.v1alpha.GetBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.GetBackupRequest.class, com.google.cloud.metastore.v1alpha.GetBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.GetBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.GetBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetBackupRequest build() { + com.google.cloud.metastore.v1alpha.GetBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetBackupRequest buildPartial() { + com.google.cloud.metastore.v1alpha.GetBackupRequest result = new com.google.cloud.metastore.v1alpha.GetBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.GetBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.GetBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.GetBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.GetBackupRequest other) { + if (other == com.google.cloud.metastore.v1alpha.GetBackupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.GetBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.GetBackupRequest) + private static final com.google.cloud.metastore.v1alpha.GetBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.GetBackupRequest(); + } + + public static com.google.cloud.metastore.v1alpha.GetBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequestOrBuilder.java new file mode 100644 index 000000000000..c4dd50554d09 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetBackupRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface GetBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.GetBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequest.java new file mode 100644 index 000000000000..988bc7d4a91b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequest.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for GetFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.GetFederationRequest} + */ +public final class GetFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.GetFederationRequest) + GetFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetFederationRequest.newBuilder() to construct. + private GetFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetFederationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.GetFederationRequest.class, com.google.cloud.metastore.v1alpha.GetFederationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.GetFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.GetFederationRequest other = (com.google.cloud.metastore.v1alpha.GetFederationRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.GetFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.GetFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.GetFederationRequest) + com.google.cloud.metastore.v1alpha.GetFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.GetFederationRequest.class, com.google.cloud.metastore.v1alpha.GetFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.GetFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.GetFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetFederationRequest build() { + com.google.cloud.metastore.v1alpha.GetFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetFederationRequest buildPartial() { + com.google.cloud.metastore.v1alpha.GetFederationRequest result = new com.google.cloud.metastore.v1alpha.GetFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.GetFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.GetFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.GetFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.GetFederationRequest other) { + if (other == com.google.cloud.metastore.v1alpha.GetFederationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.GetFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.GetFederationRequest) + private static final com.google.cloud.metastore.v1alpha.GetFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.GetFederationRequest(); + } + + public static com.google.cloud.metastore.v1alpha.GetFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequestOrBuilder.java new file mode 100644 index 000000000000..90b72130568d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetFederationRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public interface GetFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.GetFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequest.java new file mode 100644 index 000000000000..a250a5d8e0fd --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.GetMetadataImportRequest} + */ +public final class GetMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.GetMetadataImportRequest) + GetMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetMetadataImportRequest.newBuilder() to construct. + private GetMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetMetadataImportRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.class, com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.GetMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.GetMetadataImportRequest other = (com.google.cloud.metastore.v1alpha.GetMetadataImportRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.GetMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.GetMetadataImportRequest) + com.google.cloud.metastore.v1alpha.GetMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.class, com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetMetadataImportRequest build() { + com.google.cloud.metastore.v1alpha.GetMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1alpha.GetMetadataImportRequest result = new com.google.cloud.metastore.v1alpha.GetMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.GetMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.GetMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.GetMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1alpha.GetMetadataImportRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.GetMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.GetMetadataImportRequest) + private static final com.google.cloud.metastore.v1alpha.GetMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.GetMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1alpha.GetMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..c1018f626cf5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetMetadataImportRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface GetMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.GetMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequest.java new file mode 100644 index 000000000000..c8f15bae2a16 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetService][google.cloud.metastore.v1alpha.DataprocMetastore.GetService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.GetServiceRequest} + */ +public final class GetServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.GetServiceRequest) + GetServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetServiceRequest.newBuilder() to construct. + private GetServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetServiceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.GetServiceRequest.class, com.google.cloud.metastore.v1alpha.GetServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.GetServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.GetServiceRequest other = (com.google.cloud.metastore.v1alpha.GetServiceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.GetServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetService][google.cloud.metastore.v1alpha.DataprocMetastore.GetService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.GetServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.GetServiceRequest) + com.google.cloud.metastore.v1alpha.GetServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.GetServiceRequest.class, com.google.cloud.metastore.v1alpha.GetServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.GetServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.GetServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetServiceRequest build() { + com.google.cloud.metastore.v1alpha.GetServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetServiceRequest buildPartial() { + com.google.cloud.metastore.v1alpha.GetServiceRequest result = new com.google.cloud.metastore.v1alpha.GetServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.GetServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.GetServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.GetServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.GetServiceRequest other) { + if (other == com.google.cloud.metastore.v1alpha.GetServiceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object 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}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.GetServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.GetServiceRequest) + private static final com.google.cloud.metastore.v1alpha.GetServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.GetServiceRequest(); + } + + public static com.google.cloud.metastore.v1alpha.GetServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.GetServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequestOrBuilder.java new file mode 100644 index 000000000000..8a1b2d38ab40 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/GetServiceRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface GetServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.GetServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfig.java new file mode 100644 index 000000000000..4964b2614ed4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfig.java @@ -0,0 +1,1872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Specifies configuration information specific to running Hive metastore
+ * software as the metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.HiveMetastoreConfig} + */ +public final class HiveMetastoreConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.HiveMetastoreConfig) + HiveMetastoreConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use HiveMetastoreConfig.newBuilder() to construct. + private HiveMetastoreConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HiveMetastoreConfig() { + version_ = ""; + endpointProtocol_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HiveMetastoreConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + case 5: + return internalGetAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.class, com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder.class); + } + + /** + *
+   * Protocols available for serving the metastore service endpoint.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol} + */ + public enum EndpointProtocol + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The protocol is not set.
+     * 
+ * + * ENDPOINT_PROTOCOL_UNSPECIFIED = 0; + */ + ENDPOINT_PROTOCOL_UNSPECIFIED(0), + /** + *
+     * Use the legacy Apache Thrift protocol for the metastore service endpoint.
+     * 
+ * + * THRIFT = 1; + */ + THRIFT(1), + /** + *
+     * Use the modernized gRPC protocol for the metastore service endpoint.
+     * 
+ * + * GRPC = 2; + */ + GRPC(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The protocol is not set.
+     * 
+ * + * ENDPOINT_PROTOCOL_UNSPECIFIED = 0; + */ + public static final int ENDPOINT_PROTOCOL_UNSPECIFIED_VALUE = 0; + /** + *
+     * Use the legacy Apache Thrift protocol for the metastore service endpoint.
+     * 
+ * + * THRIFT = 1; + */ + public static final int THRIFT_VALUE = 1; + /** + *
+     * Use the modernized gRPC protocol for the metastore service endpoint.
+     * 
+ * + * GRPC = 2; + */ + public static final int GRPC_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EndpointProtocol valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EndpointProtocol forNumber(int value) { + switch (value) { + case 0: return ENDPOINT_PROTOCOL_UNSPECIFIED; + case 1: return THRIFT; + case 2: return GRPC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + EndpointProtocol> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EndpointProtocol findValueByNumber(int number) { + return EndpointProtocol.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final EndpointProtocol[] VALUES = values(); + + public static EndpointProtocol valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EndpointProtocol(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol) + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; + private static final class ConfigOverridesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_ConfigOverridesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int KERBEROS_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1alpha.KerberosConfig kerberosConfig_; + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + @java.lang.Override + public boolean hasKerberosConfig() { + return kerberosConfig_ != null; + } + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.KerberosConfig getKerberosConfig() { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + + public static final int ENDPOINT_PROTOCOL_FIELD_NUMBER = 4; + private int endpointProtocol_ = 0; + /** + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The enum numeric value on the wire for endpointProtocol. + */ + @java.lang.Override public int getEndpointProtocolValue() { + return endpointProtocol_; + } + /** + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The endpointProtocol. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol() { + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol result = com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.forNumber(endpointProtocol_); + return result == null ? com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED : result; + } + + public static final int AUXILIARY_VERSIONS_FIELD_NUMBER = 5; + private static final class AuxiliaryVersionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliaryVersions_; + private com.google.protobuf.MapField + internalGetAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + return auxiliaryVersions_; + } + public int getAuxiliaryVersionsCount() { + return internalGetAuxiliaryVersions().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public boolean containsAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAuxiliaryVersions().getMap().containsKey(key); + } + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAuxiliaryVersions() { + return getAuxiliaryVersionsMap(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public java.util.Map getAuxiliaryVersionsMap() { + return internalGetAuxiliaryVersions().getMap(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetConfigOverrides(), + ConfigOverridesDefaultEntryHolder.defaultEntry, + 2); + if (kerberosConfig_ != null) { + output.writeMessage(3, getKerberosConfig()); + } + if (endpointProtocol_ != com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.ENDPOINT_PROTOCOL_UNSPECIFIED.getNumber()) { + output.writeEnum(4, endpointProtocol_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAuxiliaryVersions(), + AuxiliaryVersionsDefaultEntryHolder.defaultEntry, + 5); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + for (java.util.Map.Entry entry + : internalGetConfigOverrides().getMap().entrySet()) { + com.google.protobuf.MapEntry + configOverrides__ = ConfigOverridesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, configOverrides__); + } + if (kerberosConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getKerberosConfig()); + } + if (endpointProtocol_ != com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.ENDPOINT_PROTOCOL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, endpointProtocol_); + } + for (java.util.Map.Entry entry + : internalGetAuxiliaryVersions().getMap().entrySet()) { + com.google.protobuf.MapEntry + auxiliaryVersions__ = AuxiliaryVersionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, auxiliaryVersions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.HiveMetastoreConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig other = (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetConfigOverrides().equals( + other.internalGetConfigOverrides())) return false; + if (hasKerberosConfig() != other.hasKerberosConfig()) return false; + if (hasKerberosConfig()) { + if (!getKerberosConfig() + .equals(other.getKerberosConfig())) return false; + } + if (endpointProtocol_ != other.endpointProtocol_) return false; + if (!internalGetAuxiliaryVersions().equals( + other.internalGetAuxiliaryVersions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetConfigOverrides().getMap().isEmpty()) { + hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + internalGetConfigOverrides().hashCode(); + } + if (hasKerberosConfig()) { + hash = (37 * hash) + KERBEROS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getKerberosConfig().hashCode(); + } + hash = (37 * hash) + ENDPOINT_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + endpointProtocol_; + if (!internalGetAuxiliaryVersions().getMap().isEmpty()) { + hash = (37 * hash) + AUXILIARY_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAuxiliaryVersions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.HiveMetastoreConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.HiveMetastoreConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.HiveMetastoreConfig) + com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + case 5: + return internalGetAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableConfigOverrides(); + case 5: + return internalGetMutableAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.class, com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + internalGetMutableConfigOverrides().clear(); + kerberosConfig_ = null; + if (kerberosConfigBuilder_ != null) { + kerberosConfigBuilder_.dispose(); + kerberosConfigBuilder_ = null; + } + endpointProtocol_ = 0; + internalGetMutableAuxiliaryVersions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig build() { + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig buildPartial() { + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig result = new com.google.cloud.metastore.v1alpha.HiveMetastoreConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.HiveMetastoreConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configOverrides_ = internalGetConfigOverrides(); + result.configOverrides_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kerberosConfig_ = kerberosConfigBuilder_ == null + ? kerberosConfig_ + : kerberosConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endpointProtocol_ = endpointProtocol_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.auxiliaryVersions_ = internalGetAuxiliaryVersions(); + result.auxiliaryVersions_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.HiveMetastoreConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.HiveMetastoreConfig other) { + if (other == com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableConfigOverrides().mergeFrom( + other.internalGetConfigOverrides()); + bitField0_ |= 0x00000002; + if (other.hasKerberosConfig()) { + mergeKerberosConfig(other.getKerberosConfig()); + } + if (other.endpointProtocol_ != 0) { + setEndpointProtocolValue(other.getEndpointProtocolValue()); + } + internalGetMutableAuxiliaryVersions().mergeFrom( + other.internalGetAuxiliaryVersions()); + bitField0_ |= 0x00000010; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + configOverrides__ = input.readMessage( + ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableConfigOverrides().getMutableMap().put( + configOverrides__.getKey(), configOverrides__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getKerberosConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + endpointProtocol_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + com.google.protobuf.MapEntry + auxiliaryVersions__ = input.readMessage( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableAuxiliaryVersions().getMutableMap().put( + auxiliaryVersions__.getKey(), auxiliaryVersions__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + private com.google.protobuf.MapField + internalGetMutableConfigOverrides() { + if (configOverrides_ == null) { + configOverrides_ = com.google.protobuf.MapField.newMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + if (!configOverrides_.isMutable()) { + configOverrides_ = configOverrides_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearConfigOverrides() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableConfigOverrides().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder removeConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableConfigOverrides().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableConfigOverrides() { + bitField0_ |= 0x00000002; + return internalGetMutableConfigOverrides().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putConfigOverrides( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableConfigOverrides().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putAllConfigOverrides( + java.util.Map values) { + internalGetMutableConfigOverrides().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.cloud.metastore.v1alpha.KerberosConfig kerberosConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.KerberosConfig, com.google.cloud.metastore.v1alpha.KerberosConfig.Builder, com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder> kerberosConfigBuilder_; + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + public boolean hasKerberosConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + public com.google.cloud.metastore.v1alpha.KerberosConfig getKerberosConfig() { + if (kerberosConfigBuilder_ == null) { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } else { + return kerberosConfigBuilder_.getMessage(); + } + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + public Builder setKerberosConfig(com.google.cloud.metastore.v1alpha.KerberosConfig value) { + if (kerberosConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kerberosConfig_ = value; + } else { + kerberosConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + public Builder setKerberosConfig( + com.google.cloud.metastore.v1alpha.KerberosConfig.Builder builderForValue) { + if (kerberosConfigBuilder_ == null) { + kerberosConfig_ = builderForValue.build(); + } else { + kerberosConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + public Builder mergeKerberosConfig(com.google.cloud.metastore.v1alpha.KerberosConfig value) { + if (kerberosConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + kerberosConfig_ != null && + kerberosConfig_ != com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance()) { + getKerberosConfigBuilder().mergeFrom(value); + } else { + kerberosConfig_ = value; + } + } else { + kerberosConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + public Builder clearKerberosConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + kerberosConfig_ = null; + if (kerberosConfigBuilder_ != null) { + kerberosConfigBuilder_.dispose(); + kerberosConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + public com.google.cloud.metastore.v1alpha.KerberosConfig.Builder getKerberosConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getKerberosConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + public com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { + if (kerberosConfigBuilder_ != null) { + return kerberosConfigBuilder_.getMessageOrBuilder(); + } else { + return kerberosConfig_ == null ? + com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.KerberosConfig, com.google.cloud.metastore.v1alpha.KerberosConfig.Builder, com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder> + getKerberosConfigFieldBuilder() { + if (kerberosConfigBuilder_ == null) { + kerberosConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.KerberosConfig, com.google.cloud.metastore.v1alpha.KerberosConfig.Builder, com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder>( + getKerberosConfig(), + getParentForChildren(), + isClean()); + kerberosConfig_ = null; + } + return kerberosConfigBuilder_; + } + + private int endpointProtocol_ = 0; + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The enum numeric value on the wire for endpointProtocol. + */ + @java.lang.Override public int getEndpointProtocolValue() { + return endpointProtocol_; + } + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @param value The enum numeric value on the wire for endpointProtocol to set. + * @return This builder for chaining. + */ + public Builder setEndpointProtocolValue(int value) { + endpointProtocol_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The endpointProtocol. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol() { + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol result = com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.forNumber(endpointProtocol_); + return result == null ? com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED : result; + } + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @param value The endpointProtocol to set. + * @return This builder for chaining. + */ + public Builder setEndpointProtocol(com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + endpointProtocol_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return This builder for chaining. + */ + public Builder clearEndpointProtocol() { + bitField0_ = (bitField0_ & ~0x00000008); + endpointProtocol_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliaryVersions_; + private com.google.protobuf.MapField + internalGetAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + return auxiliaryVersions_; + } + private com.google.protobuf.MapField + internalGetMutableAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + auxiliaryVersions_ = com.google.protobuf.MapField.newMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + if (!auxiliaryVersions_.isMutable()) { + auxiliaryVersions_ = auxiliaryVersions_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return auxiliaryVersions_; + } + public int getAuxiliaryVersionsCount() { + return internalGetAuxiliaryVersions().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public boolean containsAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAuxiliaryVersions().getMap().containsKey(key); + } + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAuxiliaryVersions() { + return getAuxiliaryVersionsMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public java.util.Map getAuxiliaryVersionsMap() { + return internalGetAuxiliaryVersions().getMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearAuxiliaryVersions() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAuxiliaryVersions().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder removeAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableAuxiliaryVersions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAuxiliaryVersions() { + bitField0_ |= 0x00000010; + return internalGetMutableAuxiliaryVersions().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder putAuxiliaryVersions( + java.lang.String key, + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableAuxiliaryVersions().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder putAllAuxiliaryVersions( + java.util.Map values) { + internalGetMutableAuxiliaryVersions().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.HiveMetastoreConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.HiveMetastoreConfig) + private static final com.google.cloud.metastore.v1alpha.HiveMetastoreConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.HiveMetastoreConfig(); + } + + public static com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HiveMetastoreConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfigOrBuilder.java new file mode 100644 index 000000000000..4890b4428544 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/HiveMetastoreConfigOrBuilder.java @@ -0,0 +1,252 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface HiveMetastoreConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.HiveMetastoreConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + int getConfigOverridesCount(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + boolean containsConfigOverrides( + java.lang.String key); + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getConfigOverrides(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.util.Map + getConfigOverridesMap(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.lang.String getConfigOverridesOrThrow( + java.lang.String key); + + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + boolean hasKerberosConfig(); + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + com.google.cloud.metastore.v1alpha.KerberosConfig getKerberosConfig(); + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3; + */ + com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); + + /** + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The enum numeric value on the wire for endpointProtocol. + */ + int getEndpointProtocolValue(); + /** + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The endpointProtocol. + */ + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol(); + + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + int getAuxiliaryVersionsCount(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + boolean containsAuxiliaryVersions( + java.lang.String key); + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAuxiliaryVersions(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + java.util.Map + getAuxiliaryVersionsMap(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + /* nullable */ +com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig defaultValue); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1alpha.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + com.google.cloud.metastore.v1alpha.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfig.java new file mode 100644 index 000000000000..8d1317ac0424 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfig.java @@ -0,0 +1,1013 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Configuration information for a Kerberos principal.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.KerberosConfig} + */ +public final class KerberosConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.KerberosConfig) + KerberosConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use KerberosConfig.newBuilder() to construct. + private KerberosConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KerberosConfig() { + principal_ = ""; + krb5ConfigGcsUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KerberosConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_KerberosConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_KerberosConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.KerberosConfig.class, com.google.cloud.metastore.v1alpha.KerberosConfig.Builder.class); + } + + public static final int KEYTAB_FIELD_NUMBER = 1; + private com.google.cloud.metastore.v1alpha.Secret keytab_; + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + @java.lang.Override + public boolean hasKeytab() { + return keytab_ != null; + } + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + * @return The keytab. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Secret getKeytab() { + return keytab_ == null ? com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance() : keytab_; + } + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.SecretOrBuilder getKeytabOrBuilder() { + return keytab_ == null ? com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance() : keytab_; + } + + public static final int PRINCIPAL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object principal_ = ""; + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The principal. + */ + @java.lang.Override + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } + } + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KRB5_CONFIG_GCS_URI_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object krb5ConfigGcsUri_ = ""; + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + @java.lang.Override + public java.lang.String getKrb5ConfigGcsUri() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + krb5ConfigGcsUri_ = s; + return s; + } + } + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + krb5ConfigGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (keytab_ != null) { + output.writeMessage(1, getKeytab()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, principal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, krb5ConfigGcsUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (keytab_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getKeytab()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, principal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, krb5ConfigGcsUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.KerberosConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.KerberosConfig other = (com.google.cloud.metastore.v1alpha.KerberosConfig) obj; + + if (hasKeytab() != other.hasKeytab()) return false; + if (hasKeytab()) { + if (!getKeytab() + .equals(other.getKeytab())) return false; + } + if (!getPrincipal() + .equals(other.getPrincipal())) return false; + if (!getKrb5ConfigGcsUri() + .equals(other.getKrb5ConfigGcsUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeytab()) { + hash = (37 * hash) + KEYTAB_FIELD_NUMBER; + hash = (53 * hash) + getKeytab().hashCode(); + } + hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipal().hashCode(); + hash = (37 * hash) + KRB5_CONFIG_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getKrb5ConfigGcsUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.KerberosConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.KerberosConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration information for a Kerberos principal.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.KerberosConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.KerberosConfig) + com.google.cloud.metastore.v1alpha.KerberosConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_KerberosConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_KerberosConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.KerberosConfig.class, com.google.cloud.metastore.v1alpha.KerberosConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.KerberosConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keytab_ = null; + if (keytabBuilder_ != null) { + keytabBuilder_.dispose(); + keytabBuilder_ = null; + } + principal_ = ""; + krb5ConfigGcsUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_KerberosConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.KerberosConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.KerberosConfig build() { + com.google.cloud.metastore.v1alpha.KerberosConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.KerberosConfig buildPartial() { + com.google.cloud.metastore.v1alpha.KerberosConfig result = new com.google.cloud.metastore.v1alpha.KerberosConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.KerberosConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keytab_ = keytabBuilder_ == null + ? keytab_ + : keytabBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.principal_ = principal_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.krb5ConfigGcsUri_ = krb5ConfigGcsUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.KerberosConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.KerberosConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.KerberosConfig other) { + if (other == com.google.cloud.metastore.v1alpha.KerberosConfig.getDefaultInstance()) return this; + if (other.hasKeytab()) { + mergeKeytab(other.getKeytab()); + } + if (!other.getPrincipal().isEmpty()) { + principal_ = other.principal_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getKrb5ConfigGcsUri().isEmpty()) { + krb5ConfigGcsUri_ = other.krb5ConfigGcsUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getKeytabFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + principal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + krb5ConfigGcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.cloud.metastore.v1alpha.Secret keytab_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Secret, com.google.cloud.metastore.v1alpha.Secret.Builder, com.google.cloud.metastore.v1alpha.SecretOrBuilder> keytabBuilder_; + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + public boolean hasKeytab() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + * @return The keytab. + */ + public com.google.cloud.metastore.v1alpha.Secret getKeytab() { + if (keytabBuilder_ == null) { + return keytab_ == null ? com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance() : keytab_; + } else { + return keytabBuilder_.getMessage(); + } + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + public Builder setKeytab(com.google.cloud.metastore.v1alpha.Secret value) { + if (keytabBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keytab_ = value; + } else { + keytabBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + public Builder setKeytab( + com.google.cloud.metastore.v1alpha.Secret.Builder builderForValue) { + if (keytabBuilder_ == null) { + keytab_ = builderForValue.build(); + } else { + keytabBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + public Builder mergeKeytab(com.google.cloud.metastore.v1alpha.Secret value) { + if (keytabBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + keytab_ != null && + keytab_ != com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance()) { + getKeytabBuilder().mergeFrom(value); + } else { + keytab_ = value; + } + } else { + keytabBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + public Builder clearKeytab() { + bitField0_ = (bitField0_ & ~0x00000001); + keytab_ = null; + if (keytabBuilder_ != null) { + keytabBuilder_.dispose(); + keytabBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + public com.google.cloud.metastore.v1alpha.Secret.Builder getKeytabBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeytabFieldBuilder().getBuilder(); + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + public com.google.cloud.metastore.v1alpha.SecretOrBuilder getKeytabOrBuilder() { + if (keytabBuilder_ != null) { + return keytabBuilder_.getMessageOrBuilder(); + } else { + return keytab_ == null ? + com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance() : keytab_; + } + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Secret, com.google.cloud.metastore.v1alpha.Secret.Builder, com.google.cloud.metastore.v1alpha.SecretOrBuilder> + getKeytabFieldBuilder() { + if (keytabBuilder_ == null) { + keytabBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Secret, com.google.cloud.metastore.v1alpha.Secret.Builder, com.google.cloud.metastore.v1alpha.SecretOrBuilder>( + getKeytab(), + getParentForChildren(), + isClean()); + keytab_ = null; + } + return keytabBuilder_; + } + + private java.lang.Object principal_ = ""; + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return The principal. + */ + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + public com.google.protobuf.ByteString + getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @param value The principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipal( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + principal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return This builder for chaining. + */ + public Builder clearPrincipal() { + principal_ = getDefaultInstance().getPrincipal(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @param value The bytes for principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + principal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object krb5ConfigGcsUri_ = ""; + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + public java.lang.String getKrb5ConfigGcsUri() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + krb5ConfigGcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + public com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + krb5ConfigGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @param value The krb5ConfigGcsUri to set. + * @return This builder for chaining. + */ + public Builder setKrb5ConfigGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + krb5ConfigGcsUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return This builder for chaining. + */ + public Builder clearKrb5ConfigGcsUri() { + krb5ConfigGcsUri_ = getDefaultInstance().getKrb5ConfigGcsUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @param value The bytes for krb5ConfigGcsUri to set. + * @return This builder for chaining. + */ + public Builder setKrb5ConfigGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + krb5ConfigGcsUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.KerberosConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.KerberosConfig) + private static final com.google.cloud.metastore.v1alpha.KerberosConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.KerberosConfig(); + } + + public static com.google.cloud.metastore.v1alpha.KerberosConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KerberosConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.KerberosConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfigOrBuilder.java new file mode 100644 index 000000000000..e8702e77b63c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/KerberosConfigOrBuilder.java @@ -0,0 +1,87 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface KerberosConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.KerberosConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + boolean hasKeytab(); + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + * @return The keytab. + */ + com.google.cloud.metastore.v1alpha.Secret getKeytab(); + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1alpha.Secret keytab = 1; + */ + com.google.cloud.metastore.v1alpha.SecretOrBuilder getKeytabOrBuilder(); + + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The principal. + */ + java.lang.String getPrincipal(); + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + com.google.protobuf.ByteString + getPrincipalBytes(); + + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + java.lang.String getKrb5ConfigGcsUri(); + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Lake.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Lake.java new file mode 100644 index 000000000000..5df9122ecb13 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Lake.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Represents a Lake resource
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Lake} + */ +public final class Lake extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Lake) + LakeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Lake.newBuilder() to construct. + private Lake(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Lake() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Lake(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Lake_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Lake_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Lake.class, com.google.cloud.metastore.v1alpha.Lake.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The Lake resource name.
+   * Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The Lake resource name.
+   * Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.Lake)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.Lake other = (com.google.cloud.metastore.v1alpha.Lake) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.Lake parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Lake parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Lake parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Lake parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Lake prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a Lake resource
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Lake} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Lake) + com.google.cloud.metastore.v1alpha.LakeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Lake_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Lake_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Lake.class, com.google.cloud.metastore.v1alpha.Lake.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.Lake.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Lake_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Lake getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.Lake.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Lake build() { + com.google.cloud.metastore.v1alpha.Lake result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Lake buildPartial() { + com.google.cloud.metastore.v1alpha.Lake result = new com.google.cloud.metastore.v1alpha.Lake(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.Lake result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.Lake) { + return mergeFrom((com.google.cloud.metastore.v1alpha.Lake)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Lake other) { + if (other == com.google.cloud.metastore.v1alpha.Lake.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Lake) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Lake) + private static final com.google.cloud.metastore.v1alpha.Lake DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Lake(); + } + + public static com.google.cloud.metastore.v1alpha.Lake getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Lake parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Lake getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LakeOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LakeOrBuilder.java new file mode 100644 index 000000000000..b2b9f5145235 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LakeOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface LakeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Lake) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Lake resource name.
+   * Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The Lake resource name.
+   * Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequest.java new file mode 100644 index 000000000000..e9cb560da6d7 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequest.java @@ -0,0 +1,1234 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListBackupsRequest} + */ +public final class ListBackupsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListBackupsRequest) + ListBackupsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListBackupsRequest.newBuilder() to construct. + private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListBackupsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListBackupsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListBackupsRequest.class, com.google.cloud.metastore.v1alpha.ListBackupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of backups to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 backups are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListBackupsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ListBackupsRequest other = (com.google.cloud.metastore.v1alpha.ListBackupsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ListBackupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListBackupsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListBackupsRequest) + com.google.cloud.metastore.v1alpha.ListBackupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListBackupsRequest.class, com.google.cloud.metastore.v1alpha.ListBackupsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ListBackupsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListBackupsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ListBackupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListBackupsRequest build() { + com.google.cloud.metastore.v1alpha.ListBackupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListBackupsRequest buildPartial() { + com.google.cloud.metastore.v1alpha.ListBackupsRequest result = new com.google.cloud.metastore.v1alpha.ListBackupsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ListBackupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ListBackupsRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ListBackupsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListBackupsRequest other) { + if (other == com.google.cloud.metastore.v1alpha.ListBackupsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListBackupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListBackupsRequest) + private static final com.google.cloud.metastore.v1alpha.ListBackupsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListBackupsRequest(); + } + + public static com.google.cloud.metastore.v1alpha.ListBackupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListBackupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequestOrBuilder.java new file mode 100644 index 000000000000..58139292f33e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsRequestOrBuilder.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ListBackupsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListBackupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of backups to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 backups are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponse.java new file mode 100644 index 000000000000..fe206776b32b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListBackupsResponse} + */ +public final class ListBackupsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListBackupsResponse) + ListBackupsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListBackupsResponse.newBuilder() to construct. + private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListBackupsResponse() { + backups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListBackupsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListBackupsResponse.class, com.google.cloud.metastore.v1alpha.ListBackupsResponse.Builder.class); + } + + public static final int BACKUPS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List backups_; + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + @java.lang.Override + public java.util.List getBackupsList() { + return backups_; + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + @java.lang.Override + public java.util.List + getBackupsOrBuilderList() { + return backups_; + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + @java.lang.Override + public int getBackupsCount() { + return backups_.size(); + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Backup getBackups(int index) { + return backups_.get(index); + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupsOrBuilder( + int index) { + return backups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < backups_.size(); i++) { + output.writeMessage(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < backups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListBackupsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ListBackupsResponse other = (com.google.cloud.metastore.v1alpha.ListBackupsResponse) obj; + + if (!getBackupsList() + .equals(other.getBackupsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBackupsCount() > 0) { + hash = (37 * hash) + BACKUPS_FIELD_NUMBER; + hash = (53 * hash) + getBackupsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ListBackupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListBackupsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListBackupsResponse) + com.google.cloud.metastore.v1alpha.ListBackupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListBackupsResponse.class, com.google.cloud.metastore.v1alpha.ListBackupsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ListBackupsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + } else { + backups_ = null; + backupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListBackupsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ListBackupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListBackupsResponse build() { + com.google.cloud.metastore.v1alpha.ListBackupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListBackupsResponse buildPartial() { + com.google.cloud.metastore.v1alpha.ListBackupsResponse result = new com.google.cloud.metastore.v1alpha.ListBackupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.ListBackupsResponse result) { + if (backupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backups_ = java.util.Collections.unmodifiableList(backups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backups_ = backups_; + } else { + result.backups_ = backupsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ListBackupsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ListBackupsResponse) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ListBackupsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListBackupsResponse other) { + if (other == com.google.cloud.metastore.v1alpha.ListBackupsResponse.getDefaultInstance()) return this; + if (backupsBuilder_ == null) { + if (!other.backups_.isEmpty()) { + if (backups_.isEmpty()) { + backups_ = other.backups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupsIsMutable(); + backups_.addAll(other.backups_); + } + onChanged(); + } + } else { + if (!other.backups_.isEmpty()) { + if (backupsBuilder_.isEmpty()) { + backupsBuilder_.dispose(); + backupsBuilder_ = null; + backups_ = other.backups_; + bitField0_ = (bitField0_ & ~0x00000001); + backupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBackupsFieldBuilder() : null; + } else { + backupsBuilder_.addAllMessages(other.backups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1alpha.Backup m = + input.readMessage( + com.google.cloud.metastore.v1alpha.Backup.parser(), + extensionRegistry); + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(m); + } else { + backupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List backups_ = + java.util.Collections.emptyList(); + private void ensureBackupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backups_ = new java.util.ArrayList(backups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Backup, com.google.cloud.metastore.v1alpha.Backup.Builder, com.google.cloud.metastore.v1alpha.BackupOrBuilder> backupsBuilder_; + + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public java.util.List getBackupsList() { + if (backupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backups_); + } else { + return backupsBuilder_.getMessageList(); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public int getBackupsCount() { + if (backupsBuilder_ == null) { + return backups_.size(); + } else { + return backupsBuilder_.getCount(); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public com.google.cloud.metastore.v1alpha.Backup getBackups(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessage(index); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.metastore.v1alpha.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.set(index, value); + onChanged(); + } else { + backupsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.metastore.v1alpha.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.set(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.metastore.v1alpha.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(value); + onChanged(); + } else { + backupsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.metastore.v1alpha.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(index, value); + onChanged(); + } else { + backupsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder addBackups( + com.google.cloud.metastore.v1alpha.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.metastore.v1alpha.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder addAllBackups( + java.lang.Iterable values) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, backups_); + onChanged(); + } else { + backupsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder clearBackups() { + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupsBuilder_.clear(); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public Builder removeBackups(int index) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.remove(index); + onChanged(); + } else { + backupsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public com.google.cloud.metastore.v1alpha.Backup.Builder getBackupsBuilder( + int index) { + return getBackupsFieldBuilder().getBuilder(index); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupsOrBuilder( + int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); } else { + return backupsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public java.util.List + getBackupsOrBuilderList() { + if (backupsBuilder_ != null) { + return backupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backups_); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public com.google.cloud.metastore.v1alpha.Backup.Builder addBackupsBuilder() { + return getBackupsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance()); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public com.google.cloud.metastore.v1alpha.Backup.Builder addBackupsBuilder( + int index) { + return getBackupsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1alpha.Backup.getDefaultInstance()); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + public java.util.List + getBackupsBuilderList() { + return getBackupsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Backup, com.google.cloud.metastore.v1alpha.Backup.Builder, com.google.cloud.metastore.v1alpha.BackupOrBuilder> + getBackupsFieldBuilder() { + if (backupsBuilder_ == null) { + backupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Backup, com.google.cloud.metastore.v1alpha.Backup.Builder, com.google.cloud.metastore.v1alpha.BackupOrBuilder>( + backups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + backups_ = null; + } + return backupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListBackupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListBackupsResponse) + private static final com.google.cloud.metastore.v1alpha.ListBackupsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListBackupsResponse(); + } + + public static com.google.cloud.metastore.v1alpha.ListBackupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListBackupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponseOrBuilder.java new file mode 100644 index 000000000000..bae780445825 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListBackupsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ListBackupsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListBackupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + java.util.List + getBackupsList(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + com.google.cloud.metastore.v1alpha.Backup getBackups(int index); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + int getBackupsCount(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + java.util.List + getBackupsOrBuilderList(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Backup backups = 1; + */ + com.google.cloud.metastore.v1alpha.BackupOrBuilder getBackupsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequest.java new file mode 100644 index 000000000000..dbebad60b1b4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequest.java @@ -0,0 +1,1229 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for ListFederations.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListFederationsRequest} + */ +public final class ListFederationsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListFederationsRequest) + ListFederationsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFederationsRequest.newBuilder() to construct. + private ListFederationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFederationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFederationsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListFederationsRequest.class, com.google.cloud.metastore.v1alpha.ListFederationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of federations to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListFederationsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ListFederationsRequest other = (com.google.cloud.metastore.v1alpha.ListFederationsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ListFederationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListFederations.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListFederationsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListFederationsRequest) + com.google.cloud.metastore.v1alpha.ListFederationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListFederationsRequest.class, com.google.cloud.metastore.v1alpha.ListFederationsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ListFederationsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListFederationsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ListFederationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListFederationsRequest build() { + com.google.cloud.metastore.v1alpha.ListFederationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListFederationsRequest buildPartial() { + com.google.cloud.metastore.v1alpha.ListFederationsRequest result = new com.google.cloud.metastore.v1alpha.ListFederationsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ListFederationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ListFederationsRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ListFederationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListFederationsRequest other) { + if (other == com.google.cloud.metastore.v1alpha.ListFederationsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListFederationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListFederationsRequest) + private static final com.google.cloud.metastore.v1alpha.ListFederationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListFederationsRequest(); + } + + public static com.google.cloud.metastore.v1alpha.ListFederationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFederationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListFederationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequestOrBuilder.java new file mode 100644 index 000000000000..dd8d3e48c514 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsRequestOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ListFederationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListFederationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of federations to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponse.java new file mode 100644 index 000000000000..6e4c3085f15b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponse.java @@ -0,0 +1,1266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Response message for ListFederations
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListFederationsResponse} + */ +public final class ListFederationsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListFederationsResponse) + ListFederationsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFederationsResponse.newBuilder() to construct. + private ListFederationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFederationsResponse() { + federations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFederationsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListFederationsResponse.class, com.google.cloud.metastore.v1alpha.ListFederationsResponse.Builder.class); + } + + public static final int FEDERATIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List federations_; + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + @java.lang.Override + public java.util.List getFederationsList() { + return federations_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + @java.lang.Override + public java.util.List + getFederationsOrBuilderList() { + return federations_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + @java.lang.Override + public int getFederationsCount() { + return federations_.size(); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Federation getFederations(int index) { + return federations_.get(index); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationsOrBuilder( + int index) { + return federations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < federations_.size(); i++) { + output.writeMessage(1, federations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < federations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, federations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListFederationsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ListFederationsResponse other = (com.google.cloud.metastore.v1alpha.ListFederationsResponse) obj; + + if (!getFederationsList() + .equals(other.getFederationsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFederationsCount() > 0) { + hash = (37 * hash) + FEDERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFederationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ListFederationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListFederations
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListFederationsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListFederationsResponse) + com.google.cloud.metastore.v1alpha.ListFederationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListFederationsResponse.class, com.google.cloud.metastore.v1alpha.ListFederationsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ListFederationsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (federationsBuilder_ == null) { + federations_ = java.util.Collections.emptyList(); + } else { + federations_ = null; + federationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListFederationsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ListFederationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListFederationsResponse build() { + com.google.cloud.metastore.v1alpha.ListFederationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListFederationsResponse buildPartial() { + com.google.cloud.metastore.v1alpha.ListFederationsResponse result = new com.google.cloud.metastore.v1alpha.ListFederationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.ListFederationsResponse result) { + if (federationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + federations_ = java.util.Collections.unmodifiableList(federations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.federations_ = federations_; + } else { + result.federations_ = federationsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ListFederationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ListFederationsResponse) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ListFederationsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListFederationsResponse other) { + if (other == com.google.cloud.metastore.v1alpha.ListFederationsResponse.getDefaultInstance()) return this; + if (federationsBuilder_ == null) { + if (!other.federations_.isEmpty()) { + if (federations_.isEmpty()) { + federations_ = other.federations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFederationsIsMutable(); + federations_.addAll(other.federations_); + } + onChanged(); + } + } else { + if (!other.federations_.isEmpty()) { + if (federationsBuilder_.isEmpty()) { + federationsBuilder_.dispose(); + federationsBuilder_ = null; + federations_ = other.federations_; + bitField0_ = (bitField0_ & ~0x00000001); + federationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFederationsFieldBuilder() : null; + } else { + federationsBuilder_.addAllMessages(other.federations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1alpha.Federation m = + input.readMessage( + com.google.cloud.metastore.v1alpha.Federation.parser(), + extensionRegistry); + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(m); + } else { + federationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List federations_ = + java.util.Collections.emptyList(); + private void ensureFederationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + federations_ = new java.util.ArrayList(federations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder> federationsBuilder_; + + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public java.util.List getFederationsList() { + if (federationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(federations_); + } else { + return federationsBuilder_.getMessageList(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public int getFederationsCount() { + if (federationsBuilder_ == null) { + return federations_.size(); + } else { + return federationsBuilder_.getCount(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public com.google.cloud.metastore.v1alpha.Federation getFederations(int index) { + if (federationsBuilder_ == null) { + return federations_.get(index); + } else { + return federationsBuilder_.getMessage(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder setFederations( + int index, com.google.cloud.metastore.v1alpha.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.set(index, value); + onChanged(); + } else { + federationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder setFederations( + int index, com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.set(index, builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder addFederations(com.google.cloud.metastore.v1alpha.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.add(value); + onChanged(); + } else { + federationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder addFederations( + int index, com.google.cloud.metastore.v1alpha.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.add(index, value); + onChanged(); + } else { + federationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder addFederations( + com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder addFederations( + int index, com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(index, builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder addAllFederations( + java.lang.Iterable values) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, federations_); + onChanged(); + } else { + federationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder clearFederations() { + if (federationsBuilder_ == null) { + federations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + federationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public Builder removeFederations(int index) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.remove(index); + onChanged(); + } else { + federationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public com.google.cloud.metastore.v1alpha.Federation.Builder getFederationsBuilder( + int index) { + return getFederationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationsOrBuilder( + int index) { + if (federationsBuilder_ == null) { + return federations_.get(index); } else { + return federationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public java.util.List + getFederationsOrBuilderList() { + if (federationsBuilder_ != null) { + return federationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(federations_); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public com.google.cloud.metastore.v1alpha.Federation.Builder addFederationsBuilder() { + return getFederationsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public com.google.cloud.metastore.v1alpha.Federation.Builder addFederationsBuilder( + int index) { + return getFederationsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + public java.util.List + getFederationsBuilderList() { + return getFederationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder> + getFederationsFieldBuilder() { + if (federationsBuilder_ == null) { + federationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder>( + federations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + federations_ = null; + } + return federationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListFederationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListFederationsResponse) + private static final com.google.cloud.metastore.v1alpha.ListFederationsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListFederationsResponse(); + } + + public static com.google.cloud.metastore.v1alpha.ListFederationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFederationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListFederationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponseOrBuilder.java new file mode 100644 index 000000000000..f115f81781dc --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListFederationsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ListFederationsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListFederationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + java.util.List + getFederationsList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + com.google.cloud.metastore.v1alpha.Federation getFederations(int index); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + int getFederationsCount(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + java.util.List + getFederationsOrBuilderList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Federation federations = 1; + */ + com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequest.java new file mode 100644 index 000000000000..f2536bb228d6 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequest.java @@ -0,0 +1,1234 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListMetadataImportsRequest} + */ +public final class ListMetadataImportsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) + ListMetadataImportsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListMetadataImportsRequest.newBuilder() to construct. + private ListMetadataImportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListMetadataImportsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListMetadataImportsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.class, com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of imports to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 imports are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest other = (com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListMetadataImportsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.class, com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest build() { + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest buildPartial() { + com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest result = new com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest other) { + if (other == com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) + private static final com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest(); + } + + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMetadataImportsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListMetadataImportsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequestOrBuilder.java new file mode 100644 index 000000000000..82380b59a9a6 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsRequestOrBuilder.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ListMetadataImportsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListMetadataImportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of imports to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 imports are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponse.java new file mode 100644 index 000000000000..7c5ce51a9bc7 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListMetadataImportsResponse} + */ +public final class ListMetadataImportsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) + ListMetadataImportsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListMetadataImportsResponse.newBuilder() to construct. + private ListMetadataImportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListMetadataImportsResponse() { + metadataImports_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListMetadataImportsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.class, com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.Builder.class); + } + + public static final int METADATA_IMPORTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List metadataImports_; + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public java.util.List getMetadataImportsList() { + return metadataImports_; + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public java.util.List + getMetadataImportsOrBuilderList() { + return metadataImports_; + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public int getMetadataImportsCount() { + return metadataImports_.size(); + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImports(int index) { + return metadataImports_.get(index); + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index) { + return metadataImports_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < metadataImports_.size(); i++) { + output.writeMessage(1, metadataImports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < metadataImports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metadataImports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse other = (com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse) obj; + + if (!getMetadataImportsList() + .equals(other.getMetadataImportsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMetadataImportsCount() > 0) { + hash = (37 * hash) + METADATA_IMPORTS_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImportsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListMetadataImportsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) + com.google.cloud.metastore.v1alpha.ListMetadataImportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.class, com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (metadataImportsBuilder_ == null) { + metadataImports_ = java.util.Collections.emptyList(); + } else { + metadataImports_ = null; + metadataImportsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse build() { + com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse buildPartial() { + com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse result = new com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse result) { + if (metadataImportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metadataImports_ = java.util.Collections.unmodifiableList(metadataImports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metadataImports_ = metadataImports_; + } else { + result.metadataImports_ = metadataImportsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse other) { + if (other == com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse.getDefaultInstance()) return this; + if (metadataImportsBuilder_ == null) { + if (!other.metadataImports_.isEmpty()) { + if (metadataImports_.isEmpty()) { + metadataImports_ = other.metadataImports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetadataImportsIsMutable(); + metadataImports_.addAll(other.metadataImports_); + } + onChanged(); + } + } else { + if (!other.metadataImports_.isEmpty()) { + if (metadataImportsBuilder_.isEmpty()) { + metadataImportsBuilder_.dispose(); + metadataImportsBuilder_ = null; + metadataImports_ = other.metadataImports_; + bitField0_ = (bitField0_ & ~0x00000001); + metadataImportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMetadataImportsFieldBuilder() : null; + } else { + metadataImportsBuilder_.addAllMessages(other.metadataImports_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1alpha.MetadataImport m = + input.readMessage( + com.google.cloud.metastore.v1alpha.MetadataImport.parser(), + extensionRegistry); + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(m); + } else { + metadataImportsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List metadataImports_ = + java.util.Collections.emptyList(); + private void ensureMetadataImportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metadataImports_ = new java.util.ArrayList(metadataImports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> metadataImportsBuilder_; + + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public java.util.List getMetadataImportsList() { + if (metadataImportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metadataImports_); + } else { + return metadataImportsBuilder_.getMessageList(); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public int getMetadataImportsCount() { + if (metadataImportsBuilder_ == null) { + return metadataImports_.size(); + } else { + return metadataImportsBuilder_.getCount(); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImports(int index) { + if (metadataImportsBuilder_ == null) { + return metadataImports_.get(index); + } else { + return metadataImportsBuilder_.getMessage(index); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder setMetadataImports( + int index, com.google.cloud.metastore.v1alpha.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.set(index, value); + onChanged(); + } else { + metadataImportsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder setMetadataImports( + int index, com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.set(index, builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports(com.google.cloud.metastore.v1alpha.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.add(value); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + int index, com.google.cloud.metastore.v1alpha.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.add(index, value); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + int index, com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(index, builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder addAllMetadataImports( + java.lang.Iterable values) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metadataImports_); + onChanged(); + } else { + metadataImportsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder clearMetadataImports() { + if (metadataImportsBuilder_ == null) { + metadataImports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metadataImportsBuilder_.clear(); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public Builder removeMetadataImports(int index) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.remove(index); + onChanged(); + } else { + metadataImportsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1alpha.MetadataImport.Builder getMetadataImportsBuilder( + int index) { + return getMetadataImportsFieldBuilder().getBuilder(index); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index) { + if (metadataImportsBuilder_ == null) { + return metadataImports_.get(index); } else { + return metadataImportsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public java.util.List + getMetadataImportsOrBuilderList() { + if (metadataImportsBuilder_ != null) { + return metadataImportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metadataImports_); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1alpha.MetadataImport.Builder addMetadataImportsBuilder() { + return getMetadataImportsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1alpha.MetadataImport.Builder addMetadataImportsBuilder( + int index) { + return getMetadataImportsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + public java.util.List + getMetadataImportsBuilderList() { + return getMetadataImportsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> + getMetadataImportsFieldBuilder() { + if (metadataImportsBuilder_ == null) { + metadataImportsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder>( + metadataImports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + metadataImports_ = null; + } + return metadataImportsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) + private static final com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse(); + } + + public static com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMetadataImportsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListMetadataImportsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponseOrBuilder.java new file mode 100644 index 000000000000..4aa82f6ea09d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListMetadataImportsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ListMetadataImportsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListMetadataImportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + java.util.List + getMetadataImportsList(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImports(int index); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + int getMetadataImportsCount(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + java.util.List + getMetadataImportsOrBuilderList(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1; + */ + com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequest.java new file mode 100644 index 000000000000..06de7979df5f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequest.java @@ -0,0 +1,1238 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListServicesRequest} + */ +public final class ListServicesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListServicesRequest) + ListServicesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListServicesRequest.newBuilder() to construct. + private ListServicesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListServicesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListServicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListServicesRequest.class, com.google.cloud.metastore.v1alpha.ListServicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of services to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListServicesRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ListServicesRequest other = (com.google.cloud.metastore.v1alpha.ListServicesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ListServicesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListServicesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListServicesRequest) + com.google.cloud.metastore.v1alpha.ListServicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListServicesRequest.class, com.google.cloud.metastore.v1alpha.ListServicesRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ListServicesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListServicesRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ListServicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListServicesRequest build() { + com.google.cloud.metastore.v1alpha.ListServicesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListServicesRequest buildPartial() { + com.google.cloud.metastore.v1alpha.ListServicesRequest result = new com.google.cloud.metastore.v1alpha.ListServicesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ListServicesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ListServicesRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ListServicesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListServicesRequest other) { + if (other == com.google.cloud.metastore.v1alpha.ListServicesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListServicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListServicesRequest) + private static final com.google.cloud.metastore.v1alpha.ListServicesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListServicesRequest(); + } + + public static com.google.cloud.metastore.v1alpha.ListServicesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListServicesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequestOrBuilder.java new file mode 100644 index 000000000000..956296978491 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesRequestOrBuilder.java @@ -0,0 +1,122 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ListServicesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListServicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of services to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponse.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponse.java new file mode 100644 index 000000000000..5c60a6513717 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListServicesResponse} + */ +public final class ListServicesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ListServicesResponse) + ListServicesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListServicesResponse.newBuilder() to construct. + private ListServicesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListServicesResponse() { + services_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListServicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListServicesResponse.class, com.google.cloud.metastore.v1alpha.ListServicesResponse.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List services_; + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesList() { + return services_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + @java.lang.Override + public java.util.List + getServicesOrBuilderList() { + return services_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + @java.lang.Override + public int getServicesCount() { + return services_.size(); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service getServices(int index) { + return services_.get(index); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServicesOrBuilder( + int index) { + return services_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < services_.size(); i++) { + output.writeMessage(1, services_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < services_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, services_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ListServicesResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ListServicesResponse other = (com.google.cloud.metastore.v1alpha.ListServicesResponse) obj; + + if (!getServicesList() + .equals(other.getServicesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServicesCount() > 0) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServicesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ListServicesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ListServicesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ListServicesResponse) + com.google.cloud.metastore.v1alpha.ListServicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ListServicesResponse.class, com.google.cloud.metastore.v1alpha.ListServicesResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ListServicesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + } else { + services_ = null; + servicesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListServicesResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ListServicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListServicesResponse build() { + com.google.cloud.metastore.v1alpha.ListServicesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListServicesResponse buildPartial() { + com.google.cloud.metastore.v1alpha.ListServicesResponse result = new com.google.cloud.metastore.v1alpha.ListServicesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.ListServicesResponse result) { + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.services_ = services_; + } else { + result.services_ = servicesBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ListServicesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ListServicesResponse) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ListServicesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ListServicesResponse other) { + if (other == com.google.cloud.metastore.v1alpha.ListServicesResponse.getDefaultInstance()) return this; + if (servicesBuilder_ == null) { + if (!other.services_.isEmpty()) { + if (services_.isEmpty()) { + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServicesIsMutable(); + services_.addAll(other.services_); + } + onChanged(); + } + } else { + if (!other.services_.isEmpty()) { + if (servicesBuilder_.isEmpty()) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + servicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getServicesFieldBuilder() : null; + } else { + servicesBuilder_.addAllMessages(other.services_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1alpha.Service m = + input.readMessage( + com.google.cloud.metastore.v1alpha.Service.parser(), + extensionRegistry); + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(m); + } else { + servicesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List services_ = + java.util.Collections.emptyList(); + private void ensureServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + services_ = new java.util.ArrayList(services_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder> servicesBuilder_; + + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public java.util.List getServicesList() { + if (servicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(services_); + } else { + return servicesBuilder_.getMessageList(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public int getServicesCount() { + if (servicesBuilder_ == null) { + return services_.size(); + } else { + return servicesBuilder_.getCount(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public com.google.cloud.metastore.v1alpha.Service getServices(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessage(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder setServices( + int index, com.google.cloud.metastore.v1alpha.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.set(index, value); + onChanged(); + } else { + servicesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder setServices( + int index, com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.set(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder addServices(com.google.cloud.metastore.v1alpha.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(value); + onChanged(); + } else { + servicesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder addServices( + int index, com.google.cloud.metastore.v1alpha.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(index, value); + onChanged(); + } else { + servicesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder addServices( + com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder addServices( + int index, com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder addAllServices( + java.lang.Iterable values) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, services_); + onChanged(); + } else { + servicesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder clearServices() { + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servicesBuilder_.clear(); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public Builder removeServices(int index) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.remove(index); + onChanged(); + } else { + servicesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public com.google.cloud.metastore.v1alpha.Service.Builder getServicesBuilder( + int index) { + return getServicesFieldBuilder().getBuilder(index); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServicesOrBuilder( + int index) { + if (servicesBuilder_ == null) { + return services_.get(index); } else { + return servicesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public java.util.List + getServicesOrBuilderList() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(services_); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public com.google.cloud.metastore.v1alpha.Service.Builder addServicesBuilder() { + return getServicesFieldBuilder().addBuilder( + com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public com.google.cloud.metastore.v1alpha.Service.Builder addServicesBuilder( + int index) { + return getServicesFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + public java.util.List + getServicesBuilderList() { + return getServicesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder> + getServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder>( + services_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + services_ = null; + } + return servicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ListServicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ListServicesResponse) + private static final com.google.cloud.metastore.v1alpha.ListServicesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ListServicesResponse(); + } + + public static com.google.cloud.metastore.v1alpha.ListServicesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ListServicesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponseOrBuilder.java new file mode 100644 index 000000000000..e9e39004ebf3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ListServicesResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ListServicesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ListServicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + java.util.List + getServicesList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + com.google.cloud.metastore.v1alpha.Service getServices(int index); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + int getServicesCount(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + java.util.List + getServicesOrBuilderList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Service services = 1; + */ + com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServicesOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadata.java new file mode 100644 index 000000000000..3e0c35b0cb19 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadata.java @@ -0,0 +1,1605 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Metadata about the service in a location.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.LocationMetadata} + */ +public final class LocationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.LocationMetadata) + LocationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocationMetadata.newBuilder() to construct. + private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocationMetadata() { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.LocationMetadata.class, com.google.cloud.metastore.v1alpha.LocationMetadata.Builder.class); + } + + public interface HiveMetastoreVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+     * Whether `version` will be chosen by the server if a metastore service is
+     * created with a `HiveMetastoreConfig` that omits the `version`.
+     * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + boolean getIsDefault(); + } + /** + *
+   * A specification of a supported version of the Hive Metastore software.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} + */ + public static final class HiveMetastoreVersion extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) + HiveMetastoreVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use HiveMetastoreVersion.newBuilder() to construct. + private HiveMetastoreVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HiveMetastoreVersion() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HiveMetastoreVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.class, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 2; + private boolean isDefault_ = false; + /** + *
+     * Whether `version` will be chosen by the server if a metastore service is
+     * created with a `HiveMetastoreConfig` that omits the `version`.
+     * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (isDefault_ != false) { + output.writeBool(2, isDefault_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isDefault_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion other = (com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (getIsDefault() + != other.getIsDefault()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsDefault()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A specification of a supported version of the Hive Metastore software.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.class, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + isDefault_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion build() { + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion buildPartial() { + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion result = new com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isDefault_ = isDefault_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) { + return mergeFrom((com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion other) { + if (other == com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + isDefault_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean isDefault_ ; + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000002); + isDefault_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion) + private static final com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion(); + } + + public static com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HiveMetastoreVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List supportedHiveMetastoreVersions_; + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public java.util.List getSupportedHiveMetastoreVersionsList() { + return supportedHiveMetastoreVersions_; + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList() { + return supportedHiveMetastoreVersions_; + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public int getSupportedHiveMetastoreVersionsCount() { + return supportedHiveMetastoreVersions_.size(); + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index) { + return supportedHiveMetastoreVersions_.get(index); + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index) { + return supportedHiveMetastoreVersions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { + output.writeMessage(1, supportedHiveMetastoreVersions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, supportedHiveMetastoreVersions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.LocationMetadata)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.LocationMetadata other = (com.google.cloud.metastore.v1alpha.LocationMetadata) obj; + + if (!getSupportedHiveMetastoreVersionsList() + .equals(other.getSupportedHiveMetastoreVersionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSupportedHiveMetastoreVersionsCount() > 0) { + hash = (37 * hash) + SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedHiveMetastoreVersionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.LocationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata about the service in a location.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.LocationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.LocationMetadata) + com.google.cloud.metastore.v1alpha.LocationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.LocationMetadata.class, com.google.cloud.metastore.v1alpha.LocationMetadata.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.LocationMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + } else { + supportedHiveMetastoreVersions_ = null; + supportedHiveMetastoreVersionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_LocationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.LocationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata build() { + com.google.cloud.metastore.v1alpha.LocationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata buildPartial() { + com.google.cloud.metastore.v1alpha.LocationMetadata result = new com.google.cloud.metastore.v1alpha.LocationMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.LocationMetadata result) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + supportedHiveMetastoreVersions_ = java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersions_; + } else { + result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.LocationMetadata result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.LocationMetadata) { + return mergeFrom((com.google.cloud.metastore.v1alpha.LocationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.LocationMetadata other) { + if (other == com.google.cloud.metastore.v1alpha.LocationMetadata.getDefaultInstance()) return this; + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (!other.supportedHiveMetastoreVersions_.isEmpty()) { + if (supportedHiveMetastoreVersions_.isEmpty()) { + supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.addAll(other.supportedHiveMetastoreVersions_); + } + onChanged(); + } + } else { + if (!other.supportedHiveMetastoreVersions_.isEmpty()) { + if (supportedHiveMetastoreVersionsBuilder_.isEmpty()) { + supportedHiveMetastoreVersionsBuilder_.dispose(); + supportedHiveMetastoreVersionsBuilder_ = null; + supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + supportedHiveMetastoreVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSupportedHiveMetastoreVersionsFieldBuilder() : null; + } else { + supportedHiveMetastoreVersionsBuilder_.addAllMessages(other.supportedHiveMetastoreVersions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion m = + input.readMessage( + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.parser(), + extensionRegistry); + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(m); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List supportedHiveMetastoreVersions_ = + java.util.Collections.emptyList(); + private void ensureSupportedHiveMetastoreVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + supportedHiveMetastoreVersions_ = new java.util.ArrayList(supportedHiveMetastoreVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder> supportedHiveMetastoreVersionsBuilder_; + + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List getSupportedHiveMetastoreVersionsList() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + } else { + return supportedHiveMetastoreVersionsBuilder_.getMessageList(); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public int getSupportedHiveMetastoreVersionsCount() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.size(); + } else { + return supportedHiveMetastoreVersionsBuilder_.getCount(); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.get(index); + } else { + return supportedHiveMetastoreVersionsBuilder_.getMessage(index); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder setSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.set(index, value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder setSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions(com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(index, value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addAllSupportedHiveMetastoreVersions( + java.lang.Iterable values) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, supportedHiveMetastoreVersions_); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder clearSupportedHiveMetastoreVersions() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.clear(); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder removeSupportedHiveMetastoreVersions(int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.remove(index); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder getSupportedHiveMetastoreVersionsBuilder( + int index) { + return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilder(index); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.get(index); } else { + return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList() { + if (supportedHiveMetastoreVersionsBuilder_ != null) { + return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder addSupportedHiveMetastoreVersionsBuilder() { + return getSupportedHiveMetastoreVersionsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder addSupportedHiveMetastoreVersionsBuilder( + int index) { + return getSupportedHiveMetastoreVersionsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List + getSupportedHiveMetastoreVersionsBuilderList() { + return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder> + getSupportedHiveMetastoreVersionsFieldBuilder() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder>( + supportedHiveMetastoreVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + supportedHiveMetastoreVersions_ = null; + } + return supportedHiveMetastoreVersionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.LocationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.LocationMetadata) + private static final com.google.cloud.metastore.v1alpha.LocationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.LocationMetadata(); + } + + public static com.google.cloud.metastore.v1alpha.LocationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.LocationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadataOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadataOrBuilder.java new file mode 100644 index 000000000000..f21aabb9fe68 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationMetadataOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface LocationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.LocationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + java.util.List + getSupportedHiveMetastoreVersionsList(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + int getSupportedHiveMetastoreVersionsCount(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + com.google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index); +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationName.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationName.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/LocationName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindow.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindow.java new file mode 100644 index 000000000000..9aa82dd2668d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindow.java @@ -0,0 +1,769 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Maintenance window. This specifies when Dataproc Metastore
+ * may perform system maintenance operation to the service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MaintenanceWindow} + */ +public final class MaintenanceWindow extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MaintenanceWindow) + MaintenanceWindowOrBuilder { +private static final long serialVersionUID = 0L; + // Use MaintenanceWindow.newBuilder() to construct. + private MaintenanceWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MaintenanceWindow() { + dayOfWeek_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MaintenanceWindow(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MaintenanceWindow.class, com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder.class); + } + + public static final int HOUR_OF_DAY_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value hourOfDay_; + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + @java.lang.Override + public boolean hasHourOfDay() { + return hourOfDay_ != null; + } + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getHourOfDay() { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + + public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; + private int dayOfWeek_ = 0; + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + @java.lang.Override public com.google.type.DayOfWeek getDayOfWeek() { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hourOfDay_ != null) { + output.writeMessage(1, getHourOfDay()); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + output.writeEnum(2, dayOfWeek_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hourOfDay_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHourOfDay()); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, dayOfWeek_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.MaintenanceWindow)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.MaintenanceWindow other = (com.google.cloud.metastore.v1alpha.MaintenanceWindow) obj; + + if (hasHourOfDay() != other.hasHourOfDay()) return false; + if (hasHourOfDay()) { + if (!getHourOfDay() + .equals(other.getHourOfDay())) return false; + } + if (dayOfWeek_ != other.dayOfWeek_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHourOfDay()) { + hash = (37 * hash) + HOUR_OF_DAY_FIELD_NUMBER; + hash = (53 * hash) + getHourOfDay().hashCode(); + } + hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; + hash = (53 * hash) + dayOfWeek_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MaintenanceWindow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Maintenance window. This specifies when Dataproc Metastore
+   * may perform system maintenance operation to the service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MaintenanceWindow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MaintenanceWindow) + com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MaintenanceWindow.class, com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.MaintenanceWindow.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hourOfDay_ = null; + if (hourOfDayBuilder_ != null) { + hourOfDayBuilder_.dispose(); + hourOfDayBuilder_ = null; + } + dayOfWeek_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MaintenanceWindow getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MaintenanceWindow build() { + com.google.cloud.metastore.v1alpha.MaintenanceWindow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MaintenanceWindow buildPartial() { + com.google.cloud.metastore.v1alpha.MaintenanceWindow result = new com.google.cloud.metastore.v1alpha.MaintenanceWindow(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.MaintenanceWindow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hourOfDay_ = hourOfDayBuilder_ == null + ? hourOfDay_ + : hourOfDayBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dayOfWeek_ = dayOfWeek_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.MaintenanceWindow) { + return mergeFrom((com.google.cloud.metastore.v1alpha.MaintenanceWindow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MaintenanceWindow other) { + if (other == com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance()) return this; + if (other.hasHourOfDay()) { + mergeHourOfDay(other.getHourOfDay()); + } + if (other.dayOfWeek_ != 0) { + setDayOfWeekValue(other.getDayOfWeekValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getHourOfDayFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + dayOfWeek_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value hourOfDay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> hourOfDayBuilder_; + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + public boolean hasHourOfDay() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + public com.google.protobuf.Int32Value getHourOfDay() { + if (hourOfDayBuilder_ == null) { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } else { + return hourOfDayBuilder_.getMessage(); + } + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder setHourOfDay(com.google.protobuf.Int32Value value) { + if (hourOfDayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hourOfDay_ = value; + } else { + hourOfDayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder setHourOfDay( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (hourOfDayBuilder_ == null) { + hourOfDay_ = builderForValue.build(); + } else { + hourOfDayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder mergeHourOfDay(com.google.protobuf.Int32Value value) { + if (hourOfDayBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + hourOfDay_ != null && + hourOfDay_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getHourOfDayBuilder().mergeFrom(value); + } else { + hourOfDay_ = value; + } + } else { + hourOfDayBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder clearHourOfDay() { + bitField0_ = (bitField0_ & ~0x00000001); + hourOfDay_ = null; + if (hourOfDayBuilder_ != null) { + hourOfDayBuilder_.dispose(); + hourOfDayBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public com.google.protobuf.Int32Value.Builder getHourOfDayBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHourOfDayFieldBuilder().getBuilder(); + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { + if (hourOfDayBuilder_ != null) { + return hourOfDayBuilder_.getMessageOrBuilder(); + } else { + return hourOfDay_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getHourOfDayFieldBuilder() { + if (hourOfDayBuilder_ == null) { + hourOfDayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getHourOfDay(), + getParentForChildren(), + isClean()); + hourOfDay_ = null; + } + return hourOfDayBuilder_; + } + + private int dayOfWeek_ = 0; + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @param value The enum numeric value on the wire for dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValue(int value) { + dayOfWeek_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDayOfWeek() { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @param value The dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeek(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dayOfWeek_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return This builder for chaining. + */ + public Builder clearDayOfWeek() { + bitField0_ = (bitField0_ & ~0x00000002); + dayOfWeek_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MaintenanceWindow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MaintenanceWindow) + private static final com.google.cloud.metastore.v1alpha.MaintenanceWindow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MaintenanceWindow(); + } + + public static com.google.cloud.metastore.v1alpha.MaintenanceWindow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaintenanceWindow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MaintenanceWindow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindowOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindowOrBuilder.java new file mode 100644 index 000000000000..85b525585e3e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MaintenanceWindowOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface MaintenanceWindowOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MaintenanceWindow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + boolean hasHourOfDay(); + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + com.google.protobuf.Int32Value getHourOfDay(); + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder(); + + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + int getDayOfWeekValue(); + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + com.google.type.DayOfWeek getDayOfWeek(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExport.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExport.java new file mode 100644 index 000000000000..80b5fedaefda --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExport.java @@ -0,0 +1,1607 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * The details of a metadata export operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataExport} + */ +public final class MetadataExport extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataExport) + MetadataExportOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataExport.newBuilder() to construct. + private MetadataExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataExport() { + state_ = 0; + databaseDumpType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataExport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataExport.class, com.google.cloud.metastore.v1alpha.MetadataExport.Builder.class); + } + + /** + *
+   * The current state of the metadata export.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.MetadataExport.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata export is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata export is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata export completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata export failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The metadata export is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata export is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata export is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata export completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata export failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The metadata export is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetadataExport.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.MetadataExport.State) + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DESTINATION_GCS_URI(4), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 4: return DESTINATION_GCS_URI; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int DESTINATION_GCS_URI_FIELD_NUMBER = 4; + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + public boolean hasDestinationGcsUri() { + return destinationCase_ == 4; + } + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + public java.lang.String getDestinationGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 4) { + destination_ = s; + } + return s; + } + } + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + public com.google.protobuf.ByteString + getDestinationGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 4) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.MetadataExport.State getState() { + com.google.cloud.metastore.v1alpha.MetadataExport.State result = com.google.cloud.metastore.v1alpha.MetadataExport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.MetadataExport.State.UNRECOGNIZED : result; + } + + public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 5; + private int databaseDumpType_ = 0; + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1alpha.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (destinationCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destination_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, databaseDumpType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1alpha.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, state_); + } + if (destinationCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destination_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, databaseDumpType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataExport)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.MetadataExport other = (com.google.cloud.metastore.v1alpha.MetadataExport) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (databaseDumpType_ != other.databaseDumpType_) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 4: + if (!getDestinationGcsUri() + .equals(other.getDestinationGcsUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseDumpType_; + switch (destinationCase_) { + case 4: + hash = (37 * hash) + DESTINATION_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationGcsUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataExport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MetadataExport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a metadata export operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataExport} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataExport) + com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataExport.class, com.google.cloud.metastore.v1alpha.MetadataExport.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.MetadataExport.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + databaseDumpType_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataExport_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataExport getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.MetadataExport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataExport build() { + com.google.cloud.metastore.v1alpha.MetadataExport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataExport buildPartial() { + com.google.cloud.metastore.v1alpha.MetadataExport result = new com.google.cloud.metastore.v1alpha.MetadataExport(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.MetadataExport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.databaseDumpType_ = databaseDumpType_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.MetadataExport result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.MetadataExport) { + return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataExport)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataExport other) { + if (other == com.google.cloud.metastore.v1alpha.MetadataExport.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.databaseDumpType_ != 0) { + setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); + } + switch (other.getDestinationCase()) { + case DESTINATION_GCS_URI: { + destinationCase_ = 4; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 24: { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 4; + destination_ = s; + break; + } // case 34 + case 40: { + databaseDumpType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + @java.lang.Override + public boolean hasDestinationGcsUri() { + return destinationCase_ == 4; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + @java.lang.Override + public java.lang.String getDestinationGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 4) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 4) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The destinationGcsUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDestinationGcsUri() { + if (destinationCase_ == 4) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for destinationGcsUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataExport.State getState() { + com.google.cloud.metastore.v1alpha.MetadataExport.State result = com.google.cloud.metastore.v1alpha.MetadataExport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.MetadataExport.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1alpha.MetadataExport.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private int databaseDumpType_ = 0; + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpTypeValue(int value) { + databaseDumpType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpType(com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + databaseDumpType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDatabaseDumpType() { + bitField0_ = (bitField0_ & ~0x00000010); + databaseDumpType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataExport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataExport) + private static final com.google.cloud.metastore.v1alpha.MetadataExport DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataExport(); + } + + public static com.google.cloud.metastore.v1alpha.MetadataExport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataExport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataExport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExportOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExportOrBuilder.java new file mode 100644 index 000000000000..6808c6dbf713 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataExportOrBuilder.java @@ -0,0 +1,141 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface MetadataExportOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataExport) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + boolean hasDestinationGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + java.lang.String getDestinationGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + com.google.protobuf.ByteString + getDestinationGcsUriBytes(); + + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1alpha.MetadataExport.State getState(); + + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + int getDatabaseDumpTypeValue(); + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getDatabaseDumpType(); + + public com.google.cloud.metastore.v1alpha.MetadataExport.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImport.java new file mode 100644 index 000000000000..d555e3acd923 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImport.java @@ -0,0 +1,3320 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * A metastore resource that imports metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataImport} + */ +public final class MetadataImport extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataImport) + MetadataImportOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataImport.newBuilder() to construct. + private MetadataImport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataImport() { + name_ = ""; + description_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataImport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataImport.class, com.google.cloud.metastore.v1alpha.MetadataImport.Builder.class); + } + + /** + *
+   * The current state of the metadata import.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.MetadataImport.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata import is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata import is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata import completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata import is being updated.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + *
+     * The metadata import failed, and attempted metadata changes were rolled
+     * back.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata import is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata import is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata import completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata import is being updated.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + *
+     * The metadata import failed, and attempted metadata changes were rolled
+     * back.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return UPDATING; + case 4: return FAILED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetadataImport.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.MetadataImport.State) + } + + public interface DatabaseDumpOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Deprecated int getDatabaseTypeValue(); + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @return The databaseType. + */ + @java.lang.Deprecated com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType getDatabaseType(); + + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString + getGcsUriBytes(); + + /** + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @return The sourceDatabase. + */ + @java.lang.Deprecated java.lang.String getSourceDatabase(); + /** + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @return The bytes for sourceDatabase. + */ + @java.lang.Deprecated com.google.protobuf.ByteString + getSourceDatabaseBytes(); + + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getType(); + } + /** + *
+   * A specification of the location of and metadata about a database dump from
+   * a relational database management system.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} + */ + public static final class DatabaseDump extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) + DatabaseDumpOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseDump.newBuilder() to construct. + private DatabaseDump(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DatabaseDump() { + databaseType_ = 0; + gcsUri_ = ""; + sourceDatabase_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DatabaseDump(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.class, com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder.class); + } + + /** + *
+     * The type of the database.
+     * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType} + */ + public enum DatabaseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * The type of the source database is unknown.
+       * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + DATABASE_TYPE_UNSPECIFIED(0), + /** + *
+       * The type of the source database is MySQL.
+       * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + UNRECOGNIZED(-1), + ; + + /** + *
+       * The type of the source database is unknown.
+       * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+       * The type of the source database is MySQL.
+       * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DatabaseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DatabaseType forNumber(int value) { + switch (value) { + case 0: return DATABASE_TYPE_UNSPECIFIED; + case 1: return MYSQL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DatabaseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseType findValueByNumber(int number) { + return DatabaseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDescriptor().getEnumTypes().get(0); + } + + private static final DatabaseType[] VALUES = values(); + + public static DatabaseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DatabaseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType) + } + + public static final int DATABASE_TYPE_FIELD_NUMBER = 1; + private int databaseType_ = 0; + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override @java.lang.Deprecated public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @return The databaseType. + */ + @java.lang.Override @java.lang.Deprecated public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType result = com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED : result; + } + + public static final int GCS_URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object gcsUri_ = ""; + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } + } + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_DATABASE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object sourceDatabase_ = ""; + /** + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @return The sourceDatabase. + */ + @java.lang.Override + @java.lang.Deprecated public java.lang.String getSourceDatabase() { + java.lang.Object ref = sourceDatabase_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceDatabase_ = s; + return s; + } + } + /** + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @return The bytes for sourceDatabase. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString + getSourceDatabaseBytes() { + java.lang.Object ref = sourceDatabase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceDatabase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 4; + private int type_ = 0; + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getType() { + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (databaseType_ != com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, databaseType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceDatabase_); + } + if (type_ != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (databaseType_ != com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, databaseType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceDatabase_); + } + if (type_ != com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump other = (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) obj; + + if (databaseType_ != other.databaseType_) return false; + if (!getGcsUri() + .equals(other.getGcsUri())) return false; + if (!getSourceDatabase() + .equals(other.getSourceDatabase())) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseType_; + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + hash = (37 * hash) + SOURCE_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getSourceDatabase().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A specification of the location of and metadata about a database dump from
+     * a relational database management system.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.class, com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + databaseType_ = 0; + gcsUri_ = ""; + sourceDatabase_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump build() { + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump buildPartial() { + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump result = new com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.databaseType_ = databaseType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gcsUri_ = gcsUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sourceDatabase_ = sourceDatabase_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) { + return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump other) { + if (other == com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance()) return this; + if (other.databaseType_ != 0) { + setDatabaseTypeValue(other.getDatabaseTypeValue()); + } + if (!other.getGcsUri().isEmpty()) { + gcsUri_ = other.gcsUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSourceDatabase().isEmpty()) { + sourceDatabase_ = other.sourceDatabase_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + databaseType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + gcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + sourceDatabase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + type_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int databaseType_ = 0; + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override @java.lang.Deprecated public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @param value The enum numeric value on the wire for databaseType to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setDatabaseTypeValue(int value) { + databaseType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @return The databaseType. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType result = com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED : result; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @param value The databaseType to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setDatabaseType(com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + databaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=699 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearDatabaseType() { + bitField0_ = (bitField0_ & ~0x00000001); + databaseType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object gcsUri_ = ""; + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString + getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gcsUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + gcsUri_ = getDefaultInstance().getGcsUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gcsUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object sourceDatabase_ = ""; + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @return The sourceDatabase. + */ + @java.lang.Deprecated public java.lang.String getSourceDatabase() { + java.lang.Object ref = sourceDatabase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceDatabase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @return The bytes for sourceDatabase. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getSourceDatabaseBytes() { + java.lang.Object ref = sourceDatabase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceDatabase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @param value The sourceDatabase to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setSourceDatabase( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sourceDatabase_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearSourceDatabase() { + sourceDatabase_ = getDefaultInstance().getSourceDatabase(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1alpha/metastore.proto;l=706 + * @param value The bytes for sourceDatabase to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setSourceDatabaseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sourceDatabase_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type getType() { + com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) + private static final com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump(); + } + + public static com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseDump parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int metadataCase_ = 0; + private java.lang.Object metadata_; + public enum MetadataCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATABASE_DUMP(6), + METADATA_NOT_SET(0); + private final int value; + private MetadataCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetadataCase valueOf(int value) { + return forNumber(value); + } + + public static MetadataCase forNumber(int value) { + switch (value) { + case 6: return DATABASE_DUMP; + case 0: return METADATA_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public MetadataCase + getMetadataCase() { + return MetadataCase.forNumber( + metadataCase_); + } + + public static final int DATABASE_DUMP_FIELD_NUMBER = 6; + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + @java.lang.Override + public boolean hasDatabaseDump() { + return metadataCase_ == 6; + } + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDatabaseDump() { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); + } + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder() { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.MetadataImport.State getState() { + com.google.cloud.metastore.v1alpha.MetadataImport.State result = com.google.cloud.metastore.v1alpha.MetadataImport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.MetadataImport.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (state_ != com.google.cloud.metastore.v1alpha.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (metadataCase_ == 6) { + output.writeMessage(6, (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_); + } + if (endTime_ != null) { + output.writeMessage(7, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getUpdateTime()); + } + if (state_ != com.google.cloud.metastore.v1alpha.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, state_); + } + if (metadataCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataImport)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.MetadataImport other = (com.google.cloud.metastore.v1alpha.MetadataImport) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (!getMetadataCase().equals(other.getMetadataCase())) return false; + switch (metadataCase_) { + case 6: + if (!getDatabaseDump() + .equals(other.getDatabaseDump())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (metadataCase_) { + case 6: + hash = (37 * hash) + DATABASE_DUMP_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseDump().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataImport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MetadataImport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A metastore resource that imports metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataImport} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataImport) + com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataImport.class, com.google.cloud.metastore.v1alpha.MetadataImport.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.MetadataImport.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (databaseDumpBuilder_ != null) { + databaseDumpBuilder_.clear(); + } + name_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + metadataCase_ = 0; + metadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataImport_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport build() { + com.google.cloud.metastore.v1alpha.MetadataImport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport buildPartial() { + com.google.cloud.metastore.v1alpha.MetadataImport result = new com.google.cloud.metastore.v1alpha.MetadataImport(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.MetadataImport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.MetadataImport result) { + result.metadataCase_ = metadataCase_; + result.metadata_ = this.metadata_; + if (metadataCase_ == 6 && + databaseDumpBuilder_ != null) { + result.metadata_ = databaseDumpBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.MetadataImport) { + return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataImport)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataImport other) { + if (other == com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getMetadataCase()) { + case DATABASE_DUMP: { + mergeDatabaseDump(other.getDatabaseDump()); + break; + } + case METADATA_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 40 + case 50: { + input.readMessage( + getDatabaseDumpFieldBuilder().getBuilder(), + extensionRegistry); + metadataCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int metadataCase_ = 0; + private java.lang.Object metadata_; + public MetadataCase + getMetadataCase() { + return MetadataCase.forNumber( + metadataCase_); + } + + public Builder clearMetadata() { + metadataCase_ = 0; + metadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder> databaseDumpBuilder_; + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + @java.lang.Override + public boolean hasDatabaseDump() { + return metadataCase_ == 6; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDatabaseDump() { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); + } else { + if (metadataCase_ == 6) { + return databaseDumpBuilder_.getMessage(); + } + return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); + } + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setDatabaseDump(com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump value) { + if (databaseDumpBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + databaseDumpBuilder_.setMessage(value); + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setDatabaseDump( + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder builderForValue) { + if (databaseDumpBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + databaseDumpBuilder_.setMessage(builderForValue.build()); + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder mergeDatabaseDump(com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump value) { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6 && + metadata_ != com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance()) { + metadata_ = com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.newBuilder((com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_) + .mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + if (metadataCase_ == 6) { + databaseDumpBuilder_.mergeFrom(value); + } else { + databaseDumpBuilder_.setMessage(value); + } + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearDatabaseDump() { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6) { + metadataCase_ = 0; + metadata_ = null; + onChanged(); + } + } else { + if (metadataCase_ == 6) { + metadataCase_ = 0; + metadata_ = null; + } + databaseDumpBuilder_.clear(); + } + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder getDatabaseDumpBuilder() { + return getDatabaseDumpFieldBuilder().getBuilder(); + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder() { + if ((metadataCase_ == 6) && (databaseDumpBuilder_ != null)) { + return databaseDumpBuilder_.getMessageOrBuilder(); + } else { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); + } + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder> + getDatabaseDumpFieldBuilder() { + if (databaseDumpBuilder_ == null) { + if (!(metadataCase_ == 6)) { + metadata_ = com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.getDefaultInstance(); + } + databaseDumpBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder>( + (com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump) metadata_, + getParentForChildren(), + isClean()); + metadata_ = null; + } + metadataCase_ = 6; + onChanged(); + return databaseDumpBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000020); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport.State getState() { + com.google.cloud.metastore.v1alpha.MetadataImport.State result = com.google.cloud.metastore.v1alpha.MetadataImport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.MetadataImport.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1alpha.MetadataImport.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataImport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataImport) + private static final com.google.cloud.metastore.v1alpha.MetadataImport DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataImport(); + } + + public static com.google.cloud.metastore.v1alpha.MetadataImport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataImport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportName.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportName.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportOrBuilder.java new file mode 100644 index 000000000000..c4f2e6b9eac1 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataImportOrBuilder.java @@ -0,0 +1,180 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface MetadataImportOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataImport) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + boolean hasDatabaseDump(); + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump getDatabaseDump(); + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1alpha.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder(); + + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1alpha.MetadataImport.State getState(); + + public com.google.cloud.metastore.v1alpha.MetadataImport.MetadataCase getMetadataCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegration.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegration.java new file mode 100644 index 000000000000..7d304556a84b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegration.java @@ -0,0 +1,874 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Specifies how metastore metadata should be integrated with external services.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataIntegration} + */ +public final class MetadataIntegration extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataIntegration) + MetadataIntegrationOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataIntegration.newBuilder() to construct. + private MetadataIntegration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataIntegration() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataIntegration(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataIntegration.class, com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder.class); + } + + public static final int DATA_CATALOG_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.metastore.v1alpha.DataCatalogConfig dataCatalogConfig_; + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + * @return Whether the dataCatalogConfig field is set. + */ + @java.lang.Override + public boolean hasDataCatalogConfig() { + return dataCatalogConfig_ != null; + } + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + * @return The dataCatalogConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataCatalogConfig getDataCatalogConfig() { + return dataCatalogConfig_ == null ? com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance() : dataCatalogConfig_; + } + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder getDataCatalogConfigOrBuilder() { + return dataCatalogConfig_ == null ? com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance() : dataCatalogConfig_; + } + + public static final int DATAPLEX_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1alpha.DataplexConfig dataplexConfig_; + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + * @return Whether the dataplexConfig field is set. + */ + @java.lang.Override + public boolean hasDataplexConfig() { + return dataplexConfig_ != null; + } + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + * @return The dataplexConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataplexConfig getDataplexConfig() { + return dataplexConfig_ == null ? com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance() : dataplexConfig_; + } + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder getDataplexConfigOrBuilder() { + return dataplexConfig_ == null ? com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance() : dataplexConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dataCatalogConfig_ != null) { + output.writeMessage(1, getDataCatalogConfig()); + } + if (dataplexConfig_ != null) { + output.writeMessage(2, getDataplexConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataCatalogConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDataCatalogConfig()); + } + if (dataplexConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDataplexConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataIntegration)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.MetadataIntegration other = (com.google.cloud.metastore.v1alpha.MetadataIntegration) obj; + + if (hasDataCatalogConfig() != other.hasDataCatalogConfig()) return false; + if (hasDataCatalogConfig()) { + if (!getDataCatalogConfig() + .equals(other.getDataCatalogConfig())) return false; + } + if (hasDataplexConfig() != other.hasDataplexConfig()) return false; + if (hasDataplexConfig()) { + if (!getDataplexConfig() + .equals(other.getDataplexConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataCatalogConfig()) { + hash = (37 * hash) + DATA_CATALOG_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDataCatalogConfig().hashCode(); + } + if (hasDataplexConfig()) { + hash = (37 * hash) + DATAPLEX_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDataplexConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataIntegration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MetadataIntegration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies how metastore metadata should be integrated with external services.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataIntegration} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataIntegration) + com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataIntegration.class, com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.MetadataIntegration.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataCatalogConfig_ = null; + if (dataCatalogConfigBuilder_ != null) { + dataCatalogConfigBuilder_.dispose(); + dataCatalogConfigBuilder_ = null; + } + dataplexConfig_ = null; + if (dataplexConfigBuilder_ != null) { + dataplexConfigBuilder_.dispose(); + dataplexConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataIntegration getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataIntegration build() { + com.google.cloud.metastore.v1alpha.MetadataIntegration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataIntegration buildPartial() { + com.google.cloud.metastore.v1alpha.MetadataIntegration result = new com.google.cloud.metastore.v1alpha.MetadataIntegration(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.MetadataIntegration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataCatalogConfig_ = dataCatalogConfigBuilder_ == null + ? dataCatalogConfig_ + : dataCatalogConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataplexConfig_ = dataplexConfigBuilder_ == null + ? dataplexConfig_ + : dataplexConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.MetadataIntegration) { + return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataIntegration)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataIntegration other) { + if (other == com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance()) return this; + if (other.hasDataCatalogConfig()) { + mergeDataCatalogConfig(other.getDataCatalogConfig()); + } + if (other.hasDataplexConfig()) { + mergeDataplexConfig(other.getDataplexConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getDataCatalogConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getDataplexConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.cloud.metastore.v1alpha.DataCatalogConfig dataCatalogConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.DataCatalogConfig, com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder, com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder> dataCatalogConfigBuilder_; + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + * @return Whether the dataCatalogConfig field is set. + */ + public boolean hasDataCatalogConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + * @return The dataCatalogConfig. + */ + public com.google.cloud.metastore.v1alpha.DataCatalogConfig getDataCatalogConfig() { + if (dataCatalogConfigBuilder_ == null) { + return dataCatalogConfig_ == null ? com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance() : dataCatalogConfig_; + } else { + return dataCatalogConfigBuilder_.getMessage(); + } + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + public Builder setDataCatalogConfig(com.google.cloud.metastore.v1alpha.DataCatalogConfig value) { + if (dataCatalogConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataCatalogConfig_ = value; + } else { + dataCatalogConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + public Builder setDataCatalogConfig( + com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder builderForValue) { + if (dataCatalogConfigBuilder_ == null) { + dataCatalogConfig_ = builderForValue.build(); + } else { + dataCatalogConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + public Builder mergeDataCatalogConfig(com.google.cloud.metastore.v1alpha.DataCatalogConfig value) { + if (dataCatalogConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + dataCatalogConfig_ != null && + dataCatalogConfig_ != com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance()) { + getDataCatalogConfigBuilder().mergeFrom(value); + } else { + dataCatalogConfig_ = value; + } + } else { + dataCatalogConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + public Builder clearDataCatalogConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + dataCatalogConfig_ = null; + if (dataCatalogConfigBuilder_ != null) { + dataCatalogConfigBuilder_.dispose(); + dataCatalogConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + public com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder getDataCatalogConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDataCatalogConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + public com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder getDataCatalogConfigOrBuilder() { + if (dataCatalogConfigBuilder_ != null) { + return dataCatalogConfigBuilder_.getMessageOrBuilder(); + } else { + return dataCatalogConfig_ == null ? + com.google.cloud.metastore.v1alpha.DataCatalogConfig.getDefaultInstance() : dataCatalogConfig_; + } + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.DataCatalogConfig, com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder, com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder> + getDataCatalogConfigFieldBuilder() { + if (dataCatalogConfigBuilder_ == null) { + dataCatalogConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.DataCatalogConfig, com.google.cloud.metastore.v1alpha.DataCatalogConfig.Builder, com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder>( + getDataCatalogConfig(), + getParentForChildren(), + isClean()); + dataCatalogConfig_ = null; + } + return dataCatalogConfigBuilder_; + } + + private com.google.cloud.metastore.v1alpha.DataplexConfig dataplexConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.DataplexConfig, com.google.cloud.metastore.v1alpha.DataplexConfig.Builder, com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder> dataplexConfigBuilder_; + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + * @return Whether the dataplexConfig field is set. + */ + public boolean hasDataplexConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + * @return The dataplexConfig. + */ + public com.google.cloud.metastore.v1alpha.DataplexConfig getDataplexConfig() { + if (dataplexConfigBuilder_ == null) { + return dataplexConfig_ == null ? com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance() : dataplexConfig_; + } else { + return dataplexConfigBuilder_.getMessage(); + } + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + public Builder setDataplexConfig(com.google.cloud.metastore.v1alpha.DataplexConfig value) { + if (dataplexConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataplexConfig_ = value; + } else { + dataplexConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + public Builder setDataplexConfig( + com.google.cloud.metastore.v1alpha.DataplexConfig.Builder builderForValue) { + if (dataplexConfigBuilder_ == null) { + dataplexConfig_ = builderForValue.build(); + } else { + dataplexConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + public Builder mergeDataplexConfig(com.google.cloud.metastore.v1alpha.DataplexConfig value) { + if (dataplexConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + dataplexConfig_ != null && + dataplexConfig_ != com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance()) { + getDataplexConfigBuilder().mergeFrom(value); + } else { + dataplexConfig_ = value; + } + } else { + dataplexConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + public Builder clearDataplexConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + dataplexConfig_ = null; + if (dataplexConfigBuilder_ != null) { + dataplexConfigBuilder_.dispose(); + dataplexConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + public com.google.cloud.metastore.v1alpha.DataplexConfig.Builder getDataplexConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDataplexConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + public com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder getDataplexConfigOrBuilder() { + if (dataplexConfigBuilder_ != null) { + return dataplexConfigBuilder_.getMessageOrBuilder(); + } else { + return dataplexConfig_ == null ? + com.google.cloud.metastore.v1alpha.DataplexConfig.getDefaultInstance() : dataplexConfig_; + } + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.DataplexConfig, com.google.cloud.metastore.v1alpha.DataplexConfig.Builder, com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder> + getDataplexConfigFieldBuilder() { + if (dataplexConfigBuilder_ == null) { + dataplexConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.DataplexConfig, com.google.cloud.metastore.v1alpha.DataplexConfig.Builder, com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder>( + getDataplexConfig(), + getParentForChildren(), + isClean()); + dataplexConfig_ = null; + } + return dataplexConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataIntegration) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataIntegration) + private static final com.google.cloud.metastore.v1alpha.MetadataIntegration DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataIntegration(); + } + + public static com.google.cloud.metastore.v1alpha.MetadataIntegration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataIntegration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataIntegration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegrationOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegrationOrBuilder.java new file mode 100644 index 000000000000..719c7694c133 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataIntegrationOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface MetadataIntegrationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataIntegration) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + * @return Whether the dataCatalogConfig field is set. + */ + boolean hasDataCatalogConfig(); + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + * @return The dataCatalogConfig. + */ + com.google.cloud.metastore.v1alpha.DataCatalogConfig getDataCatalogConfig(); + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1; + */ + com.google.cloud.metastore.v1alpha.DataCatalogConfigOrBuilder getDataCatalogConfigOrBuilder(); + + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + * @return Whether the dataplexConfig field is set. + */ + boolean hasDataplexConfig(); + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + * @return The dataplexConfig. + */ + com.google.cloud.metastore.v1alpha.DataplexConfig getDataplexConfig(); + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2; + */ + com.google.cloud.metastore.v1alpha.DataplexConfigOrBuilder getDataplexConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivity.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivity.java new file mode 100644 index 000000000000..c03a64b8e6c3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivity.java @@ -0,0 +1,1304 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * The metadata management activities of the metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataManagementActivity} + */ +public final class MetadataManagementActivity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MetadataManagementActivity) + MetadataManagementActivityOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataManagementActivity.newBuilder() to construct. + private MetadataManagementActivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataManagementActivity() { + metadataExports_ = java.util.Collections.emptyList(); + restores_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataManagementActivity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataManagementActivity.class, com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder.class); + } + + public static final int METADATA_EXPORTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List metadataExports_; + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getMetadataExportsList() { + return metadataExports_; + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getMetadataExportsOrBuilderList() { + return metadataExports_; + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getMetadataExportsCount() { + return metadataExports_.size(); + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataExport getMetadataExports(int index) { + return metadataExports_.get(index); + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index) { + return metadataExports_.get(index); + } + + public static final int RESTORES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List restores_; + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getRestoresList() { + return restores_; + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getRestoresOrBuilderList() { + return restores_; + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getRestoresCount() { + return restores_.size(); + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Restore getRestores(int index) { + return restores_.get(index); + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RestoreOrBuilder getRestoresOrBuilder( + int index) { + return restores_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < metadataExports_.size(); i++) { + output.writeMessage(1, metadataExports_.get(i)); + } + for (int i = 0; i < restores_.size(); i++) { + output.writeMessage(2, restores_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < metadataExports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metadataExports_.get(i)); + } + for (int i = 0; i < restores_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, restores_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.MetadataManagementActivity)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.MetadataManagementActivity other = (com.google.cloud.metastore.v1alpha.MetadataManagementActivity) obj; + + if (!getMetadataExportsList() + .equals(other.getMetadataExportsList())) return false; + if (!getRestoresList() + .equals(other.getRestoresList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMetadataExportsCount() > 0) { + hash = (37 * hash) + METADATA_EXPORTS_FIELD_NUMBER; + hash = (53 * hash) + getMetadataExportsList().hashCode(); + } + if (getRestoresCount() > 0) { + hash = (37 * hash) + RESTORES_FIELD_NUMBER; + hash = (53 * hash) + getRestoresList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MetadataManagementActivity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The metadata management activities of the metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MetadataManagementActivity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MetadataManagementActivity) + com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MetadataManagementActivity.class, com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.MetadataManagementActivity.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (metadataExportsBuilder_ == null) { + metadataExports_ = java.util.Collections.emptyList(); + } else { + metadataExports_ = null; + metadataExportsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (restoresBuilder_ == null) { + restores_ = java.util.Collections.emptyList(); + } else { + restores_ = null; + restoresBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataManagementActivity getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataManagementActivity build() { + com.google.cloud.metastore.v1alpha.MetadataManagementActivity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataManagementActivity buildPartial() { + com.google.cloud.metastore.v1alpha.MetadataManagementActivity result = new com.google.cloud.metastore.v1alpha.MetadataManagementActivity(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.MetadataManagementActivity result) { + if (metadataExportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metadataExports_ = java.util.Collections.unmodifiableList(metadataExports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metadataExports_ = metadataExports_; + } else { + result.metadataExports_ = metadataExportsBuilder_.build(); + } + if (restoresBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + restores_ = java.util.Collections.unmodifiableList(restores_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.restores_ = restores_; + } else { + result.restores_ = restoresBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.MetadataManagementActivity result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.MetadataManagementActivity) { + return mergeFrom((com.google.cloud.metastore.v1alpha.MetadataManagementActivity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MetadataManagementActivity other) { + if (other == com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance()) return this; + if (metadataExportsBuilder_ == null) { + if (!other.metadataExports_.isEmpty()) { + if (metadataExports_.isEmpty()) { + metadataExports_ = other.metadataExports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetadataExportsIsMutable(); + metadataExports_.addAll(other.metadataExports_); + } + onChanged(); + } + } else { + if (!other.metadataExports_.isEmpty()) { + if (metadataExportsBuilder_.isEmpty()) { + metadataExportsBuilder_.dispose(); + metadataExportsBuilder_ = null; + metadataExports_ = other.metadataExports_; + bitField0_ = (bitField0_ & ~0x00000001); + metadataExportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMetadataExportsFieldBuilder() : null; + } else { + metadataExportsBuilder_.addAllMessages(other.metadataExports_); + } + } + } + if (restoresBuilder_ == null) { + if (!other.restores_.isEmpty()) { + if (restores_.isEmpty()) { + restores_ = other.restores_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRestoresIsMutable(); + restores_.addAll(other.restores_); + } + onChanged(); + } + } else { + if (!other.restores_.isEmpty()) { + if (restoresBuilder_.isEmpty()) { + restoresBuilder_.dispose(); + restoresBuilder_ = null; + restores_ = other.restores_; + bitField0_ = (bitField0_ & ~0x00000002); + restoresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRestoresFieldBuilder() : null; + } else { + restoresBuilder_.addAllMessages(other.restores_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1alpha.MetadataExport m = + input.readMessage( + com.google.cloud.metastore.v1alpha.MetadataExport.parser(), + extensionRegistry); + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(m); + } else { + metadataExportsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.google.cloud.metastore.v1alpha.Restore m = + input.readMessage( + com.google.cloud.metastore.v1alpha.Restore.parser(), + extensionRegistry); + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(m); + } else { + restoresBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List metadataExports_ = + java.util.Collections.emptyList(); + private void ensureMetadataExportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metadataExports_ = new java.util.ArrayList(metadataExports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataExport, com.google.cloud.metastore.v1alpha.MetadataExport.Builder, com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder> metadataExportsBuilder_; + + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getMetadataExportsList() { + if (metadataExportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metadataExports_); + } else { + return metadataExportsBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getMetadataExportsCount() { + if (metadataExportsBuilder_ == null) { + return metadataExports_.size(); + } else { + return metadataExportsBuilder_.getCount(); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.MetadataExport getMetadataExports(int index) { + if (metadataExportsBuilder_ == null) { + return metadataExports_.get(index); + } else { + return metadataExportsBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataExports( + int index, com.google.cloud.metastore.v1alpha.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.set(index, value); + onChanged(); + } else { + metadataExportsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataExports( + int index, com.google.cloud.metastore.v1alpha.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.set(index, builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports(com.google.cloud.metastore.v1alpha.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.add(value); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + int index, com.google.cloud.metastore.v1alpha.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.add(index, value); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + com.google.cloud.metastore.v1alpha.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + int index, com.google.cloud.metastore.v1alpha.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(index, builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllMetadataExports( + java.lang.Iterable values) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metadataExports_); + onChanged(); + } else { + metadataExportsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearMetadataExports() { + if (metadataExportsBuilder_ == null) { + metadataExports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metadataExportsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeMetadataExports(int index) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.remove(index); + onChanged(); + } else { + metadataExportsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.MetadataExport.Builder getMetadataExportsBuilder( + int index) { + return getMetadataExportsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index) { + if (metadataExportsBuilder_ == null) { + return metadataExports_.get(index); } else { + return metadataExportsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getMetadataExportsOrBuilderList() { + if (metadataExportsBuilder_ != null) { + return metadataExportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metadataExports_); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.MetadataExport.Builder addMetadataExportsBuilder() { + return getMetadataExportsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1alpha.MetadataExport.getDefaultInstance()); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.MetadataExport.Builder addMetadataExportsBuilder( + int index) { + return getMetadataExportsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1alpha.MetadataExport.getDefaultInstance()); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getMetadataExportsBuilderList() { + return getMetadataExportsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataExport, com.google.cloud.metastore.v1alpha.MetadataExport.Builder, com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder> + getMetadataExportsFieldBuilder() { + if (metadataExportsBuilder_ == null) { + metadataExportsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataExport, com.google.cloud.metastore.v1alpha.MetadataExport.Builder, com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder>( + metadataExports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + metadataExports_ = null; + } + return metadataExportsBuilder_; + } + + private java.util.List restores_ = + java.util.Collections.emptyList(); + private void ensureRestoresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + restores_ = new java.util.ArrayList(restores_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Restore, com.google.cloud.metastore.v1alpha.Restore.Builder, com.google.cloud.metastore.v1alpha.RestoreOrBuilder> restoresBuilder_; + + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getRestoresList() { + if (restoresBuilder_ == null) { + return java.util.Collections.unmodifiableList(restores_); + } else { + return restoresBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getRestoresCount() { + if (restoresBuilder_ == null) { + return restores_.size(); + } else { + return restoresBuilder_.getCount(); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.Restore getRestores(int index) { + if (restoresBuilder_ == null) { + return restores_.get(index); + } else { + return restoresBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRestores( + int index, com.google.cloud.metastore.v1alpha.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.set(index, value); + onChanged(); + } else { + restoresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRestores( + int index, com.google.cloud.metastore.v1alpha.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.set(index, builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores(com.google.cloud.metastore.v1alpha.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.add(value); + onChanged(); + } else { + restoresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + int index, com.google.cloud.metastore.v1alpha.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.add(index, value); + onChanged(); + } else { + restoresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + com.google.cloud.metastore.v1alpha.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + int index, com.google.cloud.metastore.v1alpha.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(index, builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllRestores( + java.lang.Iterable values) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, restores_); + onChanged(); + } else { + restoresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearRestores() { + if (restoresBuilder_ == null) { + restores_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + restoresBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeRestores(int index) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.remove(index); + onChanged(); + } else { + restoresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.Restore.Builder getRestoresBuilder( + int index) { + return getRestoresFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.RestoreOrBuilder getRestoresOrBuilder( + int index) { + if (restoresBuilder_ == null) { + return restores_.get(index); } else { + return restoresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getRestoresOrBuilderList() { + if (restoresBuilder_ != null) { + return restoresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(restores_); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.Restore.Builder addRestoresBuilder() { + return getRestoresFieldBuilder().addBuilder( + com.google.cloud.metastore.v1alpha.Restore.getDefaultInstance()); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.Restore.Builder addRestoresBuilder( + int index) { + return getRestoresFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1alpha.Restore.getDefaultInstance()); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getRestoresBuilderList() { + return getRestoresFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Restore, com.google.cloud.metastore.v1alpha.Restore.Builder, com.google.cloud.metastore.v1alpha.RestoreOrBuilder> + getRestoresFieldBuilder() { + if (restoresBuilder_ == null) { + restoresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Restore, com.google.cloud.metastore.v1alpha.Restore.Builder, com.google.cloud.metastore.v1alpha.RestoreOrBuilder>( + restores_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + restores_ = null; + } + return restoresBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MetadataManagementActivity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MetadataManagementActivity) + private static final com.google.cloud.metastore.v1alpha.MetadataManagementActivity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MetadataManagementActivity(); + } + + public static com.google.cloud.metastore.v1alpha.MetadataManagementActivity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataManagementActivity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataManagementActivity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivityOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivityOrBuilder.java new file mode 100644 index 000000000000..09d454ae0248 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetadataManagementActivityOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface MetadataManagementActivityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MetadataManagementActivity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getMetadataExportsList(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1alpha.MetadataExport getMetadataExports(int index); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getMetadataExportsCount(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getMetadataExportsOrBuilderList(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1alpha.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index); + + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getRestoresList(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1alpha.Restore getRestores(int index); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getRestoresCount(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getRestoresOrBuilderList(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1alpha.RestoreOrBuilder getRestoresOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreFederationProto.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreFederationProto.java new file mode 100644 index 000000000000..3135af4e9152 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreFederationProto.java @@ -0,0 +1,270 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public final class MetastoreFederationProto { + private MetastoreFederationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Federation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Federation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_BackendMetastore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/metastore/v1alpha/metasto" + + "re_federation.proto\022\036google.cloud.metast" + + "ore.v1alpha\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\032.google/cloud/metastore/v1alpha/m" + + "etastore.proto\032#google/longrunning/opera" + + "tions.proto\032\033google/protobuf/empty.proto" + + "\032 google/protobuf/field_mask.proto\032\037goog" + + "le/protobuf/timestamp.proto\"\277\006\n\nFederati" + + "on\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030\002 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013u" + + "pdate_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\022F\n\006labels\030\004 \003(\01326.google.cloud" + + ".metastore.v1alpha.Federation.LabelsEntr" + + "y\022\024\n\007version\030\005 \001(\tB\003\340A\005\022]\n\022backend_metas" + + "tores\030\006 \003(\0132A.google.cloud.metastore.v1a" + + "lpha.Federation.BackendMetastoresEntry\022\031" + + "\n\014endpoint_uri\030\007 \001(\tB\003\340A\003\022D\n\005state\030\010 \001(\016" + + "20.google.cloud.metastore.v1alpha.Federa" + + "tion.StateB\003\340A\003\022\032\n\rstate_message\030\t \001(\tB\003" + + "\340A\003\022\020\n\003uid\030\n \001(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032j\n\026BackendM" + + "etastoresEntry\022\013\n\003key\030\001 \001(\005\022?\n\005value\030\002 \001" + + "(\01320.google.cloud.metastore.v1alpha.Back" + + "endMetastore:\0028\001\"_\n\005State\022\025\n\021STATE_UNSPE" + + "CIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UP" + + "DATING\020\003\022\014\n\010DELETING\020\004\022\t\n\005ERROR\020\005:j\352Ag\n#" + + "metastore.googleapis.com/Federation\022@pro" + + "jects/{project}/locations/{location}/fed" + + "erations/{federation}\"\335\001\n\020BackendMetasto" + + "re\022\014\n\004name\030\001 \001(\t\022V\n\016metastore_type\030\002 \001(\016" + + "2>.google.cloud.metastore.v1alpha.Backen" + + "dMetastore.MetastoreType\"c\n\rMetastoreTyp" + + "e\022\036\n\032METASTORE_TYPE_UNSPECIFIED\020\000\022\014\n\010DAT" + + "APLEX\020\001\022\014\n\010BIGQUERY\020\002\022\026\n\022DATAPROC_METAST" + + "ORE\020\003\"\262\001\n\026ListFederationsRequest\022;\n\006pare" + + "nt\030\001 \001(\tB+\340A\002\372A%\022#metastore.googleapis.c" + + "om/Federation\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" + + "\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003" + + "\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\210\001\n\027ListFeder" + + "ationsResponse\022?\n\013federations\030\001 \003(\0132*.go" + + "ogle.cloud.metastore.v1alpha.Federation\022" + + "\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030" + + "\003 \003(\t\"Q\n\024GetFederationRequest\0229\n\004name\030\001 " + + "\001(\tB+\340A\002\372A%\n#metastore.googleapis.com/Fe" + + "deration\"\320\001\n\027CreateFederationRequest\022;\n\006" + + "parent\030\001 \001(\tB+\340A\002\372A%\022#metastore.googleap" + + "is.com/Federation\022\032\n\rfederation_id\030\002 \001(\t" + + "B\003\340A\002\022C\n\nfederation\030\003 \001(\0132*.google.cloud" + + ".metastore.v1alpha.FederationB\003\340A\002\022\027\n\nre" + + "quest_id\030\004 \001(\tB\003\340A\001\"\255\001\n\027UpdateFederation" + + "Request\0224\n\013update_mask\030\001 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\003\340A\002\022C\n\nfederation\030\002 \001(" + + "\0132*.google.cloud.metastore.v1alpha.Feder" + + "ationB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"m\n\027D" + + "eleteFederationRequest\0229\n\004name\030\001 \001(\tB+\340A" + + "\002\372A%\n#metastore.googleapis.com/Federatio" + + "n\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\0012\247\n\n\033DataprocM" + + "etastoreFederation\022\311\001\n\017ListFederations\0226" + + ".google.cloud.metastore.v1alpha.ListFede" + + "rationsRequest\0327.google.cloud.metastore." + + "v1alpha.ListFederationsResponse\"E\202\323\344\223\0026\022" + + "4/v1alpha/{parent=projects/*/locations/*" + + "}/federations\332A\006parent\022\266\001\n\rGetFederation" + + "\0224.google.cloud.metastore.v1alpha.GetFed" + + "erationRequest\032*.google.cloud.metastore." + + "v1alpha.Federation\"C\202\323\344\223\0026\0224/v1alpha/{na" + + "me=projects/*/locations/*/federations/*}" + + "\332A\004name\022\230\002\n\020CreateFederation\0227.google.cl" + + "oud.metastore.v1alpha.CreateFederationRe" + + "quest\032\035.google.longrunning.Operation\"\253\001\202" + + "\323\344\223\002B\"4/v1alpha/{parent=projects/*/locat" + + "ions/*}/federations:\nfederation\332A\037parent" + + ",federation,federation_id\312A>\n\nFederation" + + "\0220google.cloud.metastore.v1alpha.Operati" + + "onMetadata\022\232\002\n\020UpdateFederation\0227.google" + + ".cloud.metastore.v1alpha.UpdateFederatio" + + "nRequest\032\035.google.longrunning.Operation\"" + + "\255\001\202\323\344\223\002M2?/v1alpha/{federation.name=proj" + + "ects/*/locations/*/federations/*}:\nfeder" + + "ation\332A\026federation,update_mask\312A>\n\nFeder" + + "ation\0220google.cloud.metastore.v1alpha.Op" + + "erationMetadata\022\374\001\n\020DeleteFederation\0227.g" + + "oogle.cloud.metastore.v1alpha.DeleteFede" + + "rationRequest\032\035.google.longrunning.Opera" + + "tion\"\217\001\202\323\344\223\0026*4/v1alpha/{name=projects/*" + + "/locations/*/federations/*}\332A\004name\312AI\n\025g" + + "oogle.protobuf.Empty\0220google.cloud.metas" + + "tore.v1alpha.OperationMetadata\032L\312A\030metas" + + "tore.googleapis.com\322A.https://www.google" + + "apis.com/auth/cloud-platformB\202\001\n\"com.goo" + + "gle.cloud.metastore.v1alphaB\030MetastoreFe" + + "derationProtoP\001Z@cloud.google.com/go/met" + + "astore/apiv1alpha/metastorepb;metastorep" + + "bb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.metastore.v1alpha.MetastoreProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_metastore_v1alpha_Federation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_metastore_v1alpha_Federation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_Federation_descriptor, + new java.lang.String[] { "Name", "CreateTime", "UpdateTime", "Labels", "Version", "BackendMetastores", "EndpointUri", "State", "StateMessage", "Uid", }); + internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_descriptor = + internal_static_google_cloud_metastore_v1alpha_Federation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_Federation_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_descriptor = + internal_static_google_cloud_metastore_v1alpha_Federation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_Federation_BackendMetastoresEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_metastore_v1alpha_BackendMetastore_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_BackendMetastore_descriptor, + new java.lang.String[] { "Name", "MetastoreType", }); + internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_ListFederationsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); + internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_ListFederationsResponse_descriptor, + new java.lang.String[] { "Federations", "NextPageToken", "Unreachable", }); + internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_GetFederationRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_CreateFederationRequest_descriptor, + new java.lang.String[] { "Parent", "FederationId", "Federation", "RequestId", }); + internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor, + new java.lang.String[] { "UpdateMask", "Federation", "RequestId", }); + internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1alpha_DeleteFederationRequest_descriptor, + new java.lang.String[] { "Name", "RequestId", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.metastore.v1alpha.MetastoreProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreProto.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreProto.java new file mode 100644 index 000000000000..36ea5d38fd24 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MetastoreProto.java @@ -0,0 +1,1096 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public final class MetastoreProto { + private MetastoreProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Service_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Service_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Service_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Service_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_MetadataIntegration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_DataCatalogConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_DataplexConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_DataplexConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_DataplexConfig_LakeResourcesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_DataplexConfig_LakeResourcesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Lake_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Lake_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_MaintenanceWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_ConfigOverridesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_ConfigOverridesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_HiveMetastoreConfig_AuxiliaryVersionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_KerberosConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_KerberosConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Secret_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Secret_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_AuxiliaryVersionConfig_ConfigOverridesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_NetworkConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_MetadataManagementActivity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_MetadataImport_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_MetadataImport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_MetadataImport_DatabaseDump_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_MetadataExport_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_MetadataExport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Backup_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Backup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_Restore_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_Restore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ScalingConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ScalingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ListServicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ListServicesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_GetServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_CreateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_DeleteServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ListMetadataImportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_GetMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_CreateMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ListBackupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ListBackupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_GetBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_CreateBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_DeleteBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ExportMetadataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_LocationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_LocationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_DatabaseDumpSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_AlterMetadataResourceLocationResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n.google/cloud/metastore/v1alpha/metasto" + + "re.proto\022\036google.cloud.metastore.v1alpha" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\032#goo" + + "gle/longrunning/operations.proto\032\033google" + + "/protobuf/empty.proto\032 google/protobuf/f" + + "ield_mask.proto\032\037google/protobuf/timesta" + + "mp.proto\032\036google/protobuf/wrappers.proto" + + "\032\033google/type/dayofweek.proto\"\242\016\n\007Servic" + + "e\022T\n\025hive_metastore_config\030\005 \001(\01323.googl" + + "e.cloud.metastore.v1alpha.HiveMetastoreC" + + "onfigH\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_tim" + + "e\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\0224\n\013update_time\030\003 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\022C\n\006labels\030\004 \003(\01323.google." + + "cloud.metastore.v1alpha.Service.LabelsEn" + + "try\0227\n\007network\030\007 \001(\tB&\340A\005\372A \n\036compute.go" + + "ogleapis.com/Network\022\031\n\014endpoint_uri\030\010 \001" + + "(\tB\003\340A\003\022\014\n\004port\030\t \001(\005\022A\n\005state\030\n \001(\0162-.g" + + "oogle.cloud.metastore.v1alpha.Service.St" + + "ateB\003\340A\003\022\032\n\rstate_message\030\013 \001(\tB\003\340A\003\022\035\n\020" + + "artifact_gcs_uri\030\014 \001(\tB\003\340A\003\022:\n\004tier\030\r \001(" + + "\0162,.google.cloud.metastore.v1alpha.Servi" + + "ce.Tier\022Q\n\024metadata_integration\030\016 \001(\01323." + + "google.cloud.metastore.v1alpha.MetadataI" + + "ntegration\022M\n\022maintenance_window\030\017 \001(\01321" + + ".google.cloud.metastore.v1alpha.Maintena" + + "nceWindow\022\020\n\003uid\030\020 \001(\tB\003\340A\003\022e\n\034metadata_" + + "management_activity\030\021 \001(\0132:.google.cloud" + + ".metastore.v1alpha.MetadataManagementAct" + + "ivityB\003\340A\003\022T\n\017release_channel\030\023 \001(\01626.go" + + "ogle.cloud.metastore.v1alpha.Service.Rel" + + "easeChannelB\003\340A\005\022P\n\021encryption_config\030\024 " + + "\001(\01320.google.cloud.metastore.v1alpha.Enc" + + "ryptionConfigB\003\340A\005\022E\n\016network_config\030\025 \001" + + "(\0132-.google.cloud.metastore.v1alpha.Netw" + + "orkConfig\022P\n\rdatabase_type\030\026 \001(\01624.googl" + + "e.cloud.metastore.v1alpha.Service.Databa" + + "seTypeB\003\340A\005\022I\n\020telemetry_config\030\027 \001(\0132/." + + "google.cloud.metastore.v1alpha.Telemetry" + + "Config\022E\n\016scaling_config\030\030 \001(\0132-.google." + + "cloud.metastore.v1alpha.ScalingConfig\032-\n" + + "\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001\"~\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010" + + "CREATING\020\001\022\n\n\006ACTIVE\020\002\022\016\n\nSUSPENDING\020\003\022\r" + + "\n\tSUSPENDED\020\004\022\014\n\010UPDATING\020\005\022\014\n\010DELETING\020" + + "\006\022\t\n\005ERROR\020\007\";\n\004Tier\022\024\n\020TIER_UNSPECIFIED" + + "\020\000\022\r\n\tDEVELOPER\020\001\022\016\n\nENTERPRISE\020\003\"I\n\016Rel" + + "easeChannel\022\037\n\033RELEASE_CHANNEL_UNSPECIFI" + + "ED\020\000\022\n\n\006CANARY\020\001\022\n\n\006STABLE\020\002\"E\n\014Database" + + "Type\022\035\n\031DATABASE_TYPE_UNSPECIFIED\020\000\022\t\n\005M" + + "YSQL\020\001\022\013\n\007SPANNER\020\002:a\352A^\n metastore.goog" + + "leapis.com/Service\022:projects/{project}/l" + + "ocations/{location}/services/{service}B\022" + + "\n\020metastore_config\"\256\001\n\023MetadataIntegrati" + + "on\022N\n\023data_catalog_config\030\001 \001(\01321.google" + + ".cloud.metastore.v1alpha.DataCatalogConf" + + "ig\022G\n\017dataplex_config\030\002 \001(\0132..google.clo" + + "ud.metastore.v1alpha.DataplexConfig\"$\n\021D" + + "ataCatalogConfig\022\017\n\007enabled\030\002 \001(\010\"\307\001\n\016Da" + + "taplexConfig\022Y\n\016lake_resources\030\001 \003(\0132A.g" + + "oogle.cloud.metastore.v1alpha.DataplexCo" + + "nfig.LakeResourcesEntry\032Z\n\022LakeResources" + + "Entry\022\013\n\003key\030\001 \001(\t\0223\n\005value\030\002 \001(\0132$.goog" + + "le.cloud.metastore.v1alpha.Lake:\0028\001\"7\n\004L" + + "ake\022/\n\004name\030\001 \001(\tB!\372A\036\n\034dataplex.googlea" + + "pis.com/Lake\"r\n\021MaintenanceWindow\0220\n\013hou" + + "r_of_day\030\001 \001(\0132\033.google.protobuf.Int32Va" + + "lue\022+\n\013day_of_week\030\002 \001(\0162\026.google.type.D" + + "ayOfWeek\"\230\005\n\023HiveMetastoreConfig\022\024\n\007vers" + + "ion\030\001 \001(\tB\003\340A\005\022b\n\020config_overrides\030\002 \003(\013" + + "2H.google.cloud.metastore.v1alpha.HiveMe" + + "tastoreConfig.ConfigOverridesEntry\022G\n\017ke" + + "rberos_config\030\003 \001(\0132..google.cloud.metas" + + "tore.v1alpha.KerberosConfig\022_\n\021endpoint_" + + "protocol\030\004 \001(\0162D.google.cloud.metastore." + + "v1alpha.HiveMetastoreConfig.EndpointProt" + + "ocol\022f\n\022auxiliary_versions\030\005 \003(\0132J.googl" + + "e.cloud.metastore.v1alpha.HiveMetastoreC" + + "onfig.AuxiliaryVersionsEntry\0326\n\024ConfigOv" + + "erridesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001\032p\n\026AuxiliaryVersionsEntry\022\013\n\003key\030\001 " + + "\001(\t\022E\n\005value\030\002 \001(\01326.google.cloud.metast" + + "ore.v1alpha.AuxiliaryVersionConfig:\0028\001\"K" + + "\n\020EndpointProtocol\022!\n\035ENDPOINT_PROTOCOL_" + + "UNSPECIFIED\020\000\022\n\n\006THRIFT\020\001\022\010\n\004GRPC\020\002\"x\n\016K" + + "erberosConfig\0226\n\006keytab\030\001 \001(\0132&.google.c" + + "loud.metastore.v1alpha.Secret\022\021\n\tprincip" + + "al\030\002 \001(\t\022\033\n\023krb5_config_gcs_uri\030\003 \001(\t\")\n" + + "\006Secret\022\026\n\014cloud_secret\030\002 \001(\tH\000B\007\n\005value" + + "\"#\n\020EncryptionConfig\022\017\n\007kms_key\030\001 \001(\t\"\224\002" + + "\n\026AuxiliaryVersionConfig\022\017\n\007version\030\001 \001(" + + "\t\022e\n\020config_overrides\030\002 \003(\0132K.google.clo" + + "ud.metastore.v1alpha.AuxiliaryVersionCon" + + "fig.ConfigOverridesEntry\022J\n\016network_conf" + + "ig\030\003 \001(\0132-.google.cloud.metastore.v1alph" + + "a.NetworkConfigB\003\340A\003\0326\n\024ConfigOverridesE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\366\001\n" + + "\rNetworkConfig\022N\n\tconsumers\030\001 \003(\01326.goog" + + "le.cloud.metastore.v1alpha.NetworkConfig" + + ".ConsumerB\003\340A\005\022\035\n\025custom_routes_enabled\030" + + "\002 \001(\010\032v\n\010Consumer\022?\n\nsubnetwork\030\001 \001(\tB)\340" + + "A\005\372A#\n!compute.googleapis.com/Subnetwork" + + "H\000\022\031\n\014endpoint_uri\030\003 \001(\tB\003\340A\003B\016\n\014vpc_res" + + "ource\"\237\001\n\017TelemetryConfig\022M\n\nlog_format\030" + + "\001 \001(\01629.google.cloud.metastore.v1alpha.T" + + "elemetryConfig.LogFormat\"=\n\tLogFormat\022\032\n" + + "\026LOG_FORMAT_UNSPECIFIED\020\000\022\n\n\006LEGACY\020\001\022\010\n" + + "\004JSON\020\002\"\253\001\n\032MetadataManagementActivity\022M" + + "\n\020metadata_exports\030\001 \003(\0132..google.cloud." + + "metastore.v1alpha.MetadataExportB\003\340A\003\022>\n" + + "\010restores\030\002 \003(\0132\'.google.cloud.metastore" + + ".v1alpha.RestoreB\003\340A\003\"\224\007\n\016MetadataImport" + + "\022Y\n\rdatabase_dump\030\006 \001(\0132;.google.cloud.m" + + "etastore.v1alpha.MetadataImport.Database" + + "DumpB\003\340A\005H\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\023\n\013descri" + + "ption\030\002 \001(\t\0224\n\013create_time\030\003 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\0224\n\013update_time" + + "\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "1\n\010end_time\030\007 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022H\n\005state\030\005 \001(\01624.google.cloud" + + ".metastore.v1alpha.MetadataImport.StateB" + + "\003\340A\003\032\245\002\n\014DatabaseDump\022c\n\rdatabase_type\030\001" + + " \001(\0162H.google.cloud.metastore.v1alpha.Me" + + "tadataImport.DatabaseDump.DatabaseTypeB\002" + + "\030\001\022\017\n\007gcs_uri\030\002 \001(\t\022\033\n\017source_database\030\003" + + " \001(\tB\002\030\001\022H\n\004type\030\004 \001(\01625.google.cloud.me" + + "tastore.v1alpha.DatabaseDumpSpec.TypeB\003\340" + + "A\001\"8\n\014DatabaseType\022\035\n\031DATABASE_TYPE_UNSP" + + "ECIFIED\020\000\022\t\n\005MYSQL\020\001\"T\n\005State\022\025\n\021STATE_U" + + "NSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002" + + "\022\014\n\010UPDATING\020\003\022\n\n\006FAILED\020\004:\213\001\352A\207\001\n\'metas" + + "tore.googleapis.com/MetadataImport\022\\proj" + + "ects/{project}/locations/{location}/serv" + + "ices/{service}/metadataImports/{metadata" + + "_import}B\n\n\010metadata\"\244\003\n\016MetadataExport\022" + + "\"\n\023destination_gcs_uri\030\004 \001(\tB\003\340A\003H\000\0223\n\ns" + + "tart_time\030\001 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.prot" + + "obuf.TimestampB\003\340A\003\022H\n\005state\030\003 \001(\01624.goo" + + "gle.cloud.metastore.v1alpha.MetadataExpo" + + "rt.StateB\003\340A\003\022V\n\022database_dump_type\030\005 \001(" + + "\01625.google.cloud.metastore.v1alpha.Datab" + + "aseDumpSpec.TypeB\003\340A\003\"U\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020" + + "\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED\020\004B\r\n\013destinat" + + "ion\"\232\004\n\006Backup\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013cre" + + "ate_time\030\002 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\0221\n\010end_time\030\003 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022@\n\005state\030\004 \001(\0162,.goog" + + "le.cloud.metastore.v1alpha.Backup.StateB" + + "\003\340A\003\022F\n\020service_revision\030\005 \001(\0132\'.google." + + "cloud.metastore.v1alpha.ServiceB\003\340A\003\022\023\n\013" + + "description\030\006 \001(\t\022\037\n\022restoring_services\030" + + "\007 \003(\tB\003\340A\003\"a\n\005State\022\025\n\021STATE_UNSPECIFIED" + + "\020\000\022\014\n\010CREATING\020\001\022\014\n\010DELETING\020\002\022\n\n\006ACTIVE" + + "\020\003\022\n\n\006FAILED\020\004\022\r\n\tRESTORING\020\005:q\352An\n\037meta" + + "store.googleapis.com/Backup\022Kprojects/{p" + + "roject}/locations/{location}/services/{s" + + "ervice}/backups/{backup}\"\354\003\n\007Restore\0223\n\n" + + "start_time\030\001 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022A\n\005state\030\003 \001(\0162-.go" + + "ogle.cloud.metastore.v1alpha.Restore.Sta" + + "teB\003\340A\003\0227\n\006backup\030\004 \001(\tB\'\340A\003\372A!\n\037metasto" + + "re.googleapis.com/Backup\022F\n\004type\030\005 \001(\01623" + + ".google.cloud.metastore.v1alpha.Restore." + + "RestoreTypeB\003\340A\003\022\024\n\007details\030\006 \001(\tB\003\340A\003\"U" + + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNIN" + + "G\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCEL" + + "LED\020\004\"H\n\013RestoreType\022\034\n\030RESTORE_TYPE_UNS" + + "PECIFIED\020\000\022\010\n\004FULL\020\001\022\021\n\rMETADATA_ONLY\020\002\"" + + "\202\002\n\rScalingConfig\022S\n\rinstance_size\030\001 \001(\016" + + "2:.google.cloud.metastore.v1alpha.Scalin" + + "gConfig.InstanceSizeH\000\022\030\n\016scaling_factor" + + "\030\002 \001(\002H\000\"q\n\014InstanceSize\022\035\n\031INSTANCE_SIZ" + + "E_UNSPECIFIED\020\000\022\017\n\013EXTRA_SMALL\020\001\022\t\n\005SMAL" + + "L\020\002\022\n\n\006MEDIUM\020\003\022\t\n\005LARGE\020\004\022\017\n\013EXTRA_LARG" + + "E\020\005B\017\n\rscaling_model\"\254\001\n\023ListServicesReq" + + "uest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 metastore." + + "googleapis.com/Service\022\026\n\tpage_size\030\002 \001(" + + "\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filte" + + "r\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\177\n\024L" + + "istServicesResponse\0229\n\010services\030\001 \003(\0132\'." + + "google.cloud.metastore.v1alpha.Service\022\027" + + "\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003" + + " \003(\t\"K\n\021GetServiceRequest\0226\n\004name\030\001 \001(\tB" + + "(\340A\002\372A\"\n metastore.googleapis.com/Servic" + + "e\"\301\001\n\024CreateServiceRequest\0228\n\006parent\030\001 \001" + + "(\tB(\340A\002\372A\"\022 metastore.googleapis.com/Ser" + + "vice\022\027\n\nservice_id\030\002 \001(\tB\003\340A\002\022=\n\007service" + + "\030\003 \001(\0132\'.google.cloud.metastore.v1alpha." + + "ServiceB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\244\001" + + "\n\024UpdateServiceRequest\0224\n\013update_mask\030\001 " + + "\001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022=\n\007" + + "service\030\002 \001(\0132\'.google.cloud.metastore.v" + + "1alpha.ServiceB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB" + + "\003\340A\001\"g\n\024DeleteServiceRequest\0226\n\004name\030\001 \001" + + "(\tB(\340A\002\372A\"\n metastore.googleapis.com/Ser" + + "vice\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\272\001\n\032ListMe" + + "tadataImportsRequest\022?\n\006parent\030\001 \001(\tB/\340A" + + "\002\372A)\022\'metastore.googleapis.com/MetadataI" + + "mport\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_to" + + "ken\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010o" + + "rder_by\030\005 \001(\tB\003\340A\001\"\225\001\n\033ListMetadataImpor" + + "tsResponse\022H\n\020metadata_imports\030\001 \003(\0132..g" + + "oogle.cloud.metastore.v1alpha.MetadataIm" + + "port\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreach" + + "able\030\003 \003(\t\"Y\n\030GetMetadataImportRequest\022=" + + "\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'metastore.googleap" + + "is.com/MetadataImport\"\346\001\n\033CreateMetadata" + + "ImportRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\022\'m" + + "etastore.googleapis.com/MetadataImport\022\037" + + "\n\022metadata_import_id\030\002 \001(\tB\003\340A\002\022L\n\017metad" + + "ata_import\030\003 \001(\0132..google.cloud.metastor" + + "e.v1alpha.MetadataImportB\003\340A\002\022\027\n\nrequest" + + "_id\030\004 \001(\tB\003\340A\001\"\272\001\n\033UpdateMetadataImportR" + + "equest\0224\n\013update_mask\030\001 \001(\0132\032.google.pro" + + "tobuf.FieldMaskB\003\340A\002\022L\n\017metadata_import\030" + + "\002 \001(\0132..google.cloud.metastore.v1alpha.M" + + "etadataImportB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003" + + "\340A\001\"\252\001\n\022ListBackupsRequest\0227\n\006parent\030\001 \001" + + "(\tB\'\340A\002\372A!\022\037metastore.googleapis.com/Bac" + + "kup\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + + "n\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010ord" + + "er_by\030\005 \001(\tB\003\340A\001\"|\n\023ListBackupsResponse\022" + + "7\n\007backups\030\001 \003(\0132&.google.cloud.metastor" + + "e.v1alpha.Backup\022\027\n\017next_page_token\030\002 \001(" + + "\t\022\023\n\013unreachable\030\003 \003(\t\"I\n\020GetBackupReque" + + "st\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037metastore.goog" + + "leapis.com/Backup\"\274\001\n\023CreateBackupReques" + + "t\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037metastore.goo" + + "gleapis.com/Backup\022\026\n\tbackup_id\030\002 \001(\tB\003\340" + + "A\002\022;\n\006backup\030\003 \001(\0132&.google.cloud.metast" + + "ore.v1alpha.BackupB\003\340A\002\022\027\n\nrequest_id\030\004 " + + "\001(\tB\003\340A\001\"e\n\023DeleteBackupRequest\0225\n\004name\030" + + "\001 \001(\tB\'\340A\002\372A!\n\037metastore.googleapis.com/" + + "Backup\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\364\001\n\025Expo" + + "rtMetadataRequest\022 \n\026destination_gcs_fol" + + "der\030\002 \001(\tH\000\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n me" + + "tastore.googleapis.com/Service\022\027\n\nreques" + + "t_id\030\003 \001(\tB\003\340A\001\022V\n\022database_dump_type\030\004 " + + "\001(\01625.google.cloud.metastore.v1alpha.Dat" + + "abaseDumpSpec.TypeB\003\340A\001B\r\n\013destination\"\364" + + "\001\n\025RestoreServiceRequest\0229\n\007service\030\001 \001(" + + "\tB(\340A\002\372A\"\n metastore.googleapis.com/Serv" + + "ice\0227\n\006backup\030\002 \001(\tB\'\340A\002\372A!\n\037metastore.g" + + "oogleapis.com/Backup\022N\n\014restore_type\030\003 \001" + + "(\01623.google.cloud.metastore.v1alpha.Rest" + + "ore.RestoreTypeB\003\340A\001\022\027\n\nrequest_id\030\004 \001(\t" + + "B\003\340A\001\"\200\002\n\021OperationMetadata\0224\n\013create_ti" + + "me\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\0221\n\010end_time\030\002 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004ver" + + "b\030\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A" + + "\003\022#\n\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030" + + "\n\013api_version\030\007 \001(\tB\003\340A\003\"\301\001\n\020LocationMet" + + "adata\022p\n!supported_hive_metastore_versio" + + "ns\030\001 \003(\0132E.google.cloud.metastore.v1alph" + + "a.LocationMetadata.HiveMetastoreVersion\032" + + ";\n\024HiveMetastoreVersion\022\017\n\007version\030\001 \001(\t" + + "\022\022\n\nis_default\030\002 \001(\010\"E\n\020DatabaseDumpSpec" + + "\"1\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005MYSQL\020" + + "\001\022\010\n\004AVRO\020\002\"P\n\026RemoveIamPolicyRequest\022\033\n" + + "\010resource\030\001 \001(\tB\t\340A\002\372A\003\n\001*\022\031\n\014asynchrono" + + "us\030\002 \001(\010B\003\340A\001\"*\n\027RemoveIamPolicyResponse" + + "\022\017\n\007success\030\001 \001(\010\"e\n\024QueryMetadataReques" + + "t\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n metastore.go" + + "ogleapis.com/Service\022\022\n\005query\030\002 \001(\tB\003\340A\002" + + "\"4\n\025QueryMetadataResponse\022\033\n\023result_mani" + + "fest_uri\030\001 \001(\t\"\250\001\n\032MoveTableToDatabaseRe" + + "quest\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n metastor" + + "e.googleapis.com/Service\022\027\n\ntable_name\030\002" + + " \001(\tB\003\340A\002\022\024\n\007db_name\030\003 \001(\tB\003\340A\002\022 \n\023desti" + + "nation_db_name\030\004 \001(\tB\003\340A\002\"\035\n\033MoveTableTo" + + "DatabaseResponse\"\230\001\n$AlterMetadataResour" + + "ceLocationRequest\0229\n\007service\030\001 \001(\tB(\340A\002\372" + + "A\"\n metastore.googleapis.com/Service\022\032\n\r" + + "resource_name\030\002 \001(\tB\003\340A\002\022\031\n\014location_uri" + + "\030\003 \001(\tB\003\340A\002\"\'\n%AlterMetadataResourceLoca" + + "tionResponse2\310%\n\021DataprocMetastore\022\275\001\n\014L" + + "istServices\0223.google.cloud.metastore.v1a" + + "lpha.ListServicesRequest\0324.google.cloud." + + "metastore.v1alpha.ListServicesResponse\"B" + + "\202\323\344\223\0023\0221/v1alpha/{parent=projects/*/loca" + + "tions/*}/services\332A\006parent\022\252\001\n\nGetServic" + + "e\0221.google.cloud.metastore.v1alpha.GetSe" + + "rviceRequest\032\'.google.cloud.metastore.v1" + + "alpha.Service\"@\202\323\344\223\0023\0221/v1alpha/{name=pr" + + "ojects/*/locations/*/services/*}\332A\004name\022" + + "\203\002\n\rCreateService\0224.google.cloud.metasto" + + "re.v1alpha.CreateServiceRequest\032\035.google" + + ".longrunning.Operation\"\234\001\202\323\344\223\002<\"1/v1alph" + + "a/{parent=projects/*/locations/*}/servic" + + "es:\007service\332A\031parent,service,service_id\312" + + "A;\n\007Service\0220google.cloud.metastore.v1al" + + "pha.OperationMetadata\022\205\002\n\rUpdateService\022" + + "4.google.cloud.metastore.v1alpha.UpdateS" + + "erviceRequest\032\035.google.longrunning.Opera" + + "tion\"\236\001\202\323\344\223\002D29/v1alpha/{service.name=pr" + + "ojects/*/locations/*/services/*}:\007servic" + + "e\332A\023service,update_mask\312A;\n\007Service\0220goo" + + "gle.cloud.metastore.v1alpha.OperationMet" + + "adata\022\363\001\n\rDeleteService\0224.google.cloud.m" + + "etastore.v1alpha.DeleteServiceRequest\032\035." + + "google.longrunning.Operation\"\214\001\202\323\344\223\0023*1/" + + "v1alpha/{name=projects/*/locations/*/ser" + + "vices/*}\332A\004name\312AI\n\025google.protobuf.Empt" + + "y\0220google.cloud.metastore.v1alpha.Operat" + + "ionMetadata\022\344\001\n\023ListMetadataImports\022:.go" + + "ogle.cloud.metastore.v1alpha.ListMetadat" + + "aImportsRequest\032;.google.cloud.metastore" + + ".v1alpha.ListMetadataImportsResponse\"T\202\323" + + "\344\223\002E\022C/v1alpha/{parent=projects/*/locati" + + "ons/*/services/*}/metadataImports\332A\006pare" + + "nt\022\321\001\n\021GetMetadataImport\0228.google.cloud." + + "metastore.v1alpha.GetMetadataImportReque" + + "st\032..google.cloud.metastore.v1alpha.Meta" + + "dataImport\"R\202\323\344\223\002E\022C/v1alpha/{name=proje" + + "cts/*/locations/*/services/*/metadataImp" + + "orts/*}\332A\004name\022\302\002\n\024CreateMetadataImport\022" + + ";.google.cloud.metastore.v1alpha.CreateM" + + "etadataImportRequest\032\035.google.longrunnin" + + "g.Operation\"\315\001\202\323\344\223\002V\"C/v1alpha/{parent=p" + + "rojects/*/locations/*/services/*}/metada" + + "taImports:\017metadata_import\332A)parent,meta" + + "data_import,metadata_import_id\312AB\n\016Metad" + + "ataImport\0220google.cloud.metastore.v1alph" + + "a.OperationMetadata\022\304\002\n\024UpdateMetadataIm" + + "port\022;.google.cloud.metastore.v1alpha.Up" + + "dateMetadataImportRequest\032\035.google.longr" + + "unning.Operation\"\317\001\202\323\344\223\002f2S/v1alpha/{met" + + "adata_import.name=projects/*/locations/*" + + "/services/*/metadataImports/*}:\017metadata" + + "_import\332A\033metadata_import,update_mask\312AB" + + "\n\016MetadataImport\0220google.cloud.metastore" + + ".v1alpha.OperationMetadata\022\374\001\n\016ExportMet" + + "adata\0225.google.cloud.metastore.v1alpha.E" + + "xportMetadataRequest\032\035.google.longrunnin" + + "g.Operation\"\223\001\202\323\344\223\002H\"C/v1alpha/{service=" + + "projects/*/locations/*/services/*}:expor" + + "tMetadata:\001*\312AB\n\016MetadataExport\0220google." + + "cloud.metastore.v1alpha.OperationMetadat" + + "a\022\377\001\n\016RestoreService\0225.google.cloud.meta" + + "store.v1alpha.RestoreServiceRequest\032\035.go" + + "ogle.longrunning.Operation\"\226\001\202\323\344\223\002A\" + * Request message for + * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase]. + * + * + * Protobuf type {@code google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest} + */ +public final class MoveTableToDatabaseRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) + MoveTableToDatabaseRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use MoveTableToDatabaseRequest.newBuilder() to construct. + private MoveTableToDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MoveTableToDatabaseRequest() { + service_ = ""; + tableName_ = ""; + dbName_ = ""; + destinationDbName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MoveTableToDatabaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.class, com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object tableName_ = ""; + /** + *
+   * Required. The name of the table to be moved.
+   * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tableName. + */ + @java.lang.Override + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } + } + /** + *
+   * Required. The name of the table to be moved.
+   * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tableName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DB_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object dbName_ = ""; + /** + *
+   * Required. The name of the database where the table resides.
+   * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The dbName. + */ + @java.lang.Override + public java.lang.String getDbName() { + java.lang.Object ref = dbName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dbName_ = s; + return s; + } + } + /** + *
+   * Required. The name of the database where the table resides.
+   * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dbName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDbNameBytes() { + java.lang.Object ref = dbName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dbName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_DB_NAME_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object destinationDbName_ = ""; + /** + *
+   * Required. The name of the database where the table should be moved.
+   * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationDbName. + */ + @java.lang.Override + public java.lang.String getDestinationDbName() { + java.lang.Object ref = destinationDbName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationDbName_ = s; + return s; + } + } + /** + *
+   * Required. The name of the database where the table should be moved.
+   * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationDbName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationDbNameBytes() { + java.lang.Object ref = destinationDbName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationDbName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dbName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationDbName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destinationDbName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dbName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationDbName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destinationDbName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest other = (com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getTableName() + .equals(other.getTableName())) return false; + if (!getDbName() + .equals(other.getDbName())) return false; + if (!getDestinationDbName() + .equals(other.getDestinationDbName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + hash = (37 * hash) + DB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDbName().hashCode(); + hash = (37 * hash) + DESTINATION_DB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDestinationDbName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.class, com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + tableName_ = ""; + dbName_ = ""; + destinationDbName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest build() { + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest buildPartial() { + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest result = new com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tableName_ = tableName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dbName_ = dbName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.destinationDbName_ = destinationDbName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest other) { + if (other == com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTableName().isEmpty()) { + tableName_ = other.tableName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDbName().isEmpty()) { + dbName_ = other.dbName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDestinationDbName().isEmpty()) { + destinationDbName_ = other.destinationDbName_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + tableName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + dbName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + destinationDbName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object tableName_ = ""; + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tableName. + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tableName. + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The tableName to set. + * @return This builder for chaining. + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tableName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTableName() { + tableName_ = getDefaultInstance().getTableName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for tableName to set. + * @return This builder for chaining. + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tableName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object dbName_ = ""; + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The dbName. + */ + public java.lang.String getDbName() { + java.lang.Object ref = dbName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dbName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dbName. + */ + public com.google.protobuf.ByteString + getDbNameBytes() { + java.lang.Object ref = dbName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dbName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The dbName to set. + * @return This builder for chaining. + */ + public Builder setDbName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + dbName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDbName() { + dbName_ = getDefaultInstance().getDbName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for dbName to set. + * @return This builder for chaining. + */ + public Builder setDbNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + dbName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object destinationDbName_ = ""; + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationDbName. + */ + public java.lang.String getDestinationDbName() { + java.lang.Object ref = destinationDbName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationDbName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationDbName. + */ + public com.google.protobuf.ByteString + getDestinationDbNameBytes() { + java.lang.Object ref = destinationDbName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationDbName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param value The destinationDbName to set. + * @return This builder for chaining. + */ + public Builder setDestinationDbName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationDbName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDestinationDbName() { + destinationDbName_ = getDefaultInstance().getDestinationDbName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for destinationDbName to set. + * @return This builder for chaining. + */ + public Builder setDestinationDbNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationDbName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) + private static final com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest(); + } + + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveTableToDatabaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseRequestOrBuilder.java new file mode 100644 index 000000000000..dc5c89d7383c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseRequestOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface MoveTableToDatabaseRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Required. The name of the table to be moved.
+   * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tableName. + */ + java.lang.String getTableName(); + /** + *
+   * Required. The name of the table to be moved.
+   * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tableName. + */ + com.google.protobuf.ByteString + getTableNameBytes(); + + /** + *
+   * Required. The name of the database where the table resides.
+   * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The dbName. + */ + java.lang.String getDbName(); + /** + *
+   * Required. The name of the database where the table resides.
+   * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dbName. + */ + com.google.protobuf.ByteString + getDbNameBytes(); + + /** + *
+   * Required. The name of the database where the table should be moved.
+   * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationDbName. + */ + java.lang.String getDestinationDbName(); + /** + *
+   * Required. The name of the database where the table should be moved.
+   * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationDbName. + */ + com.google.protobuf.ByteString + getDestinationDbNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponse.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponse.java new file mode 100644 index 000000000000..d091052817c6 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponse.java @@ -0,0 +1,411 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Response message for
+ * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse} + */ +public final class MoveTableToDatabaseResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) + MoveTableToDatabaseResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use MoveTableToDatabaseResponse.newBuilder() to construct. + private MoveTableToDatabaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MoveTableToDatabaseResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MoveTableToDatabaseResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.class, com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse other = (com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.class, com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse build() { + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse buildPartial() { + com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse result = new com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) { + return mergeFrom((com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse other) { + if (other == com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) + private static final com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse(); + } + + public static com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveTableToDatabaseResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponseOrBuilder.java new file mode 100644 index 000000000000..65234fe82933 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/MoveTableToDatabaseResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface MoveTableToDatabaseResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfig.java new file mode 100644 index 000000000000..f7f4e0383ce7 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfig.java @@ -0,0 +1,1966 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Network configuration for the Dataproc Metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.NetworkConfig} + */ +public final class NetworkConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.NetworkConfig) + NetworkConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use NetworkConfig.newBuilder() to construct. + private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NetworkConfig() { + consumers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NetworkConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.NetworkConfig.class, com.google.cloud.metastore.v1alpha.NetworkConfig.Builder.class); + } + + public interface ConsumerOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + boolean hasSubnetwork(); + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString + getSubnetworkBytes(); + + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.VpcResourceCase getVpcResourceCase(); + } + /** + *
+   * Contains information of the customer's network configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.NetworkConfig.Consumer} + */ + public static final class Consumer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) + ConsumerOrBuilder { + private static final long serialVersionUID = 0L; + // Use Consumer.newBuilder() to construct. + private Consumer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Consumer() { + endpointUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Consumer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.class, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder.class); + } + + private int vpcResourceCase_ = 0; + private java.lang.Object vpcResource_; + public enum VpcResourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUBNETWORK(1), + VPCRESOURCE_NOT_SET(0); + private final int value; + private VpcResourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VpcResourceCase valueOf(int value) { + return forNumber(value); + } + + public static VpcResourceCase forNumber(int value) { + switch (value) { + case 1: return SUBNETWORK; + case 0: return VPCRESOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public VpcResourceCase + getVpcResourceCase() { + return VpcResourceCase.forNumber( + vpcResourceCase_); + } + + public static final int SUBNETWORK_FIELD_NUMBER = 1; + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + public boolean hasSubnetwork() { + return vpcResourceCase_ == 1; + } + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (vpcResourceCase_ == 1) { + vpcResource_ = s; + } + return s; + } + } + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString + getSubnetworkBytes() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (vpcResourceCase_ == 1) { + vpcResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (vpcResourceCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vpcResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (vpcResourceCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vpcResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer other = (com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer) obj; + + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (!getVpcResourceCase().equals(other.getVpcResourceCase())) return false; + switch (vpcResourceCase_) { + case 1: + if (!getSubnetwork() + .equals(other.getSubnetwork())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + switch (vpcResourceCase_) { + case 1: + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Contains information of the customer's network configurations.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.NetworkConfig.Consumer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) + com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.class, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointUri_ = ""; + vpcResourceCase_ = 0; + vpcResource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer build() { + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer buildPartial() { + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer result = new com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endpointUri_ = endpointUri_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer result) { + result.vpcResourceCase_ = vpcResourceCase_; + result.vpcResource_ = this.vpcResource_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer) { + return mergeFrom((com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer other) { + if (other == com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.getDefaultInstance()) return this; + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getVpcResourceCase()) { + case SUBNETWORK: { + vpcResourceCase_ = 1; + vpcResource_ = other.vpcResource_; + onChanged(); + break; + } + case VPCRESOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + vpcResourceCase_ = 1; + vpcResource_ = s; + break; + } // case 10 + case 26: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int vpcResourceCase_ = 0; + private java.lang.Object vpcResource_; + public VpcResourceCase + getVpcResourceCase() { + return VpcResourceCase.forNumber( + vpcResourceCase_); + } + + public Builder clearVpcResource() { + vpcResourceCase_ = 0; + vpcResource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + @java.lang.Override + public boolean hasSubnetwork() { + return vpcResourceCase_ == 1; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (vpcResourceCase_ == 1) { + vpcResource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubnetworkBytes() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (vpcResourceCase_ == 1) { + vpcResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + vpcResourceCase_ = 1; + vpcResource_ = value; + onChanged(); + return this; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + if (vpcResourceCase_ == 1) { + vpcResourceCase_ = 0; + vpcResource_ = null; + onChanged(); + } + return this; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + vpcResourceCase_ = 1; + vpcResource_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.NetworkConfig.Consumer) + private static final com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer(); + } + + public static com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Consumer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CONSUMERS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List consumers_; + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public java.util.List getConsumersList() { + return consumers_; + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public java.util.List + getConsumersOrBuilderList() { + return consumers_; + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public int getConsumersCount() { + return consumers_.size(); + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getConsumers(int index) { + return consumers_.get(index); + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index) { + return consumers_.get(index); + } + + public static final int CUSTOM_ROUTES_ENABLED_FIELD_NUMBER = 2; + private boolean customRoutesEnabled_ = false; + /** + *
+   * Enables custom routes to be imported and exported for the Dataproc
+   * Metastore service's peered VPC network.
+   * 
+ * + * bool custom_routes_enabled = 2; + * @return The customRoutesEnabled. + */ + @java.lang.Override + public boolean getCustomRoutesEnabled() { + return customRoutesEnabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < consumers_.size(); i++) { + output.writeMessage(1, consumers_.get(i)); + } + if (customRoutesEnabled_ != false) { + output.writeBool(2, customRoutesEnabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < consumers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, consumers_.get(i)); + } + if (customRoutesEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, customRoutesEnabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.NetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.NetworkConfig other = (com.google.cloud.metastore.v1alpha.NetworkConfig) obj; + + if (!getConsumersList() + .equals(other.getConsumersList())) return false; + if (getCustomRoutesEnabled() + != other.getCustomRoutesEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConsumersCount() > 0) { + hash = (37 * hash) + CONSUMERS_FIELD_NUMBER; + hash = (53 * hash) + getConsumersList().hashCode(); + } + hash = (37 * hash) + CUSTOM_ROUTES_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCustomRoutesEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.NetworkConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Network configuration for the Dataproc Metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.NetworkConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.NetworkConfig) + com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.NetworkConfig.class, com.google.cloud.metastore.v1alpha.NetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.NetworkConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (consumersBuilder_ == null) { + consumers_ = java.util.Collections.emptyList(); + } else { + consumers_ = null; + consumersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + customRoutesEnabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_NetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig build() { + com.google.cloud.metastore.v1alpha.NetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig buildPartial() { + com.google.cloud.metastore.v1alpha.NetworkConfig result = new com.google.cloud.metastore.v1alpha.NetworkConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1alpha.NetworkConfig result) { + if (consumersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + consumers_ = java.util.Collections.unmodifiableList(consumers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.consumers_ = consumers_; + } else { + result.consumers_ = consumersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.NetworkConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.customRoutesEnabled_ = customRoutesEnabled_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.NetworkConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.NetworkConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.NetworkConfig other) { + if (other == com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance()) return this; + if (consumersBuilder_ == null) { + if (!other.consumers_.isEmpty()) { + if (consumers_.isEmpty()) { + consumers_ = other.consumers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConsumersIsMutable(); + consumers_.addAll(other.consumers_); + } + onChanged(); + } + } else { + if (!other.consumers_.isEmpty()) { + if (consumersBuilder_.isEmpty()) { + consumersBuilder_.dispose(); + consumersBuilder_ = null; + consumers_ = other.consumers_; + bitField0_ = (bitField0_ & ~0x00000001); + consumersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConsumersFieldBuilder() : null; + } else { + consumersBuilder_.addAllMessages(other.consumers_); + } + } + } + if (other.getCustomRoutesEnabled() != false) { + setCustomRoutesEnabled(other.getCustomRoutesEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer m = + input.readMessage( + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.parser(), + extensionRegistry); + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(m); + } else { + consumersBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: { + customRoutesEnabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List consumers_ = + java.util.Collections.emptyList(); + private void ensureConsumersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + consumers_ = new java.util.ArrayList(consumers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder> consumersBuilder_; + + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List getConsumersList() { + if (consumersBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumers_); + } else { + return consumersBuilder_.getMessageList(); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public int getConsumersCount() { + if (consumersBuilder_ == null) { + return consumers_.size(); + } else { + return consumersBuilder_.getCount(); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getConsumers(int index) { + if (consumersBuilder_ == null) { + return consumers_.get(index); + } else { + return consumersBuilder_.getMessage(index); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setConsumers( + int index, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.set(index, value); + onChanged(); + } else { + consumersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setConsumers( + int index, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.set(index, builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers(com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.add(value); + onChanged(); + } else { + consumersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + int index, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.add(index, value); + onChanged(); + } else { + consumersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + int index, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(index, builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addAllConsumers( + java.lang.Iterable values) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumers_); + onChanged(); + } else { + consumersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearConsumers() { + if (consumersBuilder_ == null) { + consumers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + consumersBuilder_.clear(); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder removeConsumers(int index) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.remove(index); + onChanged(); + } else { + consumersBuilder_.remove(index); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder getConsumersBuilder( + int index) { + return getConsumersFieldBuilder().getBuilder(index); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index) { + if (consumersBuilder_ == null) { + return consumers_.get(index); } else { + return consumersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List + getConsumersOrBuilderList() { + if (consumersBuilder_ != null) { + return consumersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumers_); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder addConsumersBuilder() { + return getConsumersFieldBuilder().addBuilder( + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.getDefaultInstance()); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder addConsumersBuilder( + int index) { + return getConsumersFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.getDefaultInstance()); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List + getConsumersBuilderList() { + return getConsumersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder> + getConsumersFieldBuilder() { + if (consumersBuilder_ == null) { + consumersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer, com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder>( + consumers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + consumers_ = null; + } + return consumersBuilder_; + } + + private boolean customRoutesEnabled_ ; + /** + *
+     * Enables custom routes to be imported and exported for the Dataproc
+     * Metastore service's peered VPC network.
+     * 
+ * + * bool custom_routes_enabled = 2; + * @return The customRoutesEnabled. + */ + @java.lang.Override + public boolean getCustomRoutesEnabled() { + return customRoutesEnabled_; + } + /** + *
+     * Enables custom routes to be imported and exported for the Dataproc
+     * Metastore service's peered VPC network.
+     * 
+ * + * bool custom_routes_enabled = 2; + * @param value The customRoutesEnabled to set. + * @return This builder for chaining. + */ + public Builder setCustomRoutesEnabled(boolean value) { + + customRoutesEnabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Enables custom routes to be imported and exported for the Dataproc
+     * Metastore service's peered VPC network.
+     * 
+ * + * bool custom_routes_enabled = 2; + * @return This builder for chaining. + */ + public Builder clearCustomRoutesEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + customRoutesEnabled_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.NetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.NetworkConfig) + private static final com.google.cloud.metastore.v1alpha.NetworkConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.NetworkConfig(); + } + + public static com.google.cloud.metastore.v1alpha.NetworkConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfigOrBuilder.java new file mode 100644 index 000000000000..0a569bf7f0b9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkConfigOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface NetworkConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.NetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + java.util.List + getConsumersList(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1alpha.NetworkConfig.Consumer getConsumers(int index); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + int getConsumersCount(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + java.util.List + getConsumersOrBuilderList(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1alpha.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index); + + /** + *
+   * Enables custom routes to be imported and exported for the Dataproc
+   * Metastore service's peered VPC network.
+   * 
+ * + * bool custom_routes_enabled = 2; + * @return The customRoutesEnabled. + */ + boolean getCustomRoutesEnabled(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadata.java new file mode 100644 index 000000000000..ecb82eaf7015 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadata.java @@ -0,0 +1,1629 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Represents the metadata of a long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.OperationMetadata.class, com.google.cloud.metastore.v1alpha.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + *
+   * Output only. Identifies whether the caller has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.OperationMetadata other = (com.google.cloud.metastore.v1alpha.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getTarget() + .equals(other.getTarget())) return false; + if (!getVerb() + .equals(other.getVerb())) return false; + if (!getStatusMessage() + .equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() + != other.getRequestedCancellation()) return false; + if (!getApiVersion() + .equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the metadata of a long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.OperationMetadata) + com.google.cloud.metastore.v1alpha.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.OperationMetadata.class, com.google.cloud.metastore.v1alpha.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.OperationMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.OperationMetadata build() { + com.google.cloud.metastore.v1alpha.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.OperationMetadata buildPartial() { + com.google.cloud.metastore.v1alpha.OperationMetadata result = new com.google.cloud.metastore.v1alpha.OperationMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.OperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.OperationMetadata) { + return mergeFrom((com.google.cloud.metastore.v1alpha.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.OperationMetadata other) { + if (other == com.google.cloud.metastore.v1alpha.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString + getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_ ; + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString + getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.OperationMetadata) + private static final com.google.cloud.metastore.v1alpha.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.OperationMetadata(); + } + + public static com.google.cloud.metastore.v1alpha.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadataOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..58a5d3cd0d70 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/OperationMetadataOrBuilder.java @@ -0,0 +1,157 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + java.lang.String getTarget(); + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + java.lang.String getVerb(); + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + com.google.protobuf.ByteString + getVerbBytes(); + + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString + getStatusMessageBytes(); + + /** + *
+   * Output only. Identifies whether the caller has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString + getApiVersionBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequest.java new file mode 100644 index 000000000000..18f7091c9c2f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequest.java @@ -0,0 +1,767 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.QueryMetadataRequest} + */ +public final class QueryMetadataRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.QueryMetadataRequest) + QueryMetadataRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryMetadataRequest.newBuilder() to construct. + private QueryMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryMetadataRequest() { + service_ = ""; + query_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryMetadataRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.QueryMetadataRequest.class, com.google.cloud.metastore.v1alpha.QueryMetadataRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to query
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to query
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + /** + *
+   * Required. A read-only SQL query to execute against the metadata database.
+   * The query cannot change or mutate the data.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + *
+   * Required. A read-only SQL query to execute against the metadata database.
+   * The query cannot change or mutate the data.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.QueryMetadataRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.QueryMetadataRequest other = (com.google.cloud.metastore.v1alpha.QueryMetadataRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.QueryMetadataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.QueryMetadataRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.QueryMetadataRequest) + com.google.cloud.metastore.v1alpha.QueryMetadataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.QueryMetadataRequest.class, com.google.cloud.metastore.v1alpha.QueryMetadataRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.QueryMetadataRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + query_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.QueryMetadataRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.QueryMetadataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.QueryMetadataRequest build() { + com.google.cloud.metastore.v1alpha.QueryMetadataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.QueryMetadataRequest buildPartial() { + com.google.cloud.metastore.v1alpha.QueryMetadataRequest result = new com.google.cloud.metastore.v1alpha.QueryMetadataRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.QueryMetadataRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = query_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.QueryMetadataRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.QueryMetadataRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.QueryMetadataRequest other) { + if (other == com.google.cloud.metastore.v1alpha.QueryMetadataRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.QueryMetadataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.QueryMetadataRequest) + private static final com.google.cloud.metastore.v1alpha.QueryMetadataRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.QueryMetadataRequest(); + } + + public static com.google.cloud.metastore.v1alpha.QueryMetadataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryMetadataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.QueryMetadataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequestOrBuilder.java new file mode 100644 index 000000000000..ba0ee200a1f8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataRequestOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface QueryMetadataRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.QueryMetadataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to query
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to query
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Required. A read-only SQL query to execute against the metadata database.
+   * The query cannot change or mutate the data.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+   * Required. A read-only SQL query to execute against the metadata database.
+   * The query cannot change or mutate the data.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponse.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponse.java new file mode 100644 index 000000000000..4d76b3c4fe0f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponse.java @@ -0,0 +1,603 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Response message for
+ * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.QueryMetadataResponse} + */ +public final class QueryMetadataResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.QueryMetadataResponse) + QueryMetadataResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryMetadataResponse.newBuilder() to construct. + private QueryMetadataResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryMetadataResponse() { + resultManifestUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryMetadataResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.QueryMetadataResponse.class, com.google.cloud.metastore.v1alpha.QueryMetadataResponse.Builder.class); + } + + public static final int RESULT_MANIFEST_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resultManifestUri_ = ""; + /** + *
+   * The manifest URI  is link to a JSON instance in Cloud Storage.
+   * This instance manifests immediately along with QueryMetadataResponse. The
+   * content of the URI is not retriable until the long-running operation query
+   * against the metadata finishes.
+   * 
+ * + * string result_manifest_uri = 1; + * @return The resultManifestUri. + */ + @java.lang.Override + public java.lang.String getResultManifestUri() { + java.lang.Object ref = resultManifestUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resultManifestUri_ = s; + return s; + } + } + /** + *
+   * The manifest URI  is link to a JSON instance in Cloud Storage.
+   * This instance manifests immediately along with QueryMetadataResponse. The
+   * content of the URI is not retriable until the long-running operation query
+   * against the metadata finishes.
+   * 
+ * + * string result_manifest_uri = 1; + * @return The bytes for resultManifestUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResultManifestUriBytes() { + java.lang.Object ref = resultManifestUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resultManifestUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resultManifestUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resultManifestUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resultManifestUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resultManifestUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.QueryMetadataResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.QueryMetadataResponse other = (com.google.cloud.metastore.v1alpha.QueryMetadataResponse) obj; + + if (!getResultManifestUri() + .equals(other.getResultManifestUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESULT_MANIFEST_URI_FIELD_NUMBER; + hash = (53 * hash) + getResultManifestUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.QueryMetadataResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.QueryMetadataResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.QueryMetadataResponse) + com.google.cloud.metastore.v1alpha.QueryMetadataResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.QueryMetadataResponse.class, com.google.cloud.metastore.v1alpha.QueryMetadataResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.QueryMetadataResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resultManifestUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.QueryMetadataResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.QueryMetadataResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.QueryMetadataResponse build() { + com.google.cloud.metastore.v1alpha.QueryMetadataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.QueryMetadataResponse buildPartial() { + com.google.cloud.metastore.v1alpha.QueryMetadataResponse result = new com.google.cloud.metastore.v1alpha.QueryMetadataResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.QueryMetadataResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resultManifestUri_ = resultManifestUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.QueryMetadataResponse) { + return mergeFrom((com.google.cloud.metastore.v1alpha.QueryMetadataResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.QueryMetadataResponse other) { + if (other == com.google.cloud.metastore.v1alpha.QueryMetadataResponse.getDefaultInstance()) return this; + if (!other.getResultManifestUri().isEmpty()) { + resultManifestUri_ = other.resultManifestUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + resultManifestUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object resultManifestUri_ = ""; + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @return The resultManifestUri. + */ + public java.lang.String getResultManifestUri() { + java.lang.Object ref = resultManifestUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resultManifestUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @return The bytes for resultManifestUri. + */ + public com.google.protobuf.ByteString + getResultManifestUriBytes() { + java.lang.Object ref = resultManifestUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resultManifestUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @param value The resultManifestUri to set. + * @return This builder for chaining. + */ + public Builder setResultManifestUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resultManifestUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @return This builder for chaining. + */ + public Builder clearResultManifestUri() { + resultManifestUri_ = getDefaultInstance().getResultManifestUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @param value The bytes for resultManifestUri to set. + * @return This builder for chaining. + */ + public Builder setResultManifestUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resultManifestUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.QueryMetadataResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.QueryMetadataResponse) + private static final com.google.cloud.metastore.v1alpha.QueryMetadataResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.QueryMetadataResponse(); + } + + public static com.google.cloud.metastore.v1alpha.QueryMetadataResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryMetadataResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.QueryMetadataResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponseOrBuilder.java new file mode 100644 index 000000000000..3bd2c41c667b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/QueryMetadataResponseOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface QueryMetadataResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.QueryMetadataResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The manifest URI  is link to a JSON instance in Cloud Storage.
+   * This instance manifests immediately along with QueryMetadataResponse. The
+   * content of the URI is not retriable until the long-running operation query
+   * against the metadata finishes.
+   * 
+ * + * string result_manifest_uri = 1; + * @return The resultManifestUri. + */ + java.lang.String getResultManifestUri(); + /** + *
+   * The manifest URI  is link to a JSON instance in Cloud Storage.
+   * This instance manifests immediately along with QueryMetadataResponse. The
+   * content of the URI is not retriable until the long-running operation query
+   * against the metadata finishes.
+   * 
+ * + * string result_manifest_uri = 1; + * @return The bytes for resultManifestUri. + */ + com.google.protobuf.ByteString + getResultManifestUriBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequest.java new file mode 100644 index 000000000000..5f00fb4f7e47 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequest.java @@ -0,0 +1,697 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.RemoveIamPolicyRequest} + */ +public final class RemoveIamPolicyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) + RemoveIamPolicyRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveIamPolicyRequest.newBuilder() to construct. + private RemoveIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveIamPolicyRequest() { + resource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveIamPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.class, com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + /** + *
+   * Required. The relative resource name of the dataplane resource to remove
+   * IAM policy, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+   * or
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the dataplane resource to remove
+   * IAM policy, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+   * or
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASYNCHRONOUS_FIELD_NUMBER = 2; + private boolean asynchronous_ = false; + /** + *
+   * Optional. Removes IAM policy attached to database or table asynchronously
+   * when it is set. The default is false.
+   * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The asynchronous. + */ + @java.lang.Override + public boolean getAsynchronous() { + return asynchronous_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (asynchronous_ != false) { + output.writeBool(2, asynchronous_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (asynchronous_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, asynchronous_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest other = (com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) obj; + + if (!getResource() + .equals(other.getResource())) return false; + if (getAsynchronous() + != other.getAsynchronous()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + ASYNCHRONOUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAsynchronous()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.RemoveIamPolicyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.class, com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resource_ = ""; + asynchronous_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest build() { + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest buildPartial() { + com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest result = new com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.asynchronous_ = asynchronous_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest other) { + if (other == com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getAsynchronous() != false) { + setAsynchronous(other.getAsynchronous()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + asynchronous_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object resource_ = ""; + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean asynchronous_ ; + /** + *
+     * Optional. Removes IAM policy attached to database or table asynchronously
+     * when it is set. The default is false.
+     * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The asynchronous. + */ + @java.lang.Override + public boolean getAsynchronous() { + return asynchronous_; + } + /** + *
+     * Optional. Removes IAM policy attached to database or table asynchronously
+     * when it is set. The default is false.
+     * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The asynchronous to set. + * @return This builder for chaining. + */ + public Builder setAsynchronous(boolean value) { + + asynchronous_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. Removes IAM policy attached to database or table asynchronously
+     * when it is set. The default is false.
+     * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearAsynchronous() { + bitField0_ = (bitField0_ & ~0x00000002); + asynchronous_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) + private static final com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest(); + } + + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIamPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..9fb1f30c0613 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyRequestOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface RemoveIamPolicyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.RemoveIamPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the dataplane resource to remove
+   * IAM policy, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+   * or
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The resource. + */ + java.lang.String getResource(); + /** + *
+   * Required. The relative resource name of the dataplane resource to remove
+   * IAM policy, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+   * or
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for resource. + */ + com.google.protobuf.ByteString + getResourceBytes(); + + /** + *
+   * Optional. Removes IAM policy attached to database or table asynchronously
+   * when it is set. The default is false.
+   * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The asynchronous. + */ + boolean getAsynchronous(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponse.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponse.java new file mode 100644 index 000000000000..a826864434d0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponse.java @@ -0,0 +1,501 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Response message for
+ * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.RemoveIamPolicyResponse} + */ +public final class RemoveIamPolicyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) + RemoveIamPolicyResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveIamPolicyResponse.newBuilder() to construct. + private RemoveIamPolicyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveIamPolicyResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveIamPolicyResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.class, com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.Builder.class); + } + + public static final int SUCCESS_FIELD_NUMBER = 1; + private boolean success_ = false; + /** + *
+   * True if the policy is successfully removed.
+   * 
+ * + * bool success = 1; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (success_ != false) { + output.writeBool(1, success_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (success_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, success_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse other = (com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) obj; + + if (getSuccess() + != other.getSuccess()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSuccess()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.RemoveIamPolicyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) + com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.class, com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + success_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse build() { + com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse buildPartial() { + com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse result = new com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.success_ = success_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) { + return mergeFrom((com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse other) { + if (other == com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse.getDefaultInstance()) return this; + if (other.getSuccess() != false) { + setSuccess(other.getSuccess()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + success_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean success_ ; + /** + *
+     * True if the policy is successfully removed.
+     * 
+ * + * bool success = 1; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + /** + *
+     * True if the policy is successfully removed.
+     * 
+ * + * bool success = 1; + * @param value The success to set. + * @return This builder for chaining. + */ + public Builder setSuccess(boolean value) { + + success_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * True if the policy is successfully removed.
+     * 
+ * + * bool success = 1; + * @return This builder for chaining. + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000001); + success_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) + private static final com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse(); + } + + public static com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIamPolicyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RemoveIamPolicyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponseOrBuilder.java new file mode 100644 index 000000000000..03881aa5ce6b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RemoveIamPolicyResponseOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface RemoveIamPolicyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.RemoveIamPolicyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * True if the policy is successfully removed.
+   * 
+ * + * bool success = 1; + * @return The success. + */ + boolean getSuccess(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Restore.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Restore.java new file mode 100644 index 000000000000..57689474e8ca --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Restore.java @@ -0,0 +1,1791 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * The details of a metadata restore operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Restore} + */ +public final class Restore extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Restore) + RestoreOrBuilder { +private static final long serialVersionUID = 0L; + // Use Restore.newBuilder() to construct. + private Restore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Restore() { + state_ = 0; + backup_ = ""; + type_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Restore(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Restore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Restore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Restore.class, com.google.cloud.metastore.v1alpha.Restore.Builder.class); + } + + /** + *
+   * The current state of the restore.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.Restore.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata restore is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata restore is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata restore completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata restore failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The metadata restore is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata restore is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata restore is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata restore completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata restore failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The metadata restore is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.Restore.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Restore.State) + } + + /** + *
+   * The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.Restore.RestoreType} + */ + public enum RestoreType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The restore type is unknown.
+     * 
+ * + * RESTORE_TYPE_UNSPECIFIED = 0; + */ + RESTORE_TYPE_UNSPECIFIED(0), + /** + *
+     * The service's metadata and configuration are restored.
+     * 
+ * + * FULL = 1; + */ + FULL(1), + /** + *
+     * Only the service's metadata is restored.
+     * 
+ * + * METADATA_ONLY = 2; + */ + METADATA_ONLY(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The restore type is unknown.
+     * 
+ * + * RESTORE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESTORE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The service's metadata and configuration are restored.
+     * 
+ * + * FULL = 1; + */ + public static final int FULL_VALUE = 1; + /** + *
+     * Only the service's metadata is restored.
+     * 
+ * + * METADATA_ONLY = 2; + */ + public static final int METADATA_ONLY_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RestoreType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RestoreType forNumber(int value) { + switch (value) { + case 0: return RESTORE_TYPE_UNSPECIFIED; + case 1: return FULL; + case 2: return METADATA_ONLY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + RestoreType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RestoreType findValueByNumber(int number) { + return RestoreType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.Restore.getDescriptor().getEnumTypes().get(1); + } + + private static final RestoreType[] VALUES = values(); + + public static RestoreType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RestoreType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Restore.RestoreType) + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Restore.State getState() { + com.google.cloud.metastore.v1alpha.Restore.State result = com.google.cloud.metastore.v1alpha.Restore.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.Restore.State.UNRECOGNIZED : result; + } + + public static final int BACKUP_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object backup_ = ""; + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + @java.lang.Override + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } + } + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 5; + private int type_ = 0; + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Restore.RestoreType getType() { + com.google.cloud.metastore.v1alpha.Restore.RestoreType result = com.google.cloud.metastore.v1alpha.Restore.RestoreType.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1alpha.Restore.RestoreType.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1alpha.Restore.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, backup_); + } + if (type_ != com.google.cloud.metastore.v1alpha.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, details_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1alpha.Restore.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, backup_); + } + if (type_ != com.google.cloud.metastore.v1alpha.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, details_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.Restore)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.Restore other = (com.google.cloud.metastore.v1alpha.Restore) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (!getBackup() + .equals(other.getBackup())) return false; + if (type_ != other.type_) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.Restore parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Restore parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Restore parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Restore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Restore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a metadata restore operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Restore} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Restore) + com.google.cloud.metastore.v1alpha.RestoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Restore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Restore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Restore.class, com.google.cloud.metastore.v1alpha.Restore.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.Restore.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + backup_ = ""; + type_ = 0; + details_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Restore_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Restore getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.Restore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Restore build() { + com.google.cloud.metastore.v1alpha.Restore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Restore buildPartial() { + com.google.cloud.metastore.v1alpha.Restore result = new com.google.cloud.metastore.v1alpha.Restore(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.Restore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backup_ = backup_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.details_ = details_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.Restore) { + return mergeFrom((com.google.cloud.metastore.v1alpha.Restore)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Restore other) { + if (other == com.google.cloud.metastore.v1alpha.Restore.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getBackup().isEmpty()) { + backup_ = other.backup_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + backup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + type_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Restore.State getState() { + com.google.cloud.metastore.v1alpha.Restore.State result = com.google.cloud.metastore.v1alpha.Restore.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.Restore.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1alpha.Restore.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object backup_ = ""; + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @param value The backup to set. + * @return This builder for chaining. + */ + public Builder setBackup( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backup_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearBackup() { + backup_ = getDefaultInstance().getBackup(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @param value The bytes for backup to set. + * @return This builder for chaining. + */ + public Builder setBackupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backup_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Restore.RestoreType getType() { + com.google.cloud.metastore.v1alpha.Restore.RestoreType result = com.google.cloud.metastore.v1alpha.Restore.RestoreType.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1alpha.Restore.RestoreType.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.metastore.v1alpha.Restore.RestoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000010); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + details_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Restore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Restore) + private static final com.google.cloud.metastore.v1alpha.Restore DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Restore(); + } + + public static com.google.cloud.metastore.v1alpha.Restore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Restore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Restore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreOrBuilder.java new file mode 100644 index 000000000000..9f7b7ead395e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreOrBuilder.java @@ -0,0 +1,147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface RestoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Restore) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1alpha.Restore.State getState(); + + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + java.lang.String getBackup(); + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + com.google.protobuf.ByteString + getBackupBytes(); + + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + com.google.cloud.metastore.v1alpha.Restore.RestoreType getType(); + + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + java.lang.String getDetails(); + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + com.google.protobuf.ByteString + getDetailsBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequest.java new file mode 100644 index 000000000000..1ae256538304 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequest.java @@ -0,0 +1,1121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for [DataprocMetastore.Restore][].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.RestoreServiceRequest} + */ +public final class RestoreServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.RestoreServiceRequest) + RestoreServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RestoreServiceRequest.newBuilder() to construct. + private RestoreServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RestoreServiceRequest() { + service_ = ""; + backup_ = ""; + restoreType_ = 0; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RestoreServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.RestoreServiceRequest.class, com.google.cloud.metastore.v1alpha.RestoreServiceRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + @java.lang.Override + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } + } + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESTORE_TYPE_FIELD_NUMBER = 3; + private int restoreType_ = 0; + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + @java.lang.Override public int getRestoreTypeValue() { + return restoreType_; + } + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Restore.RestoreType getRestoreType() { + com.google.cloud.metastore.v1alpha.Restore.RestoreType result = com.google.cloud.metastore.v1alpha.Restore.RestoreType.forNumber(restoreType_); + return result == null ? com.google.cloud.metastore.v1alpha.Restore.RestoreType.UNRECOGNIZED : result; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backup_); + } + if (restoreType_ != com.google.cloud.metastore.v1alpha.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, restoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backup_); + } + if (restoreType_ != com.google.cloud.metastore.v1alpha.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, restoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.RestoreServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.RestoreServiceRequest other = (com.google.cloud.metastore.v1alpha.RestoreServiceRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getBackup() + .equals(other.getBackup())) return false; + if (restoreType_ != other.restoreType_) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + hash = (37 * hash) + RESTORE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + restoreType_; + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.RestoreServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for [DataprocMetastore.Restore][].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.RestoreServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.RestoreServiceRequest) + com.google.cloud.metastore.v1alpha.RestoreServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.RestoreServiceRequest.class, com.google.cloud.metastore.v1alpha.RestoreServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.RestoreServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + backup_ = ""; + restoreType_ = 0; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RestoreServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.RestoreServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RestoreServiceRequest build() { + com.google.cloud.metastore.v1alpha.RestoreServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RestoreServiceRequest buildPartial() { + com.google.cloud.metastore.v1alpha.RestoreServiceRequest result = new com.google.cloud.metastore.v1alpha.RestoreServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.RestoreServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backup_ = backup_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.restoreType_ = restoreType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.RestoreServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.RestoreServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.RestoreServiceRequest other) { + if (other == com.google.cloud.metastore.v1alpha.RestoreServiceRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackup().isEmpty()) { + backup_ = other.backup_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.restoreType_ != 0) { + setRestoreTypeValue(other.getRestoreTypeValue()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + backup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + restoreType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The backup to set. + * @return This builder for chaining. + */ + public Builder setBackup( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearBackup() { + backup_ = getDefaultInstance().getBackup(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for backup to set. + * @return This builder for chaining. + */ + public Builder setBackupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int restoreType_ = 0; + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + @java.lang.Override public int getRestoreTypeValue() { + return restoreType_; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for restoreType to set. + * @return This builder for chaining. + */ + public Builder setRestoreTypeValue(int value) { + restoreType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Restore.RestoreType getRestoreType() { + com.google.cloud.metastore.v1alpha.Restore.RestoreType result = com.google.cloud.metastore.v1alpha.Restore.RestoreType.forNumber(restoreType_); + return result == null ? com.google.cloud.metastore.v1alpha.Restore.RestoreType.UNRECOGNIZED : result; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The restoreType to set. + * @return This builder for chaining. + */ + public Builder setRestoreType(com.google.cloud.metastore.v1alpha.Restore.RestoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + restoreType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRestoreType() { + bitField0_ = (bitField0_ & ~0x00000004); + restoreType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.RestoreServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.RestoreServiceRequest) + private static final com.google.cloud.metastore.v1alpha.RestoreServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.RestoreServiceRequest(); + } + + public static com.google.cloud.metastore.v1alpha.RestoreServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.RestoreServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequestOrBuilder.java new file mode 100644 index 000000000000..987427d13125 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/RestoreServiceRequestOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface RestoreServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.RestoreServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + java.lang.String getBackup(); + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + com.google.protobuf.ByteString + getBackupBytes(); + + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + int getRestoreTypeValue(); + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + com.google.cloud.metastore.v1alpha.Restore.RestoreType getRestoreType(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ScalingConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ScalingConfig.java new file mode 100644 index 000000000000..814863feccc6 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ScalingConfig.java @@ -0,0 +1,982 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Represents the scaling configuration of a metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ScalingConfig} + */ +public final class ScalingConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ScalingConfig) + ScalingConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ScalingConfig.newBuilder() to construct. + private ScalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ScalingConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ScalingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ScalingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ScalingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ScalingConfig.class, com.google.cloud.metastore.v1alpha.ScalingConfig.Builder.class); + } + + /** + *
+   * Metastore instance sizes.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize} + */ + public enum InstanceSize + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified instance size
+     * 
+ * + * INSTANCE_SIZE_UNSPECIFIED = 0; + */ + INSTANCE_SIZE_UNSPECIFIED(0), + /** + *
+     * Extra small instance size, maps to a scaling factor of 0.1.
+     * 
+ * + * EXTRA_SMALL = 1; + */ + EXTRA_SMALL(1), + /** + *
+     * Small instance size, maps to a scaling factor of 0.5.
+     * 
+ * + * SMALL = 2; + */ + SMALL(2), + /** + *
+     * Medium instance size, maps to a scaling factor of 1.0.
+     * 
+ * + * MEDIUM = 3; + */ + MEDIUM(3), + /** + *
+     * Large instance size, maps to a scaling factor of 3.0.
+     * 
+ * + * LARGE = 4; + */ + LARGE(4), + /** + *
+     * Extra large instance size, maps to a scaling factor of 6.0.
+     * 
+ * + * EXTRA_LARGE = 5; + */ + EXTRA_LARGE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified instance size
+     * 
+ * + * INSTANCE_SIZE_UNSPECIFIED = 0; + */ + public static final int INSTANCE_SIZE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Extra small instance size, maps to a scaling factor of 0.1.
+     * 
+ * + * EXTRA_SMALL = 1; + */ + public static final int EXTRA_SMALL_VALUE = 1; + /** + *
+     * Small instance size, maps to a scaling factor of 0.5.
+     * 
+ * + * SMALL = 2; + */ + public static final int SMALL_VALUE = 2; + /** + *
+     * Medium instance size, maps to a scaling factor of 1.0.
+     * 
+ * + * MEDIUM = 3; + */ + public static final int MEDIUM_VALUE = 3; + /** + *
+     * Large instance size, maps to a scaling factor of 3.0.
+     * 
+ * + * LARGE = 4; + */ + public static final int LARGE_VALUE = 4; + /** + *
+     * Extra large instance size, maps to a scaling factor of 6.0.
+     * 
+ * + * EXTRA_LARGE = 5; + */ + public static final int EXTRA_LARGE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InstanceSize valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static InstanceSize forNumber(int value) { + switch (value) { + case 0: return INSTANCE_SIZE_UNSPECIFIED; + case 1: return EXTRA_SMALL; + case 2: return SMALL; + case 3: return MEDIUM; + case 4: return LARGE; + case 5: return EXTRA_LARGE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + InstanceSize> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InstanceSize findValueByNumber(int number) { + return InstanceSize.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.ScalingConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final InstanceSize[] VALUES = values(); + + public static InstanceSize valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private InstanceSize(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize) + } + + private int scalingModelCase_ = 0; + private java.lang.Object scalingModel_; + public enum ScalingModelCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSTANCE_SIZE(1), + SCALING_FACTOR(2), + SCALINGMODEL_NOT_SET(0); + private final int value; + private ScalingModelCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ScalingModelCase valueOf(int value) { + return forNumber(value); + } + + public static ScalingModelCase forNumber(int value) { + switch (value) { + case 1: return INSTANCE_SIZE; + case 2: return SCALING_FACTOR; + case 0: return SCALINGMODEL_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ScalingModelCase + getScalingModelCase() { + return ScalingModelCase.forNumber( + scalingModelCase_); + } + + public static final int INSTANCE_SIZE_FIELD_NUMBER = 1; + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + public boolean hasInstanceSize() { + return scalingModelCase_ == 1; + } + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + public int getInstanceSizeValue() { + if (scalingModelCase_ == 1) { + return (java.lang.Integer) scalingModel_; + } + return 0; + } + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + public com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize getInstanceSize() { + if (scalingModelCase_ == 1) { + com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize result = com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize.forNumber( + (java.lang.Integer) scalingModel_); + return result == null ? com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize.UNRECOGNIZED : result; + } + return com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize.INSTANCE_SIZE_UNSPECIFIED; + } + + public static final int SCALING_FACTOR_FIELD_NUMBER = 2; + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + @java.lang.Override + public boolean hasScalingFactor() { + return scalingModelCase_ == 2; + } + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + @java.lang.Override + public float getScalingFactor() { + if (scalingModelCase_ == 2) { + return (java.lang.Float) scalingModel_; + } + return 0F; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (scalingModelCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) scalingModel_)); + } + if (scalingModelCase_ == 2) { + output.writeFloat( + 2, (float)((java.lang.Float) scalingModel_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scalingModelCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, ((java.lang.Integer) scalingModel_)); + } + if (scalingModelCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize( + 2, (float)((java.lang.Float) scalingModel_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.ScalingConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ScalingConfig other = (com.google.cloud.metastore.v1alpha.ScalingConfig) obj; + + if (!getScalingModelCase().equals(other.getScalingModelCase())) return false; + switch (scalingModelCase_) { + case 1: + if (getInstanceSizeValue() + != other.getInstanceSizeValue()) return false; + break; + case 2: + if (java.lang.Float.floatToIntBits(getScalingFactor()) + != java.lang.Float.floatToIntBits( + other.getScalingFactor())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (scalingModelCase_) { + case 1: + hash = (37 * hash) + INSTANCE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceSizeValue(); + break; + case 2: + hash = (37 * hash) + SCALING_FACTOR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScalingFactor()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.ScalingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.ScalingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the scaling configuration of a metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ScalingConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ScalingConfig) + com.google.cloud.metastore.v1alpha.ScalingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ScalingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ScalingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ScalingConfig.class, com.google.cloud.metastore.v1alpha.ScalingConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ScalingConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scalingModelCase_ = 0; + scalingModel_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_ScalingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ScalingConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ScalingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ScalingConfig build() { + com.google.cloud.metastore.v1alpha.ScalingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ScalingConfig buildPartial() { + com.google.cloud.metastore.v1alpha.ScalingConfig result = new com.google.cloud.metastore.v1alpha.ScalingConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ScalingConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.ScalingConfig result) { + result.scalingModelCase_ = scalingModelCase_; + result.scalingModel_ = this.scalingModel_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.ScalingConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ScalingConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ScalingConfig other) { + if (other == com.google.cloud.metastore.v1alpha.ScalingConfig.getDefaultInstance()) return this; + switch (other.getScalingModelCase()) { + case INSTANCE_SIZE: { + setInstanceSizeValue(other.getInstanceSizeValue()); + break; + } + case SCALING_FACTOR: { + setScalingFactor(other.getScalingFactor()); + break; + } + case SCALINGMODEL_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + scalingModelCase_ = 1; + scalingModel_ = rawValue; + break; + } // case 8 + case 21: { + scalingModel_ = input.readFloat(); + scalingModelCase_ = 2; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int scalingModelCase_ = 0; + private java.lang.Object scalingModel_; + public ScalingModelCase + getScalingModelCase() { + return ScalingModelCase.forNumber( + scalingModelCase_); + } + + public Builder clearScalingModel() { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + @java.lang.Override + public boolean hasInstanceSize() { + return scalingModelCase_ == 1; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + @java.lang.Override + public int getInstanceSizeValue() { + if (scalingModelCase_ == 1) { + return ((java.lang.Integer) scalingModel_).intValue(); + } + return 0; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @param value The enum numeric value on the wire for instanceSize to set. + * @return This builder for chaining. + */ + public Builder setInstanceSizeValue(int value) { + scalingModelCase_ = 1; + scalingModel_ = value; + onChanged(); + return this; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize getInstanceSize() { + if (scalingModelCase_ == 1) { + com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize result = com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize.forNumber( + (java.lang.Integer) scalingModel_); + return result == null ? com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize.UNRECOGNIZED : result; + } + return com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize.INSTANCE_SIZE_UNSPECIFIED; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @param value The instanceSize to set. + * @return This builder for chaining. + */ + public Builder setInstanceSize(com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize value) { + if (value == null) { + throw new NullPointerException(); + } + scalingModelCase_ = 1; + scalingModel_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return This builder for chaining. + */ + public Builder clearInstanceSize() { + if (scalingModelCase_ == 1) { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + public boolean hasScalingFactor() { + return scalingModelCase_ == 2; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + public float getScalingFactor() { + if (scalingModelCase_ == 2) { + return (java.lang.Float) scalingModel_; + } + return 0F; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @param value The scalingFactor to set. + * @return This builder for chaining. + */ + public Builder setScalingFactor(float value) { + + scalingModelCase_ = 2; + scalingModel_ = value; + onChanged(); + return this; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return This builder for chaining. + */ + public Builder clearScalingFactor() { + if (scalingModelCase_ == 2) { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.ScalingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ScalingConfig) + private static final com.google.cloud.metastore.v1alpha.ScalingConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ScalingConfig(); + } + + public static com.google.cloud.metastore.v1alpha.ScalingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ScalingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ScalingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ScalingConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ScalingConfigOrBuilder.java new file mode 100644 index 000000000000..c01c1fffe9e9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ScalingConfigOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ScalingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ScalingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + boolean hasInstanceSize(); + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + int getInstanceSizeValue(); + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + com.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize getInstanceSize(); + + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + boolean hasScalingFactor(); + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + float getScalingFactor(); + + public com.google.cloud.metastore.v1alpha.ScalingConfig.ScalingModelCase getScalingModelCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Secret.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Secret.java new file mode 100644 index 000000000000..239f07a07596 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Secret.java @@ -0,0 +1,717 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * A securely stored value.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Secret} + */ +public final class Secret extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Secret) + SecretOrBuilder { +private static final long serialVersionUID = 0L; + // Use Secret.newBuilder() to construct. + private Secret(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Secret() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Secret(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Secret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Secret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Secret.class, com.google.cloud.metastore.v1alpha.Secret.Builder.class); + } + + private int valueCase_ = 0; + private java.lang.Object value_; + public enum ValueCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_SECRET(2), + VALUE_NOT_SET(0); + private final int value; + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 2: return CLOUD_SECRET; + case 0: return VALUE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public static final int CLOUD_SECRET_FIELD_NUMBER = 2; + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + public boolean hasCloudSecret() { + return valueCase_ == 2; + } + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + public java.lang.String getCloudSecret() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } + } + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + public com.google.protobuf.ByteString + getCloudSecretBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.Secret)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.Secret other = (com.google.cloud.metastore.v1alpha.Secret) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (!getCloudSecret() + .equals(other.getCloudSecret())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 2: + hash = (37 * hash) + CLOUD_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getCloudSecret().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.Secret parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Secret parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Secret parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Secret parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Secret prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A securely stored value.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Secret} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Secret) + com.google.cloud.metastore.v1alpha.SecretOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Secret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Secret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Secret.class, com.google.cloud.metastore.v1alpha.Secret.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.Secret.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Secret_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Secret getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Secret build() { + com.google.cloud.metastore.v1alpha.Secret result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Secret buildPartial() { + com.google.cloud.metastore.v1alpha.Secret result = new com.google.cloud.metastore.v1alpha.Secret(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.Secret result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.Secret result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.Secret) { + return mergeFrom((com.google.cloud.metastore.v1alpha.Secret)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Secret other) { + if (other == com.google.cloud.metastore.v1alpha.Secret.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case CLOUD_SECRET: { + valueCase_ = 2; + value_ = other.value_; + onChanged(); + break; + } + case VALUE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 2; + value_ = s; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int valueCase_ = 0; + private java.lang.Object value_; + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + @java.lang.Override + public boolean hasCloudSecret() { + return valueCase_ == 2; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + @java.lang.Override + public java.lang.String getCloudSecret() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCloudSecretBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @param value The cloudSecret to set. + * @return This builder for chaining. + */ + public Builder setCloudSecret( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return This builder for chaining. + */ + public Builder clearCloudSecret() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @param value The bytes for cloudSecret to set. + * @return This builder for chaining. + */ + public Builder setCloudSecretBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Secret) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Secret) + private static final com.google.cloud.metastore.v1alpha.Secret DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Secret(); + } + + public static com.google.cloud.metastore.v1alpha.Secret getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Secret parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Secret getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/SecretOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/SecretOrBuilder.java new file mode 100644 index 000000000000..655a6aff3330 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/SecretOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface SecretOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Secret) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + boolean hasCloudSecret(); + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + java.lang.String getCloudSecret(); + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + com.google.protobuf.ByteString + getCloudSecretBytes(); + + public com.google.cloud.metastore.v1alpha.Secret.ValueCase getValueCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Service.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Service.java new file mode 100644 index 000000000000..c91a710aa44f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/Service.java @@ -0,0 +1,5519 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * A managed metastore service that serves metadata queries.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Service} + */ +public final class Service extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.Service) + ServiceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Service() { + name_ = ""; + network_ = ""; + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + artifactGcsUri_ = ""; + tier_ = 0; + uid_ = ""; + releaseChannel_ = 0; + databaseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Service(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Service_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Service.class, com.google.cloud.metastore.v1alpha.Service.Builder.class); + } + + /** + *
+   * The current state of the metastore service.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.Service.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metastore service is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metastore service is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The metastore service is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + *
+     * The metastore service is entering suspension. Its query-serving
+     * availability may cease unexpectedly.
+     * 
+ * + * SUSPENDING = 3; + */ + SUSPENDING(3), + /** + *
+     * The metastore service is suspended and unable to serve queries.
+     * 
+ * + * SUSPENDED = 4; + */ + SUSPENDED(4), + /** + *
+     * The metastore service is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 5; + */ + UPDATING(5), + /** + *
+     * The metastore service is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + DELETING(6), + /** + *
+     * The metastore service has encountered an error and cannot be used. The
+     * metastore service should be deleted.
+     * 
+ * + * ERROR = 7; + */ + ERROR(7), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metastore service is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metastore service is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The metastore service is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + *
+     * The metastore service is entering suspension. Its query-serving
+     * availability may cease unexpectedly.
+     * 
+ * + * SUSPENDING = 3; + */ + public static final int SUSPENDING_VALUE = 3; + /** + *
+     * The metastore service is suspended and unable to serve queries.
+     * 
+ * + * SUSPENDED = 4; + */ + public static final int SUSPENDED_VALUE = 4; + /** + *
+     * The metastore service is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 5; + */ + public static final int UPDATING_VALUE = 5; + /** + *
+     * The metastore service is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + public static final int DELETING_VALUE = 6; + /** + *
+     * The metastore service has encountered an error and cannot be used. The
+     * metastore service should be deleted.
+     * 
+ * + * ERROR = 7; + */ + public static final int ERROR_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return ACTIVE; + case 3: return SUSPENDING; + case 4: return SUSPENDED; + case 5: return UPDATING; + case 6: return DELETING; + case 7: return ERROR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.Service.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Service.State) + } + + /** + *
+   * Available service tiers.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.Service.Tier} + */ + public enum Tier + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The tier is not set.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + TIER_UNSPECIFIED(0), + /** + *
+     * The developer tier provides limited scalability and no fault tolerance.
+     * Good for low-cost proof-of-concept.
+     * 
+ * + * DEVELOPER = 1; + */ + DEVELOPER(1), + /** + *
+     * The enterprise tier provides multi-zone high availability, and sufficient
+     * scalability for enterprise-level Dataproc Metastore workloads.
+     * 
+ * + * ENTERPRISE = 3; + */ + ENTERPRISE(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The tier is not set.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + public static final int TIER_UNSPECIFIED_VALUE = 0; + /** + *
+     * The developer tier provides limited scalability and no fault tolerance.
+     * Good for low-cost proof-of-concept.
+     * 
+ * + * DEVELOPER = 1; + */ + public static final int DEVELOPER_VALUE = 1; + /** + *
+     * The enterprise tier provides multi-zone high availability, and sufficient
+     * scalability for enterprise-level Dataproc Metastore workloads.
+     * 
+ * + * ENTERPRISE = 3; + */ + public static final int ENTERPRISE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Tier valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Tier forNumber(int value) { + switch (value) { + case 0: return TIER_UNSPECIFIED; + case 1: return DEVELOPER; + case 3: return ENTERPRISE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Tier> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Tier findValueByNumber(int number) { + return Tier.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.Service.getDescriptor().getEnumTypes().get(1); + } + + private static final Tier[] VALUES = values(); + + public static Tier valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Tier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Service.Tier) + } + + /** + *
+   * Release channels bundle features of varying levels of stability. Newer
+   * features may be introduced initially into less stable release channels and
+   * can be automatically promoted into more stable release channels.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.Service.ReleaseChannel} + */ + public enum ReleaseChannel + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Release channel is not specified.
+     * 
+ * + * RELEASE_CHANNEL_UNSPECIFIED = 0; + */ + RELEASE_CHANNEL_UNSPECIFIED(0), + /** + *
+     * The `CANARY` release channel contains the newest features, which may be
+     * unstable and subject to unresolved issues with no known workarounds.
+     * Services using the `CANARY` release channel are not subject to any SLAs.
+     * 
+ * + * CANARY = 1; + */ + CANARY(1), + /** + *
+     * The `STABLE` release channel contains features that are considered stable
+     * and have been validated for production use.
+     * 
+ * + * STABLE = 2; + */ + STABLE(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Release channel is not specified.
+     * 
+ * + * RELEASE_CHANNEL_UNSPECIFIED = 0; + */ + public static final int RELEASE_CHANNEL_UNSPECIFIED_VALUE = 0; + /** + *
+     * The `CANARY` release channel contains the newest features, which may be
+     * unstable and subject to unresolved issues with no known workarounds.
+     * Services using the `CANARY` release channel are not subject to any SLAs.
+     * 
+ * + * CANARY = 1; + */ + public static final int CANARY_VALUE = 1; + /** + *
+     * The `STABLE` release channel contains features that are considered stable
+     * and have been validated for production use.
+     * 
+ * + * STABLE = 2; + */ + public static final int STABLE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReleaseChannel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ReleaseChannel forNumber(int value) { + switch (value) { + case 0: return RELEASE_CHANNEL_UNSPECIFIED; + case 1: return CANARY; + case 2: return STABLE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ReleaseChannel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReleaseChannel findValueByNumber(int number) { + return ReleaseChannel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.Service.getDescriptor().getEnumTypes().get(2); + } + + private static final ReleaseChannel[] VALUES = values(); + + public static ReleaseChannel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ReleaseChannel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Service.ReleaseChannel) + } + + /** + *
+   * The backend database type for the metastore service.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1alpha.Service.DatabaseType} + */ + public enum DatabaseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The DATABASE_TYPE is not set.
+     * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + DATABASE_TYPE_UNSPECIFIED(0), + /** + *
+     * MySQL is used to persist the metastore data.
+     * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + /** + *
+     * Spanner is used to persist the metastore data.
+     * 
+ * + * SPANNER = 2; + */ + SPANNER(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The DATABASE_TYPE is not set.
+     * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * MySQL is used to persist the metastore data.
+     * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + /** + *
+     * Spanner is used to persist the metastore data.
+     * 
+ * + * SPANNER = 2; + */ + public static final int SPANNER_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DatabaseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DatabaseType forNumber(int value) { + switch (value) { + case 0: return DATABASE_TYPE_UNSPECIFIED; + case 1: return MYSQL; + case 2: return SPANNER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DatabaseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseType findValueByNumber(int number) { + return DatabaseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.Service.getDescriptor().getEnumTypes().get(3); + } + + private static final DatabaseType[] VALUES = values(); + + public static DatabaseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DatabaseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.Service.DatabaseType) + } + + private int metastoreConfigCase_ = 0; + private java.lang.Object metastoreConfig_; + public enum MetastoreConfigCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HIVE_METASTORE_CONFIG(5), + METASTORECONFIG_NOT_SET(0); + private final int value; + private MetastoreConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetastoreConfigCase valueOf(int value) { + return forNumber(value); + } + + public static MetastoreConfigCase forNumber(int value) { + switch (value) { + case 5: return HIVE_METASTORE_CONFIG; + case 0: return METASTORECONFIG_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public MetastoreConfigCase + getMetastoreConfigCase() { + return MetastoreConfigCase.forNumber( + metastoreConfigCase_); + } + + public static final int HIVE_METASTORE_CONFIG_FIELD_NUMBER = 5; + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + @java.lang.Override + public boolean hasHiveMetastoreConfig() { + return metastoreConfigCase_ == 5; + } + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getHiveMetastoreConfig() { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); + } + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder() { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Service_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 9; + private int port_ = 0; + /** + *
+   * The TCP port at which the metastore service is reached. Default: 9083.
+   * 
+ * + * int32 port = 9; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Service.State getState() { + com.google.cloud.metastore.v1alpha.Service.State result = com.google.cloud.metastore.v1alpha.Service.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.Service.State.UNRECOGNIZED : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object stateMessage_ = ""; + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_GCS_URI_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object artifactGcsUri_ = ""; + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + @java.lang.Override + public java.lang.String getArtifactGcsUri() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactGcsUri_ = s; + return s; + } + } + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArtifactGcsUriBytes() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIER_FIELD_NUMBER = 13; + private int tier_ = 0; + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + @java.lang.Override public int getTierValue() { + return tier_; + } + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @return The tier. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Service.Tier getTier() { + com.google.cloud.metastore.v1alpha.Service.Tier result = com.google.cloud.metastore.v1alpha.Service.Tier.forNumber(tier_); + return result == null ? com.google.cloud.metastore.v1alpha.Service.Tier.UNRECOGNIZED : result; + } + + public static final int METADATA_INTEGRATION_FIELD_NUMBER = 14; + private com.google.cloud.metastore.v1alpha.MetadataIntegration metadataIntegration_; + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + * @return Whether the metadataIntegration field is set. + */ + @java.lang.Override + public boolean hasMetadataIntegration() { + return metadataIntegration_ != null; + } + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + * @return The metadataIntegration. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataIntegration getMetadataIntegration() { + return metadataIntegration_ == null ? com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance() : metadataIntegration_; + } + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder getMetadataIntegrationOrBuilder() { + return metadataIntegration_ == null ? com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance() : metadataIntegration_; + } + + public static final int MAINTENANCE_WINDOW_FIELD_NUMBER = 15; + private com.google.cloud.metastore.v1alpha.MaintenanceWindow maintenanceWindow_; + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + @java.lang.Override + public boolean hasMaintenanceWindow() { + return maintenanceWindow_ != null; + } + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder() { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + + public static final int UID_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER = 17; + private com.google.cloud.metastore.v1alpha.MetadataManagementActivity metadataManagementActivity_; + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + @java.lang.Override + public boolean hasMetadataManagementActivity() { + return metadataManagementActivity_ != null; + } + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataManagementActivity getMetadataManagementActivity() { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder() { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + + public static final int RELEASE_CHANNEL_FIELD_NUMBER = 19; + private int releaseChannel_ = 0; + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + @java.lang.Override public int getReleaseChannelValue() { + return releaseChannel_; + } + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Service.ReleaseChannel getReleaseChannel() { + com.google.cloud.metastore.v1alpha.Service.ReleaseChannel result = com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.forNumber(releaseChannel_); + return result == null ? com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.UNRECOGNIZED : result; + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.metastore.v1alpha.EncryptionConfig encryptionConfig_; + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 21; + private com.google.cloud.metastore.v1alpha.NetworkConfig networkConfig_; + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig() { + return networkConfig_ == null ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() : networkConfig_; + } + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return networkConfig_ == null ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() : networkConfig_; + } + + public static final int DATABASE_TYPE_FIELD_NUMBER = 22; + private int databaseType_ = 0; + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.Service.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1alpha.Service.DatabaseType result = com.google.cloud.metastore.v1alpha.Service.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1alpha.Service.DatabaseType.UNRECOGNIZED : result; + } + + public static final int TELEMETRY_CONFIG_FIELD_NUMBER = 23; + private com.google.cloud.metastore.v1alpha.TelemetryConfig telemetryConfig_; + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + @java.lang.Override + public boolean hasTelemetryConfig() { + return telemetryConfig_ != null; + } + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.TelemetryConfig getTelemetryConfig() { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + + public static final int SCALING_CONFIG_FIELD_NUMBER = 24; + private com.google.cloud.metastore.v1alpha.ScalingConfig scalingConfig_; + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + @java.lang.Override + public boolean hasScalingConfig() { + return scalingConfig_ != null; + } + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ScalingConfig getScalingConfig() { + return scalingConfig_ == null ? com.google.cloud.metastore.v1alpha.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ScalingConfigOrBuilder getScalingConfigOrBuilder() { + return scalingConfig_ == null ? com.google.cloud.metastore.v1alpha.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 4); + if (metastoreConfigCase_ == 5) { + output.writeMessage(5, (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpointUri_); + } + if (port_ != 0) { + output.writeInt32(9, port_); + } + if (state_ != com.google.cloud.metastore.v1alpha.Service.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, artifactGcsUri_); + } + if (tier_ != com.google.cloud.metastore.v1alpha.Service.Tier.TIER_UNSPECIFIED.getNumber()) { + output.writeEnum(13, tier_); + } + if (metadataIntegration_ != null) { + output.writeMessage(14, getMetadataIntegration()); + } + if (maintenanceWindow_ != null) { + output.writeMessage(15, getMaintenanceWindow()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, uid_); + } + if (metadataManagementActivity_ != null) { + output.writeMessage(17, getMetadataManagementActivity()); + } + if (releaseChannel_ != com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED.getNumber()) { + output.writeEnum(19, releaseChannel_); + } + if (encryptionConfig_ != null) { + output.writeMessage(20, getEncryptionConfig()); + } + if (networkConfig_ != null) { + output.writeMessage(21, getNetworkConfig()); + } + if (databaseType_ != com.google.cloud.metastore.v1alpha.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(22, databaseType_); + } + if (telemetryConfig_ != null) { + output.writeMessage(23, getTelemetryConfig()); + } + if (scalingConfig_ != null) { + output.writeMessage(24, getScalingConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels__); + } + if (metastoreConfigCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpointUri_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, port_); + } + if (state_ != com.google.cloud.metastore.v1alpha.Service.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, artifactGcsUri_); + } + if (tier_ != com.google.cloud.metastore.v1alpha.Service.Tier.TIER_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, tier_); + } + if (metadataIntegration_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getMetadataIntegration()); + } + if (maintenanceWindow_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getMaintenanceWindow()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, uid_); + } + if (metadataManagementActivity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getMetadataManagementActivity()); + } + if (releaseChannel_ != com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(19, releaseChannel_); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getEncryptionConfig()); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getNetworkConfig()); + } + if (databaseType_ != com.google.cloud.metastore.v1alpha.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(22, databaseType_); + } + if (telemetryConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getTelemetryConfig()); + } + if (scalingConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getScalingConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.Service)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.Service other = (com.google.cloud.metastore.v1alpha.Service) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getNetwork() + .equals(other.getNetwork())) return false; + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (getPort() + != other.getPort()) return false; + if (state_ != other.state_) return false; + if (!getStateMessage() + .equals(other.getStateMessage())) return false; + if (!getArtifactGcsUri() + .equals(other.getArtifactGcsUri())) return false; + if (tier_ != other.tier_) return false; + if (hasMetadataIntegration() != other.hasMetadataIntegration()) return false; + if (hasMetadataIntegration()) { + if (!getMetadataIntegration() + .equals(other.getMetadataIntegration())) return false; + } + if (hasMaintenanceWindow() != other.hasMaintenanceWindow()) return false; + if (hasMaintenanceWindow()) { + if (!getMaintenanceWindow() + .equals(other.getMaintenanceWindow())) return false; + } + if (!getUid() + .equals(other.getUid())) return false; + if (hasMetadataManagementActivity() != other.hasMetadataManagementActivity()) return false; + if (hasMetadataManagementActivity()) { + if (!getMetadataManagementActivity() + .equals(other.getMetadataManagementActivity())) return false; + } + if (releaseChannel_ != other.releaseChannel_) return false; + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig() + .equals(other.getEncryptionConfig())) return false; + } + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig() + .equals(other.getNetworkConfig())) return false; + } + if (databaseType_ != other.databaseType_) return false; + if (hasTelemetryConfig() != other.hasTelemetryConfig()) return false; + if (hasTelemetryConfig()) { + if (!getTelemetryConfig() + .equals(other.getTelemetryConfig())) return false; + } + if (hasScalingConfig() != other.hasScalingConfig()) return false; + if (hasScalingConfig()) { + if (!getScalingConfig() + .equals(other.getScalingConfig())) return false; + } + if (!getMetastoreConfigCase().equals(other.getMetastoreConfigCase())) return false; + switch (metastoreConfigCase_) { + case 5: + if (!getHiveMetastoreConfig() + .equals(other.getHiveMetastoreConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (37 * hash) + ARTIFACT_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactGcsUri().hashCode(); + hash = (37 * hash) + TIER_FIELD_NUMBER; + hash = (53 * hash) + tier_; + if (hasMetadataIntegration()) { + hash = (37 * hash) + METADATA_INTEGRATION_FIELD_NUMBER; + hash = (53 * hash) + getMetadataIntegration().hashCode(); + } + if (hasMaintenanceWindow()) { + hash = (37 * hash) + MAINTENANCE_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getMaintenanceWindow().hashCode(); + } + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasMetadataManagementActivity()) { + hash = (37 * hash) + METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER; + hash = (53 * hash) + getMetadataManagementActivity().hashCode(); + } + hash = (37 * hash) + RELEASE_CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + releaseChannel_; + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseType_; + if (hasTelemetryConfig()) { + hash = (37 * hash) + TELEMETRY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTelemetryConfig().hashCode(); + } + if (hasScalingConfig()) { + hash = (37 * hash) + SCALING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getScalingConfig().hashCode(); + } + switch (metastoreConfigCase_) { + case 5: + hash = (37 * hash) + HIVE_METASTORE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getHiveMetastoreConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.Service parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Service parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Service parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.Service parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.Service prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A managed metastore service that serves metadata queries.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.Service} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.Service) + com.google.cloud.metastore.v1alpha.ServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Service_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.Service.class, com.google.cloud.metastore.v1alpha.Service.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.Service.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (hiveMetastoreConfigBuilder_ != null) { + hiveMetastoreConfigBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + network_ = ""; + endpointUri_ = ""; + port_ = 0; + state_ = 0; + stateMessage_ = ""; + artifactGcsUri_ = ""; + tier_ = 0; + metadataIntegration_ = null; + if (metadataIntegrationBuilder_ != null) { + metadataIntegrationBuilder_.dispose(); + metadataIntegrationBuilder_ = null; + } + maintenanceWindow_ = null; + if (maintenanceWindowBuilder_ != null) { + maintenanceWindowBuilder_.dispose(); + maintenanceWindowBuilder_ = null; + } + uid_ = ""; + metadataManagementActivity_ = null; + if (metadataManagementActivityBuilder_ != null) { + metadataManagementActivityBuilder_.dispose(); + metadataManagementActivityBuilder_ = null; + } + releaseChannel_ = 0; + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + databaseType_ = 0; + telemetryConfig_ = null; + if (telemetryConfigBuilder_ != null) { + telemetryConfigBuilder_.dispose(); + telemetryConfigBuilder_ = null; + } + scalingConfig_ = null; + if (scalingConfigBuilder_ != null) { + scalingConfigBuilder_.dispose(); + scalingConfigBuilder_ = null; + } + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_Service_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.Service.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service build() { + com.google.cloud.metastore.v1alpha.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service buildPartial() { + com.google.cloud.metastore.v1alpha.Service result = new com.google.cloud.metastore.v1alpha.Service(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.Service result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endpointUri_ = endpointUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.port_ = port_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.stateMessage_ = stateMessage_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.artifactGcsUri_ = artifactGcsUri_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.tier_ = tier_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.metadataIntegration_ = metadataIntegrationBuilder_ == null + ? metadataIntegration_ + : metadataIntegrationBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.maintenanceWindow_ = maintenanceWindowBuilder_ == null + ? maintenanceWindow_ + : maintenanceWindowBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.metadataManagementActivity_ = metadataManagementActivityBuilder_ == null + ? metadataManagementActivity_ + : metadataManagementActivityBuilder_.build(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.releaseChannel_ = releaseChannel_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.encryptionConfig_ = encryptionConfigBuilder_ == null + ? encryptionConfig_ + : encryptionConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.networkConfig_ = networkConfigBuilder_ == null + ? networkConfig_ + : networkConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.databaseType_ = databaseType_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.telemetryConfig_ = telemetryConfigBuilder_ == null + ? telemetryConfig_ + : telemetryConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.scalingConfig_ = scalingConfigBuilder_ == null + ? scalingConfig_ + : scalingConfigBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1alpha.Service result) { + result.metastoreConfigCase_ = metastoreConfigCase_; + result.metastoreConfig_ = this.metastoreConfig_; + if (metastoreConfigCase_ == 5 && + hiveMetastoreConfigBuilder_ != null) { + result.metastoreConfig_ = hiveMetastoreConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.Service) { + return mergeFrom((com.google.cloud.metastore.v1alpha.Service)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.Service other) { + if (other == com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getArtifactGcsUri().isEmpty()) { + artifactGcsUri_ = other.artifactGcsUri_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.tier_ != 0) { + setTierValue(other.getTierValue()); + } + if (other.hasMetadataIntegration()) { + mergeMetadataIntegration(other.getMetadataIntegration()); + } + if (other.hasMaintenanceWindow()) { + mergeMaintenanceWindow(other.getMaintenanceWindow()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (other.hasMetadataManagementActivity()) { + mergeMetadataManagementActivity(other.getMetadataManagementActivity()); + } + if (other.releaseChannel_ != 0) { + setReleaseChannelValue(other.getReleaseChannelValue()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + if (other.databaseType_ != 0) { + setDatabaseTypeValue(other.getDatabaseTypeValue()); + } + if (other.hasTelemetryConfig()) { + mergeTelemetryConfig(other.getTelemetryConfig()); + } + if (other.hasScalingConfig()) { + mergeScalingConfig(other.getScalingConfig()); + } + switch (other.getMetastoreConfigCase()) { + case HIVE_METASTORE_CONFIG: { + mergeHiveMetastoreConfig(other.getHiveMetastoreConfig()); + break; + } + case METASTORECONFIG_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: { + input.readMessage( + getHiveMetastoreConfigFieldBuilder().getBuilder(), + extensionRegistry); + metastoreConfigCase_ = 5; + break; + } // case 42 + case 58: { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 72: { + port_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 90: { + stateMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: { + artifactGcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 104: { + tier_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 104 + case 114: { + input.readMessage( + getMetadataIntegrationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 + case 122: { + input.readMessage( + getMaintenanceWindowFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 130: { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 130 + case 138: { + input.readMessage( + getMetadataManagementActivityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 138 + case 152: { + releaseChannel_ = input.readEnum(); + bitField0_ |= 0x00010000; + break; + } // case 152 + case 162: { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 162 + case 170: { + input.readMessage( + getNetworkConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 170 + case 176: { + databaseType_ = input.readEnum(); + bitField0_ |= 0x00080000; + break; + } // case 176 + case 186: { + input.readMessage( + getTelemetryConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 186 + case 194: { + input.readMessage( + getScalingConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 194 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int metastoreConfigCase_ = 0; + private java.lang.Object metastoreConfig_; + public MetastoreConfigCase + getMetastoreConfigCase() { + return MetastoreConfigCase.forNumber( + metastoreConfigCase_); + } + + public Builder clearMetastoreConfig() { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig, com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder> hiveMetastoreConfigBuilder_; + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + @java.lang.Override + public boolean hasHiveMetastoreConfig() { + return metastoreConfigCase_ == 5; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getHiveMetastoreConfig() { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); + } else { + if (metastoreConfigCase_ == 5) { + return hiveMetastoreConfigBuilder_.getMessage(); + } + return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); + } + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder setHiveMetastoreConfig(com.google.cloud.metastore.v1alpha.HiveMetastoreConfig value) { + if (hiveMetastoreConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metastoreConfig_ = value; + onChanged(); + } else { + hiveMetastoreConfigBuilder_.setMessage(value); + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder setHiveMetastoreConfig( + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder builderForValue) { + if (hiveMetastoreConfigBuilder_ == null) { + metastoreConfig_ = builderForValue.build(); + onChanged(); + } else { + hiveMetastoreConfigBuilder_.setMessage(builderForValue.build()); + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder mergeHiveMetastoreConfig(com.google.cloud.metastore.v1alpha.HiveMetastoreConfig value) { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5 && + metastoreConfig_ != com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance()) { + metastoreConfig_ = com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.newBuilder((com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_) + .mergeFrom(value).buildPartial(); + } else { + metastoreConfig_ = value; + } + onChanged(); + } else { + if (metastoreConfigCase_ == 5) { + hiveMetastoreConfigBuilder_.mergeFrom(value); + } else { + hiveMetastoreConfigBuilder_.setMessage(value); + } + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder clearHiveMetastoreConfig() { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5) { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + onChanged(); + } + } else { + if (metastoreConfigCase_ == 5) { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + } + hiveMetastoreConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder getHiveMetastoreConfigBuilder() { + return getHiveMetastoreConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder() { + if ((metastoreConfigCase_ == 5) && (hiveMetastoreConfigBuilder_ != null)) { + return hiveMetastoreConfigBuilder_.getMessageOrBuilder(); + } else { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); + } + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig, com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder> + getHiveMetastoreConfigFieldBuilder() { + if (hiveMetastoreConfigBuilder_ == null) { + if (!(metastoreConfigCase_ == 5)) { + metastoreConfig_ = com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.getDefaultInstance(); + } + hiveMetastoreConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig, com.google.cloud.metastore.v1alpha.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder>( + (com.google.cloud.metastore.v1alpha.HiveMetastoreConfig) metastoreConfig_, + getParentForChildren(), + isClean()); + metastoreConfig_ = null; + } + metastoreConfigCase_ = 5; + onChanged(); + return hiveMetastoreConfigBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object network_ = ""; + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + public com.google.protobuf.ByteString + getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int port_ ; + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000080); + port_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service.State getState() { + com.google.cloud.metastore.v1alpha.Service.State result = com.google.cloud.metastore.v1alpha.Service.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1alpha.Service.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1alpha.Service.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + stateMessage_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + stateMessage_ = getDefaultInstance().getStateMessage(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + stateMessage_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object artifactGcsUri_ = ""; + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + public java.lang.String getArtifactGcsUri() { + java.lang.Object ref = artifactGcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactGcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + public com.google.protobuf.ByteString + getArtifactGcsUriBytes() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The artifactGcsUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + artifactGcsUri_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearArtifactGcsUri() { + artifactGcsUri_ = getDefaultInstance().getArtifactGcsUri(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for artifactGcsUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + artifactGcsUri_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private int tier_ = 0; + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + @java.lang.Override public int getTierValue() { + return tier_; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @param value The enum numeric value on the wire for tier to set. + * @return This builder for chaining. + */ + public Builder setTierValue(int value) { + tier_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @return The tier. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service.Tier getTier() { + com.google.cloud.metastore.v1alpha.Service.Tier result = com.google.cloud.metastore.v1alpha.Service.Tier.forNumber(tier_); + return result == null ? com.google.cloud.metastore.v1alpha.Service.Tier.UNRECOGNIZED : result; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @param value The tier to set. + * @return This builder for chaining. + */ + public Builder setTier(com.google.cloud.metastore.v1alpha.Service.Tier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + tier_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @return This builder for chaining. + */ + public Builder clearTier() { + bitField0_ = (bitField0_ & ~0x00000800); + tier_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.MetadataIntegration metadataIntegration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataIntegration, com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder, com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder> metadataIntegrationBuilder_; + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + * @return Whether the metadataIntegration field is set. + */ + public boolean hasMetadataIntegration() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + * @return The metadataIntegration. + */ + public com.google.cloud.metastore.v1alpha.MetadataIntegration getMetadataIntegration() { + if (metadataIntegrationBuilder_ == null) { + return metadataIntegration_ == null ? com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance() : metadataIntegration_; + } else { + return metadataIntegrationBuilder_.getMessage(); + } + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + public Builder setMetadataIntegration(com.google.cloud.metastore.v1alpha.MetadataIntegration value) { + if (metadataIntegrationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataIntegration_ = value; + } else { + metadataIntegrationBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + public Builder setMetadataIntegration( + com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder builderForValue) { + if (metadataIntegrationBuilder_ == null) { + metadataIntegration_ = builderForValue.build(); + } else { + metadataIntegrationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + public Builder mergeMetadataIntegration(com.google.cloud.metastore.v1alpha.MetadataIntegration value) { + if (metadataIntegrationBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) && + metadataIntegration_ != null && + metadataIntegration_ != com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance()) { + getMetadataIntegrationBuilder().mergeFrom(value); + } else { + metadataIntegration_ = value; + } + } else { + metadataIntegrationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + public Builder clearMetadataIntegration() { + bitField0_ = (bitField0_ & ~0x00001000); + metadataIntegration_ = null; + if (metadataIntegrationBuilder_ != null) { + metadataIntegrationBuilder_.dispose(); + metadataIntegrationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + public com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder getMetadataIntegrationBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getMetadataIntegrationFieldBuilder().getBuilder(); + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + public com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder getMetadataIntegrationOrBuilder() { + if (metadataIntegrationBuilder_ != null) { + return metadataIntegrationBuilder_.getMessageOrBuilder(); + } else { + return metadataIntegration_ == null ? + com.google.cloud.metastore.v1alpha.MetadataIntegration.getDefaultInstance() : metadataIntegration_; + } + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataIntegration, com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder, com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder> + getMetadataIntegrationFieldBuilder() { + if (metadataIntegrationBuilder_ == null) { + metadataIntegrationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataIntegration, com.google.cloud.metastore.v1alpha.MetadataIntegration.Builder, com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder>( + getMetadataIntegration(), + getParentForChildren(), + isClean()); + metadataIntegration_ = null; + } + return metadataIntegrationBuilder_; + } + + private com.google.cloud.metastore.v1alpha.MaintenanceWindow maintenanceWindow_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MaintenanceWindow, com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder, com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder> maintenanceWindowBuilder_; + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + public boolean hasMaintenanceWindow() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + public com.google.cloud.metastore.v1alpha.MaintenanceWindow getMaintenanceWindow() { + if (maintenanceWindowBuilder_ == null) { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } else { + return maintenanceWindowBuilder_.getMessage(); + } + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + public Builder setMaintenanceWindow(com.google.cloud.metastore.v1alpha.MaintenanceWindow value) { + if (maintenanceWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maintenanceWindow_ = value; + } else { + maintenanceWindowBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + public Builder setMaintenanceWindow( + com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder builderForValue) { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindow_ = builderForValue.build(); + } else { + maintenanceWindowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + public Builder mergeMaintenanceWindow(com.google.cloud.metastore.v1alpha.MaintenanceWindow value) { + if (maintenanceWindowBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + maintenanceWindow_ != null && + maintenanceWindow_ != com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance()) { + getMaintenanceWindowBuilder().mergeFrom(value); + } else { + maintenanceWindow_ = value; + } + } else { + maintenanceWindowBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + public Builder clearMaintenanceWindow() { + bitField0_ = (bitField0_ & ~0x00002000); + maintenanceWindow_ = null; + if (maintenanceWindowBuilder_ != null) { + maintenanceWindowBuilder_.dispose(); + maintenanceWindowBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + public com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder getMaintenanceWindowBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getMaintenanceWindowFieldBuilder().getBuilder(); + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + public com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder() { + if (maintenanceWindowBuilder_ != null) { + return maintenanceWindowBuilder_.getMessageOrBuilder(); + } else { + return maintenanceWindow_ == null ? + com.google.cloud.metastore.v1alpha.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MaintenanceWindow, com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder, com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder> + getMaintenanceWindowFieldBuilder() { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MaintenanceWindow, com.google.cloud.metastore.v1alpha.MaintenanceWindow.Builder, com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder>( + getMaintenanceWindow(), + getParentForChildren(), + isClean()); + maintenanceWindow_ = null; + } + return maintenanceWindowBuilder_; + } + + private java.lang.Object uid_ = ""; + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uid_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.MetadataManagementActivity metadataManagementActivity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataManagementActivity, com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder> metadataManagementActivityBuilder_; + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + public boolean hasMetadataManagementActivity() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + public com.google.cloud.metastore.v1alpha.MetadataManagementActivity getMetadataManagementActivity() { + if (metadataManagementActivityBuilder_ == null) { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } else { + return metadataManagementActivityBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataManagementActivity(com.google.cloud.metastore.v1alpha.MetadataManagementActivity value) { + if (metadataManagementActivityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataManagementActivity_ = value; + } else { + metadataManagementActivityBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataManagementActivity( + com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder builderForValue) { + if (metadataManagementActivityBuilder_ == null) { + metadataManagementActivity_ = builderForValue.build(); + } else { + metadataManagementActivityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeMetadataManagementActivity(com.google.cloud.metastore.v1alpha.MetadataManagementActivity value) { + if (metadataManagementActivityBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) && + metadataManagementActivity_ != null && + metadataManagementActivity_ != com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance()) { + getMetadataManagementActivityBuilder().mergeFrom(value); + } else { + metadataManagementActivity_ = value; + } + } else { + metadataManagementActivityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearMetadataManagementActivity() { + bitField0_ = (bitField0_ & ~0x00008000); + metadataManagementActivity_ = null; + if (metadataManagementActivityBuilder_ != null) { + metadataManagementActivityBuilder_.dispose(); + metadataManagementActivityBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder getMetadataManagementActivityBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getMetadataManagementActivityFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder() { + if (metadataManagementActivityBuilder_ != null) { + return metadataManagementActivityBuilder_.getMessageOrBuilder(); + } else { + return metadataManagementActivity_ == null ? + com.google.cloud.metastore.v1alpha.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataManagementActivity, com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder> + getMetadataManagementActivityFieldBuilder() { + if (metadataManagementActivityBuilder_ == null) { + metadataManagementActivityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataManagementActivity, com.google.cloud.metastore.v1alpha.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder>( + getMetadataManagementActivity(), + getParentForChildren(), + isClean()); + metadataManagementActivity_ = null; + } + return metadataManagementActivityBuilder_; + } + + private int releaseChannel_ = 0; + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + @java.lang.Override public int getReleaseChannelValue() { + return releaseChannel_; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The enum numeric value on the wire for releaseChannel to set. + * @return This builder for chaining. + */ + public Builder setReleaseChannelValue(int value) { + releaseChannel_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service.ReleaseChannel getReleaseChannel() { + com.google.cloud.metastore.v1alpha.Service.ReleaseChannel result = com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.forNumber(releaseChannel_); + return result == null ? com.google.cloud.metastore.v1alpha.Service.ReleaseChannel.UNRECOGNIZED : result; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The releaseChannel to set. + * @return This builder for chaining. + */ + public Builder setReleaseChannel(com.google.cloud.metastore.v1alpha.Service.ReleaseChannel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + releaseChannel_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearReleaseChannel() { + bitField0_ = (bitField0_ & ~0x00010000); + releaseChannel_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.EncryptionConfig, com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder, com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder> encryptionConfigBuilder_; + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + public com.google.cloud.metastore.v1alpha.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setEncryptionConfig(com.google.cloud.metastore.v1alpha.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setEncryptionConfig( + com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder mergeEncryptionConfig(com.google.cloud.metastore.v1alpha.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + encryptionConfig_ != null && + encryptionConfig_ != com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00020000); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder getEncryptionConfigBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null ? + com.google.cloud.metastore.v1alpha.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.EncryptionConfig, com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder, com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.EncryptionConfig, com.google.cloud.metastore.v1alpha.EncryptionConfig.Builder, com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder>( + getEncryptionConfig(), + getParentForChildren(), + isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private com.google.cloud.metastore.v1alpha.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig, com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder> networkConfigBuilder_; + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null ? com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + public Builder setNetworkConfig(com.google.cloud.metastore.v1alpha.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + } else { + networkConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + public Builder setNetworkConfig( + com.google.cloud.metastore.v1alpha.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + public Builder mergeNetworkConfig(com.google.cloud.metastore.v1alpha.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) && + networkConfig_ != null && + networkConfig_ != com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance()) { + getNetworkConfigBuilder().mergeFrom(value); + } else { + networkConfig_ = value; + } + } else { + networkConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x00040000); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfig.Builder getNetworkConfigBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + public com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null ? + com.google.cloud.metastore.v1alpha.NetworkConfig.getDefaultInstance() : networkConfig_; + } + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig, com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.NetworkConfig, com.google.cloud.metastore.v1alpha.NetworkConfig.Builder, com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder>( + getNetworkConfig(), + getParentForChildren(), + isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + + private int databaseType_ = 0; + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The enum numeric value on the wire for databaseType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseTypeValue(int value) { + databaseType_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1alpha.Service.DatabaseType result = com.google.cloud.metastore.v1alpha.Service.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1alpha.Service.DatabaseType.UNRECOGNIZED : result; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The databaseType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseType(com.google.cloud.metastore.v1alpha.Service.DatabaseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00080000; + databaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearDatabaseType() { + bitField0_ = (bitField0_ & ~0x00080000); + databaseType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1alpha.TelemetryConfig telemetryConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.TelemetryConfig, com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder, com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder> telemetryConfigBuilder_; + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + public boolean hasTelemetryConfig() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + public com.google.cloud.metastore.v1alpha.TelemetryConfig getTelemetryConfig() { + if (telemetryConfigBuilder_ == null) { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } else { + return telemetryConfigBuilder_.getMessage(); + } + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + public Builder setTelemetryConfig(com.google.cloud.metastore.v1alpha.TelemetryConfig value) { + if (telemetryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + telemetryConfig_ = value; + } else { + telemetryConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + public Builder setTelemetryConfig( + com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder builderForValue) { + if (telemetryConfigBuilder_ == null) { + telemetryConfig_ = builderForValue.build(); + } else { + telemetryConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + public Builder mergeTelemetryConfig(com.google.cloud.metastore.v1alpha.TelemetryConfig value) { + if (telemetryConfigBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) && + telemetryConfig_ != null && + telemetryConfig_ != com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance()) { + getTelemetryConfigBuilder().mergeFrom(value); + } else { + telemetryConfig_ = value; + } + } else { + telemetryConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + public Builder clearTelemetryConfig() { + bitField0_ = (bitField0_ & ~0x00100000); + telemetryConfig_ = null; + if (telemetryConfigBuilder_ != null) { + telemetryConfigBuilder_.dispose(); + telemetryConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + public com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder getTelemetryConfigBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getTelemetryConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + public com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { + if (telemetryConfigBuilder_ != null) { + return telemetryConfigBuilder_.getMessageOrBuilder(); + } else { + return telemetryConfig_ == null ? + com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.TelemetryConfig, com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder, com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder> + getTelemetryConfigFieldBuilder() { + if (telemetryConfigBuilder_ == null) { + telemetryConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.TelemetryConfig, com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder, com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder>( + getTelemetryConfig(), + getParentForChildren(), + isClean()); + telemetryConfig_ = null; + } + return telemetryConfigBuilder_; + } + + private com.google.cloud.metastore.v1alpha.ScalingConfig scalingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.ScalingConfig, com.google.cloud.metastore.v1alpha.ScalingConfig.Builder, com.google.cloud.metastore.v1alpha.ScalingConfigOrBuilder> scalingConfigBuilder_; + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + public boolean hasScalingConfig() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + public com.google.cloud.metastore.v1alpha.ScalingConfig getScalingConfig() { + if (scalingConfigBuilder_ == null) { + return scalingConfig_ == null ? com.google.cloud.metastore.v1alpha.ScalingConfig.getDefaultInstance() : scalingConfig_; + } else { + return scalingConfigBuilder_.getMessage(); + } + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + public Builder setScalingConfig(com.google.cloud.metastore.v1alpha.ScalingConfig value) { + if (scalingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scalingConfig_ = value; + } else { + scalingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + public Builder setScalingConfig( + com.google.cloud.metastore.v1alpha.ScalingConfig.Builder builderForValue) { + if (scalingConfigBuilder_ == null) { + scalingConfig_ = builderForValue.build(); + } else { + scalingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + public Builder mergeScalingConfig(com.google.cloud.metastore.v1alpha.ScalingConfig value) { + if (scalingConfigBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) && + scalingConfig_ != null && + scalingConfig_ != com.google.cloud.metastore.v1alpha.ScalingConfig.getDefaultInstance()) { + getScalingConfigBuilder().mergeFrom(value); + } else { + scalingConfig_ = value; + } + } else { + scalingConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + public Builder clearScalingConfig() { + bitField0_ = (bitField0_ & ~0x00200000); + scalingConfig_ = null; + if (scalingConfigBuilder_ != null) { + scalingConfigBuilder_.dispose(); + scalingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + public com.google.cloud.metastore.v1alpha.ScalingConfig.Builder getScalingConfigBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getScalingConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + public com.google.cloud.metastore.v1alpha.ScalingConfigOrBuilder getScalingConfigOrBuilder() { + if (scalingConfigBuilder_ != null) { + return scalingConfigBuilder_.getMessageOrBuilder(); + } else { + return scalingConfig_ == null ? + com.google.cloud.metastore.v1alpha.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.ScalingConfig, com.google.cloud.metastore.v1alpha.ScalingConfig.Builder, com.google.cloud.metastore.v1alpha.ScalingConfigOrBuilder> + getScalingConfigFieldBuilder() { + if (scalingConfigBuilder_ == null) { + scalingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.ScalingConfig, com.google.cloud.metastore.v1alpha.ScalingConfig.Builder, com.google.cloud.metastore.v1alpha.ScalingConfigOrBuilder>( + getScalingConfig(), + getParentForChildren(), + isClean()); + scalingConfig_ = null; + } + return scalingConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.Service) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.Service) + private static final com.google.cloud.metastore.v1alpha.Service DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.Service(); + } + + public static com.google.cloud.metastore.v1alpha.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Service parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceName.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceName.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceOrBuilder.java new file mode 100644 index 000000000000..11f052e1aa41 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ServiceOrBuilder.java @@ -0,0 +1,581 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ServiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.Service) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + boolean hasHiveMetastoreConfig(); + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + com.google.cloud.metastore.v1alpha.HiveMetastoreConfig getHiveMetastoreConfig(); + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5; + */ + com.google.cloud.metastore.v1alpha.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder(); + + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + java.lang.String getNetwork(); + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + com.google.protobuf.ByteString + getNetworkBytes(); + + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + /** + *
+   * The TCP port at which the metastore service is reached. Default: 9083.
+   * 
+ * + * int32 port = 9; + * @return The port. + */ + int getPort(); + + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1alpha.Service.State getState(); + + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString + getStateMessageBytes(); + + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + java.lang.String getArtifactGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + com.google.protobuf.ByteString + getArtifactGcsUriBytes(); + + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + int getTierValue(); + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.Tier tier = 13; + * @return The tier. + */ + com.google.cloud.metastore.v1alpha.Service.Tier getTier(); + + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + * @return Whether the metadataIntegration field is set. + */ + boolean hasMetadataIntegration(); + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + * @return The metadataIntegration. + */ + com.google.cloud.metastore.v1alpha.MetadataIntegration getMetadataIntegration(); + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14; + */ + com.google.cloud.metastore.v1alpha.MetadataIntegrationOrBuilder getMetadataIntegrationOrBuilder(); + + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + boolean hasMaintenanceWindow(); + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + com.google.cloud.metastore.v1alpha.MaintenanceWindow getMaintenanceWindow(); + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15; + */ + com.google.cloud.metastore.v1alpha.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder(); + + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + java.lang.String getUid(); + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); + + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + boolean hasMetadataManagementActivity(); + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + com.google.cloud.metastore.v1alpha.MetadataManagementActivity getMetadataManagementActivity(); + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1alpha.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder(); + + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + int getReleaseChannelValue(); + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + com.google.cloud.metastore.v1alpha.Service.ReleaseChannel getReleaseChannel(); + + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + com.google.cloud.metastore.v1alpha.EncryptionConfig getEncryptionConfig(); + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1alpha.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); + + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + com.google.cloud.metastore.v1alpha.NetworkConfig getNetworkConfig(); + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21; + */ + com.google.cloud.metastore.v1alpha.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); + + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + int getDatabaseTypeValue(); + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + com.google.cloud.metastore.v1alpha.Service.DatabaseType getDatabaseType(); + + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + boolean hasTelemetryConfig(); + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + com.google.cloud.metastore.v1alpha.TelemetryConfig getTelemetryConfig(); + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23; + */ + com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder(); + + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + boolean hasScalingConfig(); + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + com.google.cloud.metastore.v1alpha.ScalingConfig getScalingConfig(); + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24; + */ + com.google.cloud.metastore.v1alpha.ScalingConfigOrBuilder getScalingConfigOrBuilder(); + + public com.google.cloud.metastore.v1alpha.Service.MetastoreConfigCase getMetastoreConfigCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfig.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfig.java new file mode 100644 index 000000000000..563102ffe39c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfig.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Telemetry Configuration for the Dataproc Metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.TelemetryConfig} + */ +public final class TelemetryConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.TelemetryConfig) + TelemetryConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use TelemetryConfig.newBuilder() to construct. + private TelemetryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TelemetryConfig() { + logFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TelemetryConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.TelemetryConfig.class, com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder.class); + } + + /** + * Protobuf enum {@code google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat} + */ + public enum LogFormat + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The LOG_FORMAT is not set.
+     * 
+ * + * LOG_FORMAT_UNSPECIFIED = 0; + */ + LOG_FORMAT_UNSPECIFIED(0), + /** + *
+     * Logging output uses the legacy `textPayload` format.
+     * 
+ * + * LEGACY = 1; + */ + LEGACY(1), + /** + *
+     * Logging output uses the `jsonPayload` format.
+     * 
+ * + * JSON = 2; + */ + JSON(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The LOG_FORMAT is not set.
+     * 
+ * + * LOG_FORMAT_UNSPECIFIED = 0; + */ + public static final int LOG_FORMAT_UNSPECIFIED_VALUE = 0; + /** + *
+     * Logging output uses the legacy `textPayload` format.
+     * 
+ * + * LEGACY = 1; + */ + public static final int LEGACY_VALUE = 1; + /** + *
+     * Logging output uses the `jsonPayload` format.
+     * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LogFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LogFormat forNumber(int value) { + switch (value) { + case 0: return LOG_FORMAT_UNSPECIFIED; + case 1: return LEGACY; + case 2: return JSON; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LogFormat> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LogFormat findValueByNumber(int number) { + return LogFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.TelemetryConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final LogFormat[] VALUES = values(); + + public static LogFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LogFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat) + } + + public static final int LOG_FORMAT_FIELD_NUMBER = 1; + private int logFormat_ = 0; + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + @java.lang.Override public int getLogFormatValue() { + return logFormat_; + } + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + @java.lang.Override public com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat getLogFormat() { + com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat result = com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.forNumber(logFormat_); + return result == null ? com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (logFormat_ != com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED.getNumber()) { + output.writeEnum(1, logFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (logFormat_ != com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, logFormat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.TelemetryConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.TelemetryConfig other = (com.google.cloud.metastore.v1alpha.TelemetryConfig) obj; + + if (logFormat_ != other.logFormat_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOG_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + logFormat_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.TelemetryConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.TelemetryConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Telemetry Configuration for the Dataproc Metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.TelemetryConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.TelemetryConfig) + com.google.cloud.metastore.v1alpha.TelemetryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.TelemetryConfig.class, com.google.cloud.metastore.v1alpha.TelemetryConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.TelemetryConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + logFormat_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_TelemetryConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.TelemetryConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.TelemetryConfig build() { + com.google.cloud.metastore.v1alpha.TelemetryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.TelemetryConfig buildPartial() { + com.google.cloud.metastore.v1alpha.TelemetryConfig result = new com.google.cloud.metastore.v1alpha.TelemetryConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.TelemetryConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.logFormat_ = logFormat_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.TelemetryConfig) { + return mergeFrom((com.google.cloud.metastore.v1alpha.TelemetryConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.TelemetryConfig other) { + if (other == com.google.cloud.metastore.v1alpha.TelemetryConfig.getDefaultInstance()) return this; + if (other.logFormat_ != 0) { + setLogFormatValue(other.getLogFormatValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + logFormat_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int logFormat_ = 0; + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + @java.lang.Override public int getLogFormatValue() { + return logFormat_; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @param value The enum numeric value on the wire for logFormat to set. + * @return This builder for chaining. + */ + public Builder setLogFormatValue(int value) { + logFormat_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat getLogFormat() { + com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat result = com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.forNumber(logFormat_); + return result == null ? com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat.UNRECOGNIZED : result; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @param value The logFormat to set. + * @return This builder for chaining. + */ + public Builder setLogFormat(com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + logFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @return This builder for chaining. + */ + public Builder clearLogFormat() { + bitField0_ = (bitField0_ & ~0x00000001); + logFormat_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.TelemetryConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.TelemetryConfig) + private static final com.google.cloud.metastore.v1alpha.TelemetryConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.TelemetryConfig(); + } + + public static com.google.cloud.metastore.v1alpha.TelemetryConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TelemetryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.TelemetryConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfigOrBuilder.java new file mode 100644 index 000000000000..6926f310edc3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/TelemetryConfigOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface TelemetryConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.TelemetryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + int getLogFormatValue(); + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + com.google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat getLogFormat(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequest.java new file mode 100644 index 000000000000..e6102ece6978 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequest.java @@ -0,0 +1,1173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for UpdateFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateFederationRequest} + */ +public final class UpdateFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.UpdateFederationRequest) + UpdateFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateFederationRequest.newBuilder() to construct. + private UpdateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateFederationRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.UpdateFederationRequest.class, com.google.cloud.metastore.v1alpha.UpdateFederationRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int FEDERATION_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1alpha.Federation federation_; + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + @java.lang.Override + public boolean hasFederation() { + return federation_ != null; + } + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Federation getFederation() { + return federation_ == null ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() : federation_; + } + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder() { + return federation_ == null ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() : federation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (federation_ != null) { + output.writeMessage(2, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (federation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.UpdateFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.UpdateFederationRequest other = (com.google.cloud.metastore.v1alpha.UpdateFederationRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasFederation() != other.hasFederation()) return false; + if (hasFederation()) { + if (!getFederation() + .equals(other.getFederation())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasFederation()) { + hash = (37 * hash) + FEDERATION_FIELD_NUMBER; + hash = (53 * hash) + getFederation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.UpdateFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.UpdateFederationRequest) + com.google.cloud.metastore.v1alpha.UpdateFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.UpdateFederationRequest.class, com.google.cloud.metastore.v1alpha.UpdateFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.UpdateFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreFederationProto.internal_static_google_cloud_metastore_v1alpha_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.UpdateFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateFederationRequest build() { + com.google.cloud.metastore.v1alpha.UpdateFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateFederationRequest buildPartial() { + com.google.cloud.metastore.v1alpha.UpdateFederationRequest result = new com.google.cloud.metastore.v1alpha.UpdateFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.UpdateFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.federation_ = federationBuilder_ == null + ? federation_ + : federationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.UpdateFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.UpdateFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.UpdateFederationRequest other) { + if (other == com.google.cloud.metastore.v1alpha.UpdateFederationRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasFederation()) { + mergeFederation(other.getFederation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getFederationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1alpha.Federation federation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder> federationBuilder_; + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + public boolean hasFederation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + public com.google.cloud.metastore.v1alpha.Federation getFederation() { + if (federationBuilder_ == null) { + return federation_ == null ? com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() : federation_; + } else { + return federationBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation(com.google.cloud.metastore.v1alpha.Federation value) { + if (federationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + federation_ = value; + } else { + federationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation( + com.google.cloud.metastore.v1alpha.Federation.Builder builderForValue) { + if (federationBuilder_ == null) { + federation_ = builderForValue.build(); + } else { + federationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFederation(com.google.cloud.metastore.v1alpha.Federation value) { + if (federationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + federation_ != null && + federation_ != com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance()) { + getFederationBuilder().mergeFrom(value); + } else { + federation_ = value; + } + } else { + federationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFederation() { + bitField0_ = (bitField0_ & ~0x00000002); + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.Federation.Builder getFederationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFederationFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder() { + if (federationBuilder_ != null) { + return federationBuilder_.getMessageOrBuilder(); + } else { + return federation_ == null ? + com.google.cloud.metastore.v1alpha.Federation.getDefaultInstance() : federation_; + } + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder> + getFederationFieldBuilder() { + if (federationBuilder_ == null) { + federationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Federation, com.google.cloud.metastore.v1alpha.Federation.Builder, com.google.cloud.metastore.v1alpha.FederationOrBuilder>( + getFederation(), + getParentForChildren(), + isClean()); + federation_ = null; + } + return federationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.UpdateFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.UpdateFederationRequest) + private static final com.google.cloud.metastore.v1alpha.UpdateFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.UpdateFederationRequest(); + } + + public static com.google.cloud.metastore.v1alpha.UpdateFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequestOrBuilder.java new file mode 100644 index 000000000000..3fad817802c4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateFederationRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore_federation.proto + +package com.google.cloud.metastore.v1alpha; + +public interface UpdateFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.UpdateFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + boolean hasFederation(); + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + com.google.cloud.metastore.v1alpha.Federation getFederation(); + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1alpha.FederationOrBuilder getFederationOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequest.java new file mode 100644 index 000000000000..938feefa028e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} + */ +public final class UpdateMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) + UpdateMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateMetadataImportRequest.newBuilder() to construct. + private UpdateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateMetadataImportRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.class, com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int METADATA_IMPORT_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1alpha.MetadataImport metadataImport_; + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + @java.lang.Override + public boolean hasMetadataImport() { + return metadataImport_ != null; + } + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport() { + return metadataImport_ == null ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() : metadataImport_; + } + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder() { + return metadataImport_ == null ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() : metadataImport_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (metadataImport_ != null) { + output.writeMessage(2, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (metadataImport_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest other = (com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasMetadataImport() != other.hasMetadataImport()) return false; + if (hasMetadataImport()) { + if (!getMetadataImport() + .equals(other.getMetadataImport())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasMetadataImport()) { + hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImport().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.class, com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest build() { + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest result = new com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataImport_ = metadataImportBuilder_ == null + ? metadataImport_ + : metadataImportBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasMetadataImport()) { + mergeMetadataImport(other.getMetadataImport()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getMetadataImportFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1alpha.MetadataImport metadataImport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> metadataImportBuilder_; + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + public boolean hasMetadataImport() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + public com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport() { + if (metadataImportBuilder_ == null) { + return metadataImport_ == null ? com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() : metadataImport_; + } else { + return metadataImportBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport(com.google.cloud.metastore.v1alpha.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataImport_ = value; + } else { + metadataImportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport( + com.google.cloud.metastore.v1alpha.MetadataImport.Builder builderForValue) { + if (metadataImportBuilder_ == null) { + metadataImport_ = builderForValue.build(); + } else { + metadataImportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeMetadataImport(com.google.cloud.metastore.v1alpha.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadataImport_ != null && + metadataImport_ != com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance()) { + getMetadataImportBuilder().mergeFrom(value); + } else { + metadataImport_ = value; + } + } else { + metadataImportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearMetadataImport() { + bitField0_ = (bitField0_ & ~0x00000002); + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.MetadataImport.Builder getMetadataImportBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataImportFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder() { + if (metadataImportBuilder_ != null) { + return metadataImportBuilder_.getMessageOrBuilder(); + } else { + return metadataImport_ == null ? + com.google.cloud.metastore.v1alpha.MetadataImport.getDefaultInstance() : metadataImport_; + } + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder> + getMetadataImportFieldBuilder() { + if (metadataImportBuilder_ == null) { + metadataImportBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.MetadataImport, com.google.cloud.metastore.v1alpha.MetadataImport.Builder, com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder>( + getMetadataImport(), + getParentForChildren(), + isClean()); + metadataImport_ = null; + } + return metadataImportBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) + private static final com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..72c870270218 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateMetadataImportRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface UpdateMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.UpdateMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + boolean hasMetadataImport(); + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + com.google.cloud.metastore.v1alpha.MetadataImport getMetadataImport(); + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1alpha.MetadataImportOrBuilder getMetadataImportOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequest.java new file mode 100644 index 000000000000..e85b10a20b61 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + *
+ * Request message for
+ * [DataprocMetastore.UpdateService][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateServiceRequest} + */ +public final class UpdateServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.UpdateServiceRequest) + UpdateServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateServiceRequest.newBuilder() to construct. + private UpdateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateServiceRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.UpdateServiceRequest.class, com.google.cloud.metastore.v1alpha.UpdateServiceRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SERVICE_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1alpha.Service service_; + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.Service getService() { + return service_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : service_; + } + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder() { + return service_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : service_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (service_ != null) { + output.writeMessage(2, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (service_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1alpha.UpdateServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.UpdateServiceRequest other = (com.google.cloud.metastore.v1alpha.UpdateServiceRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService() + .equals(other.getService())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1alpha.UpdateServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.UpdateService][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.UpdateServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.UpdateServiceRequest) + com.google.cloud.metastore.v1alpha.UpdateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.UpdateServiceRequest.class, com.google.cloud.metastore.v1alpha.UpdateServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.UpdateServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1alpha.MetastoreProto.internal_static_google_cloud_metastore_v1alpha_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.UpdateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateServiceRequest build() { + com.google.cloud.metastore.v1alpha.UpdateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateServiceRequest buildPartial() { + com.google.cloud.metastore.v1alpha.UpdateServiceRequest result = new com.google.cloud.metastore.v1alpha.UpdateServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.UpdateServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.service_ = serviceBuilder_ == null + ? service_ + : serviceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1alpha.UpdateServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1alpha.UpdateServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.UpdateServiceRequest other) { + if (other == com.google.cloud.metastore.v1alpha.UpdateServiceRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getServiceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1alpha.Service service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder> serviceBuilder_; + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + public boolean hasService() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + public com.google.cloud.metastore.v1alpha.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null ? com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService(com.google.cloud.metastore.v1alpha.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + } else { + serviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService( + com.google.cloud.metastore.v1alpha.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeService(com.google.cloud.metastore.v1alpha.Service value) { + if (serviceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + service_ != null && + service_ != com.google.cloud.metastore.v1alpha.Service.getDefaultInstance()) { + getServiceBuilder().mergeFrom(value); + } else { + service_ = value; + } + } else { + serviceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000002); + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.Service.Builder getServiceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null ? + com.google.cloud.metastore.v1alpha.Service.getDefaultInstance() : service_; + } + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1alpha.Service, com.google.cloud.metastore.v1alpha.Service.Builder, com.google.cloud.metastore.v1alpha.ServiceOrBuilder>( + getService(), + getParentForChildren(), + isClean()); + service_ = null; + } + return serviceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1alpha.UpdateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.UpdateServiceRequest) + private static final com.google.cloud.metastore.v1alpha.UpdateServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.UpdateServiceRequest(); + } + + public static com.google.cloud.metastore.v1alpha.UpdateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.UpdateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequestOrBuilder.java new file mode 100644 index 000000000000..10067ae225a8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/UpdateServiceRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface UpdateServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.UpdateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + boolean hasService(); + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + com.google.cloud.metastore.v1alpha.Service getService(); + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1alpha.ServiceOrBuilder getServiceOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore.proto b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore.proto new file mode 100644 index 000000000000..714280ceffda --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore.proto @@ -0,0 +1,1671 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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. + +syntax = "proto3"; + +package google.cloud.metastore.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/dayofweek.proto"; + +option go_package = "cloud.google.com/go/metastore/apiv1alpha/metastorepb;metastorepb"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreProto"; +option java_package = "com.google.cloud.metastore.v1alpha"; +option php_namespace = "Google\\Cloud\\Metastore\\V1alpha"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Subnetwork" + pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" +}; +option (google.api.resource_definition) = { + type: "dataplex.googleapis.com/Lake" + pattern: "projects/{project}/locations/{location}/lakes/{lake}" +}; + +// 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: +// +// * The service works with a collection of Google Cloud projects, named: +// `/projects/*` +// * Each project has a collection of available locations, named: `/locations/*` +// (a location must refer to a Google Cloud `region`) +// * Each location has a collection of services, named: `/services/*` +// * Dataproc Metastore services are resources with names of the form: +// +// `/projects/{project_number}/locations/{location_id}/services/{service_id}`. +service DataprocMetastore { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists services in a project and location. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/services" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single service. + rpc GetService(GetServiceRequest) returns (Service) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/services/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore service in a project and location. + rpc CreateService(CreateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/services" + body: "service" + }; + option (google.api.method_signature) = "parent,service,service_id"; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Updates the parameters of a single service. + rpc UpdateService(UpdateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{service.name=projects/*/locations/*/services/*}" + body: "service" + }; + option (google.api.method_signature) = "service,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Deletes a single service. + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/services/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Lists imports in a service. + rpc ListMetadataImports(ListMetadataImportsRequest) + returns (ListMetadataImportsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single import. + rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new MetadataImport in a given project and location. + rpc CreateMetadataImport(CreateMetadataImportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports" + body: "metadata_import" + }; + option (google.api.method_signature) = + "parent,metadata_import,metadata_import_id"; + option (google.longrunning.operation_info) = { + response_type: "MetadataImport" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Updates a single import. + // Only the description field of MetadataImport is supported to be updated. + rpc UpdateMetadataImport(UpdateMetadataImportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}" + body: "metadata_import" + }; + option (google.api.method_signature) = "metadata_import,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MetadataImport" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Exports metadata from a service. + rpc ExportMetadata(ExportMetadataRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MetadataExport" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Restores a service from a backup. + rpc RestoreService(RestoreServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{service=projects/*/locations/*/services/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "service,backup"; + option (google.longrunning.operation_info) = { + response_type: "Restore" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Lists backups in a service. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/services/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new backup in a given project and location. + rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/services/*}/backups" + body: "backup" + }; + option (google.api.method_signature) = "parent,backup,backup_id"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Deletes a single backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Removes the attached IAM policies for a resource + rpc RemoveIamPolicy(RemoveIamPolicyRequest) + returns (RemoveIamPolicyResponse) { + option (google.api.http) = { + post: "/v1alpha/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy" + body: "*" + }; + } + + // Query DPMS metadata. + rpc QueryMetadata(QueryMetadataRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{service=projects/*/locations/*/services/*}:queryMetadata" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "QueryMetadataResponse" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Move a table to another database. + rpc MoveTableToDatabase(MoveTableToDatabaseRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{service=projects/*/locations/*/services/*}:moveTableToDatabase" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MoveTableToDatabaseResponse" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Alter metadata resource location. The metadata resource can be a database, + // table, or partition. This functionality only updates the parent directory + // for the respective metadata resource and does not transfer any existing + // data to the new location. + rpc AlterMetadataResourceLocation(AlterMetadataResourceLocationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{service=projects/*/locations/*/services/*}:alterLocation" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "AlterMetadataResourceLocationResponse" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } +} + +// A managed metastore service that serves metadata queries. +message Service { + option (google.api.resource) = { + type: "metastore.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/services/{service}" + }; + + // The current state of the metastore service. + enum State { + // The state of the metastore service is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore service is in the process of being created. + CREATING = 1; + + // The metastore service is running and ready to serve queries. + ACTIVE = 2; + + // The metastore service is entering suspension. Its query-serving + // availability may cease unexpectedly. + SUSPENDING = 3; + + // The metastore service is suspended and unable to serve queries. + SUSPENDED = 4; + + // The metastore service is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 5; + + // The metastore service is undergoing deletion. It cannot be used. + DELETING = 6; + + // The metastore service has encountered an error and cannot be used. The + // metastore service should be deleted. + ERROR = 7; + } + + // Available service tiers. + enum Tier { + // The tier is not set. + TIER_UNSPECIFIED = 0; + + // The developer tier provides limited scalability and no fault tolerance. + // Good for low-cost proof-of-concept. + DEVELOPER = 1; + + // The enterprise tier provides multi-zone high availability, and sufficient + // scalability for enterprise-level Dataproc Metastore workloads. + ENTERPRISE = 3; + } + + // Release channels bundle features of varying levels of stability. Newer + // features may be introduced initially into less stable release channels and + // can be automatically promoted into more stable release channels. + enum ReleaseChannel { + // Release channel is not specified. + RELEASE_CHANNEL_UNSPECIFIED = 0; + + // The `CANARY` release channel contains the newest features, which may be + // unstable and subject to unresolved issues with no known workarounds. + // Services using the `CANARY` release channel are not subject to any SLAs. + CANARY = 1; + + // The `STABLE` release channel contains features that are considered stable + // and have been validated for production use. + STABLE = 2; + } + + // The backend database type for the metastore service. + enum DatabaseType { + // The DATABASE_TYPE is not set. + DATABASE_TYPE_UNSPECIFIED = 0; + + // MySQL is used to persist the metastore data. + MYSQL = 1; + + // Spanner is used to persist the metastore data. + SPANNER = 2; + } + + // Configuration properties specific to the underlying metastore service + // technology (the software that serves metastore queries). + oneof metastore_config { + // Configuration information specific to running Hive metastore + // software as the metastore service. + HiveMetastoreConfig hive_metastore_config = 5; + } + + // Immutable. The relative resource name of the metastore service, in the + // following format: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore service was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore service was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore service. + map labels = 4; + + // Immutable. The relative resource name of the VPC network on which the + // instance can be accessed. It is specified in the following form: + // + // `projects/{project_number}/global/networks/{network_id}`. + string network = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Output only. The URI of the endpoint used to access the metastore service. + string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The TCP port at which the metastore service is reached. Default: 9083. + int32 port = 9; + + // Output only. The current state of the metastore service. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the + // metastore service, if available. + string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A Cloud Storage URI (starting with `gs://`) that specifies + // where artifacts related to the metastore service are stored. + string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The tier of the service. + Tier tier = 13; + + // The setting that defines how metastore metadata should be integrated with + // external services and systems. + MetadataIntegration metadata_integration = 14; + + // The one hour maintenance window of the metastore service. This specifies + // when the service can be restarted for maintenance purposes in UTC time. + // Maintenance window is not needed for services with the SPANNER + // database type. + MaintenanceWindow maintenance_window = 15; + + // Output only. The globally unique resource identifier of the metastore + // service. + string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The metadata management activities of the metastore service. + MetadataManagementActivity metadata_management_activity = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The release channel of the service. + // If unspecified, defaults to `STABLE`. + ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Information used to configure the Dataproc Metastore service to + // encrypt customer data at rest. Cannot be updated. + EncryptionConfig encryption_config = 20 + [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying the network settings for the + // Dataproc Metastore service. + NetworkConfig network_config = 21; + + // Immutable. The database type that the Metastore service stores its data. + DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying telemetry settings for the Dataproc Metastore + // service. If unspecified defaults to `JSON`. + TelemetryConfig telemetry_config = 23; + + // Scaling configuration of the metastore service. + ScalingConfig scaling_config = 24; +} + +// Specifies how metastore metadata should be integrated with external services. +message MetadataIntegration { + // The integration config for the Data Catalog service. + DataCatalogConfig data_catalog_config = 1; + + // The integration config for the Dataplex service. + DataplexConfig dataplex_config = 2; +} + +// Specifies how metastore metadata should be integrated with the Data Catalog +// service. +message DataCatalogConfig { + // Defines whether the metastore metadata should be synced to Data Catalog. + // The default value is to disable syncing metastore metadata to Data Catalog. + bool enabled = 2; +} + +// Specifies how metastore metadata should be integrated with the Dataplex +// service. +message DataplexConfig { + // A reference to the Lake resources that this metastore service is attached + // to. The key is the lake resource name. Example: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + map lake_resources = 1; +} + +// Represents a Lake resource +message Lake { + // The Lake resource name. + // Example: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + string name = 1 [ + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; +} + +// Maintenance window. This specifies when Dataproc Metastore +// may perform system maintenance operation to the service. +message MaintenanceWindow { + // The hour of day (0-23) when the window starts. + google.protobuf.Int32Value hour_of_day = 1; + + // The day of week, when the window starts. + google.type.DayOfWeek day_of_week = 2; +} + +// Specifies configuration information specific to running Hive metastore +// software as the metastore service. +message HiveMetastoreConfig { + // Protocols available for serving the metastore service endpoint. + enum EndpointProtocol { + // The protocol is not set. + ENDPOINT_PROTOCOL_UNSPECIFIED = 0; + + // Use the legacy Apache Thrift protocol for the metastore service endpoint. + THRIFT = 1; + + // Use the modernized gRPC protocol for the metastore service endpoint. + GRPC = 2; + } + + // Immutable. The Hive metastore schema version. + string version = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // A mapping of Hive metastore configuration key-value pairs to apply to the + // Hive metastore (configured in `hive-site.xml`). The mappings + // override system defaults (some keys cannot be overridden). These + // overrides are also applied to auxiliary versions and can be further + // customized in the auxiliary version's `AuxiliaryVersionConfig`. + map config_overrides = 2; + + // Information used to configure the Hive metastore service as a service + // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService` + // method and specify this field's path + // (`hive_metastore_config.kerberos_config`) in the request's `update_mask` + // while omitting this field from the request's `service`. + KerberosConfig kerberos_config = 3; + + // The protocol to use for the metastore service endpoint. If unspecified, + // defaults to `THRIFT`. + EndpointProtocol endpoint_protocol = 4; + + // A mapping of Hive metastore version to the auxiliary version + // configuration. When specified, a secondary Hive metastore service is + // created along with the primary service. All auxiliary versions must be less + // than the service's primary version. The key is the auxiliary service name + // and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This + // means that the first character must be a lowercase letter, and all the + // following characters must be hyphens, lowercase letters, or digits, except + // the last character, which cannot be a hyphen. + map auxiliary_versions = 5; +} + +// Configuration information for a Kerberos principal. +message KerberosConfig { + // A Kerberos keytab file that can be used to authenticate a service principal + // with a Kerberos Key Distribution Center (KDC). + Secret keytab = 1; + + // A Kerberos principal that exists in the both the keytab the KDC + // to authenticate as. A typical principal is of the form + // `primary/instance@REALM`, but there is no exact format. + string principal = 2; + + // A Cloud Storage URI that specifies the path to a + // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`, + // although the file does not need to be named krb5.conf explicitly. + string krb5_config_gcs_uri = 3; +} + +// A securely stored value. +message Secret { + oneof value { + // The relative resource name of a Secret Manager secret version, in the + // following form: + // + // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`. + string cloud_secret = 2; + } +} + +// Encryption settings for the service. +message EncryptionConfig { + // The fully qualified customer provided Cloud KMS key name to use for + // customer data encryption, in the following form: + // + // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`. + string kms_key = 1; +} + +// Configuration information for the auxiliary service versions. +message AuxiliaryVersionConfig { + // The Hive metastore version of the auxiliary service. It must be less + // than the primary Hive metastore service's version. + string version = 1; + + // A mapping of Hive metastore configuration key-value pairs to apply to the + // auxiliary Hive metastore (configured in `hive-site.xml`) in addition to + // the primary version's overrides. If keys are present in both the auxiliary + // version's overrides and the primary version's overrides, the value from + // the auxiliary version's overrides takes precedence. + map config_overrides = 2; + + // Output only. The network configuration contains the endpoint URI(s) of the + // auxiliary Hive metastore service. + NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Network configuration for the Dataproc Metastore service. +message NetworkConfig { + // Contains information of the customer's network configurations. + message Consumer { + oneof vpc_resource { + // Immutable. The subnetwork of the customer project from which an IP + // address is reserved and used as the Dataproc Metastore service's + // endpoint. It is accessible to hosts in the subnet and to all + // hosts in a subnet in the same region and same network. There must + // be at least one IP address available in the subnet's primary range. The + // subnet is specified in the following form: + // + // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}` + string subnetwork = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Subnetwork" + } + ]; + } + + // Output only. The URI of the endpoint used to access the metastore + // service. + string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The consumer-side network configuration for the Dataproc + // Metastore instance. + repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Enables custom routes to be imported and exported for the Dataproc + // Metastore service's peered VPC network. + bool custom_routes_enabled = 2; +} + +// Telemetry Configuration for the Dataproc Metastore service. +message TelemetryConfig { + enum LogFormat { + // The LOG_FORMAT is not set. + LOG_FORMAT_UNSPECIFIED = 0; + + // Logging output uses the legacy `textPayload` format. + LEGACY = 1; + + // Logging output uses the `jsonPayload` format. + JSON = 2; + } + + // The output format of the Dataproc Metastore service's logs. + LogFormat log_format = 1; +} + +// The metadata management activities of the metastore service. +message MetadataManagementActivity { + // Output only. The latest metadata exports of the metastore service. + repeated MetadataExport metadata_exports = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The latest restores of the metastore service. + repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A metastore resource that imports metadata. +message MetadataImport { + option (google.api.resource) = { + type: "metastore.googleapis.com/MetadataImport" + pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}" + }; + + // A specification of the location of and metadata about a database dump from + // a relational database management system. + message DatabaseDump { + // The type of the database. + enum DatabaseType { + // The type of the source database is unknown. + DATABASE_TYPE_UNSPECIFIED = 0; + + // The type of the source database is MySQL. + MYSQL = 1; + } + + // The type of the database. + DatabaseType database_type = 1 [deprecated = true]; + + // A Cloud Storage object or folder URI that specifies the source from which + // to import metadata. It must begin with `gs://`. + string gcs_uri = 2; + + // The name of the source database. + string source_database = 3 [deprecated = true]; + + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. + DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // The current state of the metadata import. + enum State { + // The state of the metadata import is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata import is running. + RUNNING = 1; + + // The metadata import completed successfully. + SUCCEEDED = 2; + + // The metadata import is being updated. + UPDATING = 3; + + // The metadata import failed, and attempted metadata changes were rolled + // back. + FAILED = 4; + } + + // The metadata to be imported. + oneof metadata { + // Immutable. A database dump from a pre-existing metastore's database. + DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Immutable. The relative resource name of the metadata import, of the form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The description of the metadata import. + string description = 2; + + // Output only. The time when the metadata import was started. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metadata import was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metadata import finished. + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the metadata import. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a metadata export operation. +message MetadataExport { + // The current state of the metadata export. + enum State { + // The state of the metadata export is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata export is running. + RUNNING = 1; + + // The metadata export completed successfully. + SUCCEEDED = 2; + + // The metadata export failed. + FAILED = 3; + + // The metadata export is cancelled. + CANCELLED = 4; + } + + oneof destination { + // Output only. A Cloud Storage URI of a folder that metadata are exported + // to, in the form of + // `gs:////`, where + // `` is automatically generated. + string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The time when the export started. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the export ended. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the export. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the database dump. + DatabaseDumpSpec.Type database_dump_type = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a backup resource. +message Backup { + option (google.api.resource) = { + type: "metastore.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/services/{service}/backups/{backup}" + }; + + // The current state of the backup. + enum State { + // The state of the backup is unknown. + STATE_UNSPECIFIED = 0; + + // The backup is being created. + CREATING = 1; + + // The backup is being deleted. + DELETING = 2; + + // The backup is active and ready to use. + ACTIVE = 3; + + // The backup failed. + FAILED = 4; + + // The backup is being restored. + RESTORING = 5; + } + + // Immutable. The relative resource name of the backup, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the backup was started. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the backup finished creating. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the backup. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revision of the service at the time of backup. + Service service_revision = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The description of the backup. + string description = 6; + + // Output only. Services that are restoring from the backup. + repeated string restoring_services = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a metadata restore operation. +message Restore { + // The current state of the restore. + enum State { + // The state of the metadata restore is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata restore is running. + RUNNING = 1; + + // The metadata restore completed successfully. + SUCCEEDED = 2; + + // The metadata restore failed. + FAILED = 3; + + // The metadata restore is cancelled. + CANCELLED = 4; + } + + // The type of restore. If unspecified, defaults to `METADATA_ONLY`. + enum RestoreType { + // The restore type is unknown. + RESTORE_TYPE_UNSPECIFIED = 0; + + // The service's metadata and configuration are restored. + FULL = 1; + + // Only the service's metadata is restored. + METADATA_ONLY = 2; + } + + // Output only. The time when the restore started. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the restore ended. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the restore. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. 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}`. + string backup = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Output only. The type of restore. + RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The restore details containing the revision of the service to + // be restored to, in format of JSON. + string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents the scaling configuration of a metastore service. +message ScalingConfig { + // Metastore instance sizes. + enum InstanceSize { + // Unspecified instance size + INSTANCE_SIZE_UNSPECIFIED = 0; + + // Extra small instance size, maps to a scaling factor of 0.1. + EXTRA_SMALL = 1; + + // Small instance size, maps to a scaling factor of 0.5. + SMALL = 2; + + // Medium instance size, maps to a scaling factor of 1.0. + MEDIUM = 3; + + // Large instance size, maps to a scaling factor of 3.0. + LARGE = 4; + + // Extra large instance size, maps to a scaling factor of 6.0. + EXTRA_LARGE = 5; + } + + // Represents either a predetermined instance size or a numeric + // scaling factor. + oneof scaling_model { + // An enum of readable instance sizes, with each instance size mapping to a + // float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) + InstanceSize instance_size = 1; + + // Scaling factor, increments of 0.1 for values less than 1.0, and + // increments of 1.0 for values greater than 1.0. + float scaling_factor = 2; + } +} + +// Request message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. +message ListServicesRequest { + // Required. The relative resource name of the location of metastore services + // to list, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. The maximum number of services to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. +message ListServicesResponse { + // The services in the specified location. + repeated Service services = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetService][google.cloud.metastore.v1alpha.DataprocMetastore.GetService]. +message GetServiceRequest { + // Required. The relative resource name of the metastore service to retrieve, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateService][google.cloud.metastore.v1alpha.DataprocMetastore.CreateService]. +message CreateServiceRequest { + // 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}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Service" + } + ]; + + // 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. + string service_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Service service = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.UpdateService][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateService]. +message UpdateServiceRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore service to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore service's `name` field is used to identify the metastore + // service to be updated. + Service service = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.DeleteService][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteService]. +message DeleteServiceRequest { + // Required. The relative resource name of the metastore service to delete, in + // the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports]. +message ListMetadataImportsRequest { + // Required. The relative resource name of the service whose metadata imports + // to list, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/MetadataImport" + } + ]; + + // Optional. The maximum number of imports to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 imports are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1alpha.DataprocMetastore.ListMetadataImports]. +message ListMetadataImportsResponse { + // The imports in the specified service. + repeated MetadataImport metadata_imports = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.GetMetadataImport]. +message GetMetadataImportRequest { + // Required. The relative resource name of the metadata import to retrieve, in + // the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/MetadataImport" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.CreateMetadataImport]. +message CreateMetadataImportRequest { + // Required. The relative resource name of the service in which to create a + // metastore import, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/MetadataImport" + } + ]; + + // 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. + string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1alpha.DataprocMetastore.UpdateMetadataImport]. +message UpdateMetadataImportRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metadata import to update. The server only merges fields + // in the import if they are specified in `update_mask`. + // + // The metadata import's `name` field is used to identify the metastore + // import to be updated. + MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]. +message ListBackupsRequest { + // Required. The relative resource name of the service whose backups to + // list, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. The maximum number of backups to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 backups are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]. +message ListBackupsResponse { + // The backups of the specified service. + repeated Backup backups = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup]. +message GetBackupRequest { + // Required. The relative resource name of the backup to retrieve, in the + // following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup]. +message CreateBackupRequest { + // Required. The relative resource name of the service in which to create a + // backup of the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Backup" + } + ]; + + // 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. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup]. +message DeleteBackupRequest { + // Required. The relative resource name of the backup to delete, in the + // following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata]. +message ExportMetadataRequest { + // Required. Destination that metadata is exported to. + oneof destination { + // A Cloud Storage URI of a folder, in the format + // `gs:///`. A sub-folder + // `` containing exported files will be created below it. + string destination_gcs_folder = 2; + } + + // Required. The relative resource name of the metastore service to run + // export, in the following form: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. + DatabaseDumpSpec.Type database_dump_type = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [DataprocMetastore.Restore][]. +message RestoreServiceRequest { + // Required. The relative resource name of the metastore service to run + // restore, in the following form: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // 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}`. + string backup = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. + Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the caller has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata about the service in a location. +message LocationMetadata { + // A specification of a supported version of the Hive Metastore software. + message HiveMetastoreVersion { + // The semantic version of the Hive Metastore software. + string version = 1; + + // Whether `version` will be chosen by the server if a metastore service is + // created with a `HiveMetastoreConfig` that omits the `version`. + bool is_default = 2; + } + + // The versions of Hive Metastore that can be used when creating a new + // metastore service in this location. The server guarantees that exactly one + // `HiveMetastoreVersion` in the list will set `is_default`. + repeated HiveMetastoreVersion supported_hive_metastore_versions = 1; +} + +// The specification of database dump to import from or export to. +message DatabaseDumpSpec { + // The type of the database dump. + enum Type { + // The type of the database dump is unknown. + TYPE_UNSPECIFIED = 0; + + // Database dump is a MySQL dump file. + MYSQL = 1; + + // Database dump contains Avro files. + AVRO = 2; + } +} + +// Request message for +// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy]. +message RemoveIamPolicyRequest { + // Required. The relative resource name of the dataplane resource to remove + // IAM policy, in the following form: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}` + // or + // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`. + string resource = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // Optional. Removes IAM policy attached to database or table asynchronously + // when it is set. The default is false. + bool asynchronous = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy]. +message RemoveIamPolicyResponse { + // True if the policy is successfully removed. + bool success = 1; +} + +// Request message for +// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata]. +message QueryMetadataRequest { + // Required. The relative resource name of the metastore service to query + // metadata, in the following format: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Required. A read-only SQL query to execute against the metadata database. + // The query cannot change or mutate the data. + string query = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata]. +message QueryMetadataResponse { + // The manifest URI is link to a JSON instance in Cloud Storage. + // This instance manifests immediately along with QueryMetadataResponse. The + // content of the URI is not retriable until the long-running operation query + // against the metadata finishes. + string result_manifest_uri = 1; +} + +// Request message for +// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase]. +message MoveTableToDatabaseRequest { + // Required. The relative resource name of the metastore service to mutate + // metadata, in the following format: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Required. The name of the table to be moved. + string table_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the database where the table resides. + string db_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the database where the table should be moved. + string destination_db_name = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase]. +message MoveTableToDatabaseResponse {} + +// Request message for +// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation]. +message AlterMetadataResourceLocationRequest { + // Required. The relative resource name of the metastore service to mutate + // metadata, in the following format: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Required. The relative metadata resource name in the following format. + // + // `databases/{database_id}` + // or + // `databases/{database_id}/tables/{table_id}` + // or + // `databases/{database_id}/tables/{table_id}/partitions/{partition_id}` + string resource_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new location URI for the metadata resource. + string location_uri = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1alpha.DataprocMetastore.AlterMetadataResourceLocation]. +message AlterMetadataResourceLocationResponse {} diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore_federation.proto b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore_federation.proto new file mode 100644 index 000000000000..bdb1ecb3783d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/proto-google-cloud-dataproc-metastore-v1alpha/src/main/proto/google/cloud/metastore/v1alpha/metastore_federation.proto @@ -0,0 +1,377 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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. + +syntax = "proto3"; + +package google.cloud.metastore.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/metastore/v1alpha/metastore.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/metastore/apiv1alpha/metastorepb;metastorepb"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreFederationProto"; +option java_package = "com.google.cloud.metastore.v1alpha"; + +// Configures and manages metastore federation services. +// Dataproc Metastore Federation Service allows federating a collection of +// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc +// Metastores. The Federation Service exposes a gRPC URL through which metadata +// from the backend metastores are served at query time. +// +// The Dataproc Metastore Federation API defines the following resource model: +// * The service works with a collection of Google Cloud projects. +// * Each project has a collection of available locations. +// * Each location has a collection of federations. +// * Dataproc Metastore Federations are resources with names of the +// form: +// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. +service DataprocMetastoreFederation { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists federations in a project and location. + rpc ListFederations(ListFederationsRequest) + returns (ListFederationsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/federations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single federation. + rpc GetFederation(GetFederationRequest) returns (Federation) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore federation in a project and location. + rpc CreateFederation(CreateFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/federations" + body: "federation" + }; + option (google.api.method_signature) = "parent,federation,federation_id"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Updates the fields of a federation. + rpc UpdateFederation(UpdateFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{federation.name=projects/*/locations/*/federations/*}" + body: "federation" + }; + option (google.api.method_signature) = "federation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } + + // Deletes a single federation. + rpc DeleteFederation(DeleteFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1alpha.OperationMetadata" + }; + } +} + +// Represents a federation of multiple backend metastores. +message Federation { + option (google.api.resource) = { + type: "metastore.googleapis.com/Federation" + pattern: "projects/{project}/locations/{location}/federations/{federation}" + }; + + // The current state of the federation. + enum State { + // The state of the metastore federation is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore federation is in the process of being created. + CREATING = 1; + + // The metastore federation is running and ready to serve queries. + ACTIVE = 2; + + // The metastore federation is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 3; + + // The metastore federation is undergoing deletion. It cannot be used. + DELETING = 4; + + // The metastore federation has encountered an error and cannot be used. The + // metastore federation should be deleted. + ERROR = 5; + } + + // Immutable. The relative resource name of the federation, of the + // form: + // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore federation was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore federation was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore federation. + map labels = 4; + + // Immutable. The Apache Hive metastore version of the federation. All backend + // metastore versions must be compatible with the federation version. + string version = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // A map from `BackendMetastore` rank to `BackendMetastore`s from which the + // federation service serves metadata at query time. The map key represents + // the order in which `BackendMetastore`s should be evaluated to resolve + // database names at query time and should be greater than or equal to zero. A + // `BackendMetastore` with a lower number will be evaluated before a + // `BackendMetastore` with a higher number. + map backend_metastores = 6; + + // Output only. The federation endpoint. + string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the federation. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the + // metastore federation, if available. + string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The globally unique resource identifier of the metastore + // federation. + string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a backend metastore for the federation. +message BackendMetastore { + // The type of the backend metastore. + enum MetastoreType { + // The metastore type is not set. + METASTORE_TYPE_UNSPECIFIED = 0; + + // The backend metastore is Dataplex. + DATAPLEX = 1; + + // The backend metastore is BigQuery. + BIGQUERY = 2; + + // The backend metastore is Dataproc Metastore. + DATAPROC_METASTORE = 3; + } + + // The relative resource name of the metastore that is being federated. + // The formats of the relative resource names for the currently supported + // metastores are listed below: + // + // * BigQuery + // * `projects/{project_id}` + // * Dataproc Metastore + // * `projects/{project_id}/locations/{location}/services/{service_id}` + string name = 1; + + // The type of the backend metastore. + MetastoreType metastore_type = 2; +} + +// Request message for ListFederations. +message ListFederationsRequest { + // Required. The relative resource name of the location of metastore + // federations to list, in the following form: + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. The maximum number of federations to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListFederationServices + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // ListFederationServices must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListFederations +message ListFederationsResponse { + // The services in the specified location. + repeated Federation federations = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for GetFederation. +message GetFederationRequest { + // Required. The relative resource name of the metastore federation to + // retrieve, in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; +} + +// Request message for CreateFederation. +message CreateFederationRequest { + // Required. The relative resource name of the location in which to create a + // federation service, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // 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. + string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for UpdateFederation. +message UpdateFederationRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore federation to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore federation's `name` field is used to identify the + // metastore service to be updated. + Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeleteFederation. +message DeleteFederationRequest { + // Required. The relative resource name of the metastore federation to delete, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetEndpoint.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetEndpoint.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/create/SyncCreateSetEndpoint.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/AsyncCreateBackup.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/AsyncCreateBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/AsyncCreateBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/AsyncCreateBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackup.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/AsyncCreateService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/AsyncCreateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/AsyncCreateService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/AsyncCreateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/AsyncCreateServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/AsyncCreateServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/AsyncCreateServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/AsyncCreateServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/AsyncDeleteBackup.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/AsyncDeleteBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/AsyncDeleteBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/AsyncDeleteBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackup.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deletebackup/SyncDeleteBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/AsyncDeleteService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/AsyncDeleteService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/AsyncDeleteService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/AsyncDeleteService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/deleteservice/SyncDeleteServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/AsyncExportMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/AsyncExportMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/AsyncExportMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/AsyncExportMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/SyncExportMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/SyncExportMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/SyncExportMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/exportmetadata/SyncExportMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/AsyncGetBackup.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/AsyncGetBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/AsyncGetBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/AsyncGetBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackup.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackupBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackupBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackupBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackupBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getbackup/SyncGetBackupString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..c8555e72e31c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = dataprocMetastoreClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_GetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..91602422f828 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_GetIamPolicy_sync] +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreClient.getIamPolicy(request); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_GetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..710594f26eb2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + dataprocMetastoreClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_GetLocation_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getlocation/SyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..78c5a87c16ef --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataprocMetastoreClient.getLocation(request); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_GetLocation_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/AsyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/AsyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/AsyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/AsyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetServiceServicename.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetServiceServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetServiceServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetServiceServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/getservice/SyncGetServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/AsyncListBackups.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/AsyncListBackups.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/AsyncListBackups.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/AsyncListBackups.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/AsyncListBackupsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/AsyncListBackupsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/AsyncListBackupsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/AsyncListBackupsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackups.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackups.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackups.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackups.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackupsServicename.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackupsServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackupsServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackupsServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackupsString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackupsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackupsString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listbackups/SyncListBackupsString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/AsyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..0f4e4c0f5005 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataprocMetastoreClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_ListLocations_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..e4533e86379c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataprocMetastoreClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_ListLocations_Paged_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/SyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..d361bcf86d01 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : dataprocMetastoreClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_ListLocations_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/AsyncListServices.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/AsyncListServices.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/AsyncListServices.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/AsyncListServices.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/AsyncListServicesPaged.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/AsyncListServicesPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/AsyncListServicesPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/AsyncListServicesPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServices.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServices.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServices.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServices.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServicesLocationname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServicesLocationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServicesLocationname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServicesLocationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServicesString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServicesString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServicesString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/listservices/SyncListServicesString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/AsyncQueryMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/AsyncQueryMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/AsyncQueryMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/AsyncQueryMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/SyncQueryMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/SyncQueryMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/SyncQueryMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/querymetadata/SyncQueryMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/removeiampolicy/AsyncRemoveIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/removeiampolicy/AsyncRemoveIamPolicy.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/removeiampolicy/AsyncRemoveIamPolicy.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/removeiampolicy/AsyncRemoveIamPolicy.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/removeiampolicy/SyncRemoveIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/removeiampolicy/SyncRemoveIamPolicy.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/removeiampolicy/SyncRemoveIamPolicy.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/removeiampolicy/SyncRemoveIamPolicy.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/AsyncRestoreService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/AsyncRestoreService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/AsyncRestoreService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/AsyncRestoreService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..6463fe774ea8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = dataprocMetastoreClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_SetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..d5440d478916 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_SetIamPolicy_sync] +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreClient.setIamPolicy(request); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_SetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..0105fd86de41 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + dataprocMetastoreClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_TestIamPermissions_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..a70c34dfbdfd --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,49 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastore_TestIamPermissions_sync] +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = dataprocMetastoreClient.testIamPermissions(request); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastore_TestIamPermissions_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/AsyncUpdateService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/AsyncUpdateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/AsyncUpdateService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/AsyncUpdateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/SyncUpdateService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/SyncUpdateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/SyncUpdateService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/SyncUpdateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/AsyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/AsyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/AsyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/AsyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getfederation/SyncGetFederationString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..11a449716c94 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_GetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..d2ca787ae0b1 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_GetIamPolicy_sync] +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreFederationClient.getIamPolicy(request); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_GetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..d130e67cbdf3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + dataprocMetastoreFederationClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_GetLocation_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getlocation/SyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..f9324805b0a0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataprocMetastoreFederationClient.getLocation(request); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_GetLocation_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/AsyncListFederations.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/AsyncListFederations.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/AsyncListFederations.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/AsyncListFederations.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederations.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederations.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederations.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederations.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederationsString.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederationsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederationsString.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listfederations/SyncListFederationsString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/AsyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..34e780fc7053 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_ListLocations_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..4c0e54d024bc --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataprocMetastoreFederationClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_ListLocations_Paged_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/SyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..5a787e343dfb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/listlocations/SyncListLocations.java @@ -0,0 +1,52 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : + dataprocMetastoreFederationClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_ListLocations_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..292726928cad --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_SetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..d54dbe982bb3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_SetIamPolicy_sync] +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreFederationClient.setIamPolicy(request); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_SetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..e8d504688ffc --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,54 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_TestIamPermissions_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..8f960060e562 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * 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.v1alpha.samples; + +// [START metastore_v1alpha_generated_DataprocMetastoreFederation_TestIamPermissions_sync] +import com.google.cloud.metastore.v1alpha.BackupName; +import com.google.cloud.metastore.v1alpha.DataprocMetastoreFederationClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + dataprocMetastoreFederationClient.testIamPermissions(request); + } + } +} +// [END metastore_v1alpha_generated_DataprocMetastoreFederation_TestIamPermissions_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastoresettings/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastoresettings/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastoresettings/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/dataprocmetastoresettings/getservice/SyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1alpha/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1alpha/samples/snippets/generated/com/google/cloud/metastore/v1alpha/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClient.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClient.java new file mode 100644 index 000000000000..1f257d003d09 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClient.java @@ -0,0 +1,3582 @@ +/* + * 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.v1beta; + +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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreStub; +import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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: + * + *

    + *
  • The service works with a collection of Google Cloud projects, named: `/projects/*` + *
  • Each project has a collection of available locations, named: `/locations/*` (a location + * must refer to a Google Cloud `region`) + *
  • Each location has a collection of services, named: `/services/*` + *
  • Dataproc Metastore services are resources with names of the form: + *
+ * + *

`/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: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

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

This class can be customized by passing in a custom instance of 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. + */ +@BetaApi +@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 future =
+   *       dataprocMetastoreClient.listServicesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Service element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServicesPagedCallable() { + return stub.listServicesPagedCallable(); + } + + // 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();
+   *   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 listServicesCallable() { + return stub.listServicesCallable(); + } + + // 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()) {
+   *   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 future = dataprocMetastoreClient.getServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServiceCallable() { + return stub.getServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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]");
+   *   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 createServiceAsync( + LocationName parent, Service service, String serviceId) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setService(service) + .setServiceId(serviceId) + .build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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();
+   *   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 createServiceAsync( + String parent, Service service, String serviceId) { + CreateServiceRequest request = + CreateServiceRequest.newBuilder() + .setParent(parent) + .setService(service) + .setServiceId(serviceId) + .build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   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 createServiceAsync( + CreateServiceRequest request) { + return createServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.createServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createServiceOperationCallable() { + return stub.createServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore service 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()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServiceId("serviceId-194185552")
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.createServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createServiceCallable() { + return stub.createServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   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`. + *

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 updateServiceAsync( + Service service, FieldMask updateMask) { + UpdateServiceRequest request = + UpdateServiceRequest.newBuilder().setService(service).setUpdateMask(updateMask).build(); + return updateServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   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 updateServiceAsync( + UpdateServiceRequest request) { + return updateServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.updateServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateServiceOperationCallable() { + return stub.updateServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters 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()) {
+   *   UpdateServiceRequest request =
+   *       UpdateServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setService(Service.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.updateServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateServiceCallable() { + return stub.updateServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   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: + *

`projects/{project_number}/locations/{location_id}/services/{service_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServiceAsync(ServiceName name) { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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();
+   *   dataprocMetastoreClient.deleteServiceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The relative resource name of the metastore service to delete, 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 OperationFuture deleteServiceAsync(String name) { + DeleteServiceRequest request = DeleteServiceRequest.newBuilder().setName(name).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   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 deleteServiceAsync( + DeleteServiceRequest request) { + return deleteServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.deleteServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteServiceOperationCallable() { + return stub.deleteServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder()
+   *           .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.deleteServiceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteServiceCallable() { + return stub.deleteServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists imports in a 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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   ListMetadataImportsRequest request =
+   *       ListMetadataImportsRequest.newBuilder()
+   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listMetadataImportsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (MetadataImport element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMetadataImportsPagedCallable() { + return stub.listMetadataImportsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists imports in a 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()) {
+   *   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 + listMetadataImportsCallable() { + return stub.listMetadataImportsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single import. + * + *

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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   GetMetadataImportRequest request =
+   *       GetMetadataImportRequest.newBuilder()
+   *           .setName(
+   *               MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.getMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getMetadataImportCallable() { + return stub.getMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

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

`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 createMetadataImportAsync( + ServiceName parent, MetadataImport metadataImport, String metadataImportId) { + CreateMetadataImportRequest request = + CreateMetadataImportRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMetadataImport(metadataImport) + .setMetadataImportId(metadataImportId) + .build(); + return createMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

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

`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 createMetadataImportAsync( + String parent, MetadataImport metadataImport, String metadataImportId) { + CreateMetadataImportRequest request = + CreateMetadataImportRequest.newBuilder() + .setParent(parent) + .setMetadataImport(metadataImport) + .setMetadataImportId(metadataImportId) + .build(); + return createMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 createMetadataImportAsync( + CreateMetadataImportRequest request) { + return createMetadataImportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createMetadataImportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createMetadataImportOperationCallable() { + return stub.createMetadataImportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new MetadataImport in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createMetadataImportCallable() { + return stub.createMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   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`. + *

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 updateMetadataImportAsync( + MetadataImport metadataImport, FieldMask updateMask) { + UpdateMetadataImportRequest request = + UpdateMetadataImportRequest.newBuilder() + .setMetadataImport(metadataImport) + .setUpdateMask(updateMask) + .build(); + return updateMetadataImportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   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 updateMetadataImportAsync( + UpdateMetadataImportRequest request) { + return updateMetadataImportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   UpdateMetadataImportRequest request =
+   *       UpdateMetadataImportRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMetadataImport(MetadataImport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.updateMetadataImportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataImport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateMetadataImportOperationCallable() { + return stub.updateMetadataImportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single import. Only the description field of MetadataImport is supported to be + * updated. + * + *

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()) {
+   *   UpdateMetadataImportRequest request =
+   *       UpdateMetadataImportRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMetadataImport(MetadataImport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.updateMetadataImportCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateMetadataImportCallable() { + return stub.updateMetadataImportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   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 exportMetadataAsync( + ExportMetadataRequest request) { + return exportMetadataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   ExportMetadataRequest request =
+   *       ExportMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.exportMetadataOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MetadataExport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportMetadataOperationCallable() { + return stub.exportMetadataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports metadata from a 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()) {
+   *   ExportMetadataRequest request =
+   *       ExportMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.exportMetadataCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportMetadataCallable() { + return stub.exportMetadataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + ServiceName service, BackupName backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service == null ? null : service.toString()) + .setBackup(backup == null ? null : backup.toString()) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + ServiceName service, String backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service == null ? null : service.toString()) + .setBackup(backup) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + String service, BackupName backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder() + .setService(service) + .setBackup(backup == null ? null : backup.toString()) + .build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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 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: + *

`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 restoreServiceAsync( + String service, String backup) { + RestoreServiceRequest request = + RestoreServiceRequest.newBuilder().setService(service).setBackup(backup).build(); + return restoreServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   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 restoreServiceAsync( + RestoreServiceRequest request) { + return restoreServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   RestoreServiceRequest request =
+   *       RestoreServiceRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setBackup(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.restoreServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Restore response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + restoreServiceOperationCallable() { + return stub.restoreServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a service from a backup. + * + *

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()) {
+   *   RestoreServiceRequest request =
+   *       RestoreServiceRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setBackup(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.restoreServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable restoreServiceCallable() { + return stub.restoreServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists backups in a 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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listBackupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Backup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupsPagedCallable() { + return stub.listBackupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists backups in a 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()) {
+   *   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 listBackupsCallable() { + return stub.listBackupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single backup. + * + *

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()) {
+   *   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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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()) {
+   *   GetBackupRequest request =
+   *       GetBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.getBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupCallable() { + return stub.getBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

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

`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 createBackupAsync( + ServiceName parent, Backup backup, String backupId) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackup(backup) + .setBackupId(backupId) + .build(); + return createBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

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

`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 createBackupAsync( + String parent, Backup backup, String backupId) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(parent) + .setBackup(backup) + .setBackupId(backupId) + .build(); + return createBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 createBackupAsync( + CreateBackupRequest request) { + return createBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBackupOperationCallable() { + return stub.createBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new backup in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (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 future =
+   *       dataprocMetastoreClient.createBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBackupCallable() { + return stub.createBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   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: + *

`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 deleteBackupAsync(BackupName name) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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 = 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: + *

`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 deleteBackupAsync(String name) { + DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   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 deleteBackupAsync( + DeleteBackupRequest request) { + return deleteBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.deleteBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupOperationCallable() { + return stub.deleteBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single backup. + * + *

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()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.deleteBackupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupCallable() { + return stub.deleteBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes the attached IAM policies for a resource + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   RemoveIamPolicyRequest request =
+   *       RemoveIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setAsynchronous(true)
+   *           .build();
+   *   RemoveIamPolicyResponse response = dataprocMetastoreClient.removeIamPolicy(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 RemoveIamPolicyResponse removeIamPolicy(RemoveIamPolicyRequest request) { + return removeIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes the attached IAM policies for a resource + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   RemoveIamPolicyRequest request =
+   *       RemoveIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setAsynchronous(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.removeIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveIamPolicyResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeIamPolicyCallable() { + return stub.removeIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query DPMS metadata. + * + *

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()) {
+   *   QueryMetadataRequest request =
+   *       QueryMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setQuery("query107944136")
+   *           .build();
+   *   QueryMetadataResponse response = dataprocMetastoreClient.queryMetadataAsync(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 queryMetadataAsync( + QueryMetadataRequest request) { + return queryMetadataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query DPMS metadata. + * + *

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()) {
+   *   QueryMetadataRequest request =
+   *       QueryMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setQuery("query107944136")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.queryMetadataOperationCallable().futureCall(request);
+   *   // Do something.
+   *   QueryMetadataResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + queryMetadataOperationCallable() { + return stub.queryMetadataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query DPMS metadata. + * + *

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()) {
+   *   QueryMetadataRequest request =
+   *       QueryMetadataRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setQuery("query107944136")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.queryMetadataCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable queryMetadataCallable() { + return stub.queryMetadataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Move a table to another database. + * + *

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()) {
+   *   MoveTableToDatabaseRequest request =
+   *       MoveTableToDatabaseRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setTableName("tableName-1988717703")
+   *           .setDbName("dbName-1339126743")
+   *           .setDestinationDbName("destinationDbName-2077361705")
+   *           .build();
+   *   MoveTableToDatabaseResponse response =
+   *       dataprocMetastoreClient.moveTableToDatabaseAsync(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 + moveTableToDatabaseAsync(MoveTableToDatabaseRequest request) { + return moveTableToDatabaseOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Move a table to another database. + * + *

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()) {
+   *   MoveTableToDatabaseRequest request =
+   *       MoveTableToDatabaseRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setTableName("tableName-1988717703")
+   *           .setDbName("dbName-1339126743")
+   *           .setDestinationDbName("destinationDbName-2077361705")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient.moveTableToDatabaseOperationCallable().futureCall(request);
+   *   // Do something.
+   *   MoveTableToDatabaseResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable() { + return stub.moveTableToDatabaseOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Move a table to another database. + * + *

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()) {
+   *   MoveTableToDatabaseRequest request =
+   *       MoveTableToDatabaseRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setTableName("tableName-1988717703")
+   *           .setDbName("dbName-1339126743")
+   *           .setDestinationDbName("destinationDbName-2077361705")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.moveTableToDatabaseCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable moveTableToDatabaseCallable() { + return stub.moveTableToDatabaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Alter metadata resource location. The metadata resource can be a database, table, or partition. + * This functionality only updates the parent directory for the respective metadata resource and + * does not transfer any existing data to the new 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()) {
+   *   AlterMetadataResourceLocationRequest request =
+   *       AlterMetadataResourceLocationRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setResourceName("resourceName-384566343")
+   *           .setLocationUri("locationUri552310135")
+   *           .build();
+   *   AlterMetadataResourceLocationResponse response =
+   *       dataprocMetastoreClient.alterMetadataResourceLocationAsync(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 + alterMetadataResourceLocationAsync(AlterMetadataResourceLocationRequest request) { + return alterMetadataResourceLocationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Alter metadata resource location. The metadata resource can be a database, table, or partition. + * This functionality only updates the parent directory for the respective metadata resource and + * does not transfer any existing data to the new 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()) {
+   *   AlterMetadataResourceLocationRequest request =
+   *       AlterMetadataResourceLocationRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setResourceName("resourceName-384566343")
+   *           .setLocationUri("locationUri552310135")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreClient
+   *           .alterMetadataResourceLocationOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   AlterMetadataResourceLocationResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable() { + return stub.alterMetadataResourceLocationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Alter metadata resource location. The metadata resource can be a database, table, or partition. + * This functionality only updates the parent directory for the respective metadata resource and + * does not transfer any existing data to the new 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()) {
+   *   AlterMetadataResourceLocationRequest request =
+   *       AlterMetadataResourceLocationRequest.newBuilder()
+   *           .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+   *           .setResourceName("resourceName-384566343")
+   *           .setLocationUri("locationUri552310135")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.alterMetadataResourceLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + alterMetadataResourceLocationCallable() { + return stub.alterMetadataResourceLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : dataprocMetastoreClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataprocMetastoreClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataprocMetastoreClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataprocMetastoreClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = dataprocMetastoreClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListServicesPagedResponse + extends AbstractPagedListResponse< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListServicesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListServicesPagedResponse(ListServicesPage page) { + super(page, ListServicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServicesPage + extends AbstractPage { + + private ListServicesPage( + PageContext context, + ListServicesResponse response) { + super(context, response); + } + + private static ListServicesPage createEmptyPage() { + return new ListServicesPage(null, null); + } + + @Override + protected ListServicesPage createPage( + PageContext context, + ListServicesResponse response) { + return new ListServicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServicesRequest, + ListServicesResponse, + Service, + ListServicesPage, + ListServicesFixedSizeCollection> { + + private ListServicesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServicesFixedSizeCollection createEmptyCollection() { + return new ListServicesFixedSizeCollection(null, 0); + } + + @Override + protected ListServicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListServicesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListMetadataImportsPagedResponse + extends AbstractPagedListResponse< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage, + ListMetadataImportsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMetadataImportsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMetadataImportsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMetadataImportsPagedResponse(ListMetadataImportsPage page) { + super(page, ListMetadataImportsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMetadataImportsPage + extends AbstractPage< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage> { + + private ListMetadataImportsPage( + PageContext + context, + ListMetadataImportsResponse response) { + super(context, response); + } + + private static ListMetadataImportsPage createEmptyPage() { + return new ListMetadataImportsPage(null, null); + } + + @Override + protected ListMetadataImportsPage createPage( + PageContext + context, + ListMetadataImportsResponse response) { + return new ListMetadataImportsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMetadataImportsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + MetadataImport, + ListMetadataImportsPage, + ListMetadataImportsFixedSizeCollection> { + + private ListMetadataImportsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMetadataImportsFixedSizeCollection createEmptyCollection() { + return new ListMetadataImportsFixedSizeCollection(null, 0); + } + + @Override + protected ListMetadataImportsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMetadataImportsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBackupsPagedResponse + extends AbstractPagedListResponse< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListBackupsPagedResponse(ListBackupsPage page) { + super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupsPage + extends AbstractPage { + + private ListBackupsPage( + PageContext context, + ListBackupsResponse response) { + super(context, response); + } + + private static ListBackupsPage createEmptyPage() { + return new ListBackupsPage(null, null); + } + + @Override + protected ListBackupsPage createPage( + PageContext context, + ListBackupsResponse response) { + return new ListBackupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + private ListBackupsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupsFixedSizeCollection createEmptyCollection() { + return new ListBackupsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBackupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClient.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClient.java new file mode 100644 index 000000000000..a1292f3b9da7 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClient.java @@ -0,0 +1,1565 @@ +/* + * 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.v1beta; + +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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreFederationStub; +import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreFederationStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 federation services. Dataproc Metastore + * Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex + * Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which + * metadata from the backend metastores are served at query time. + * + *

The Dataproc Metastore Federation API defines the following resource model: + * + *

    + *
  • The service works with a collection of Google Cloud projects. + *
  • Each project has a collection of available locations. + *
  • Each location has a collection of federations. + *
  • Dataproc Metastore Federations are resources with names of the form: + * `projects/{project_number}/locations/{location_id}/federations/{federation_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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create()) {
+ *   FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
+ *   Federation response = dataprocMetastoreFederationClient.getFederation(name);
+ * }
+ * }
+ * + *

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: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

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

This class can be customized by passing in a custom instance of + * DataprocMetastoreFederationSettings 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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

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
+ * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
+ *     DataprocMetastoreFederationSettings.newHttpJsonBuilder().build();
+ * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+ *     DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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 (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. + * + *

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 (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. + * + *

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 (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 future =
+   *       dataprocMetastoreFederationClient.listFederationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Federation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFederationsPagedCallable() { + return stub.listFederationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists federations 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 (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 + listFederationsCallable() { + return stub.listFederationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single federation. + * + *

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 (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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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: + *

`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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetFederationRequest request =
+   *       GetFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getFederationCallable() { + return stub.getFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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: + *

`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 createFederationAsync( + LocationName parent, Federation federation, String federationId) { + CreateFederationRequest request = + CreateFederationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFederation(federation) + .setFederationId(federationId) + .build(); + return createFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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: + *

`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 createFederationAsync( + String parent, Federation federation, String federationId) { + CreateFederationRequest request = + CreateFederationRequest.newBuilder() + .setParent(parent) + .setFederation(federation) + .setFederationId(federationId) + .build(); + return createFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 createFederationAsync( + CreateFederationRequest request) { + return createFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 future =
+   *       dataprocMetastoreFederationClient.createFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createFederationOperationCallable() { + return stub.createFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a metastore federation 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 (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 future =
+   *       dataprocMetastoreFederationClient.createFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createFederationCallable() { + return stub.createFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (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`. + *

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 updateFederationAsync( + Federation federation, FieldMask updateMask) { + UpdateFederationRequest request = + UpdateFederationRequest.newBuilder() + .setFederation(federation) + .setUpdateMask(updateMask) + .build(); + return updateFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (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 updateFederationAsync( + UpdateFederationRequest request) { + return updateFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   UpdateFederationRequest request =
+   *       UpdateFederationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setFederation(Federation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreFederationClient.updateFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Federation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateFederationOperationCallable() { + return stub.updateFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the fields of a federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   UpdateFederationRequest request =
+   *       UpdateFederationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setFederation(Federation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.updateFederationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateFederationCallable() { + return stub.updateFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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: + *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFederationAsync( + FederationName name) { + DeleteFederationRequest request = + DeleteFederationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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: + *

`projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteFederationAsync(String name) { + DeleteFederationRequest request = DeleteFederationRequest.newBuilder().setName(name).build(); + return deleteFederationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (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 deleteFederationAsync( + DeleteFederationRequest request) { + return deleteFederationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   DeleteFederationRequest request =
+   *       DeleteFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataprocMetastoreFederationClient.deleteFederationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteFederationOperationCallable() { + return stub.deleteFederationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single federation. + * + *

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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   DeleteFederationRequest request =
+   *       DeleteFederationRequest.newBuilder()
+   *           .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.deleteFederationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFederationCallable() { + return stub.deleteFederationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element :
+   *       dataprocMetastoreFederationClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataprocMetastoreFederationClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataprocMetastoreFederationClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreFederationClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = dataprocMetastoreFederationClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       dataprocMetastoreFederationClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
+   *     DataprocMetastoreFederationClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       dataprocMetastoreFederationClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListFederationsPagedResponse + extends AbstractPagedListResponse< + ListFederationsRequest, + ListFederationsResponse, + Federation, + ListFederationsPage, + ListFederationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFederationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFederationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFederationsPagedResponse(ListFederationsPage page) { + super(page, ListFederationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFederationsPage + extends AbstractPage< + ListFederationsRequest, ListFederationsResponse, Federation, ListFederationsPage> { + + private ListFederationsPage( + PageContext context, + ListFederationsResponse response) { + super(context, response); + } + + private static ListFederationsPage createEmptyPage() { + return new ListFederationsPage(null, null); + } + + @Override + protected ListFederationsPage createPage( + PageContext context, + ListFederationsResponse response) { + return new ListFederationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFederationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFederationsRequest, + ListFederationsResponse, + Federation, + ListFederationsPage, + ListFederationsFixedSizeCollection> { + + private ListFederationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFederationsFixedSizeCollection createEmptyCollection() { + return new ListFederationsFixedSizeCollection(null, 0); + } + + @Override + protected ListFederationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFederationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationSettings.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationSettings.java new file mode 100644 index 000000000000..5841f9d17d1e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationSettings.java @@ -0,0 +1,368 @@ +/* + * 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.v1beta; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreFederationStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreFederationClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to listFederations. */ + public PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listFederationsSettings(); + } + + /** Returns the object with the settings used for calls to getFederation. */ + public UnaryCallSettings getFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getFederationSettings(); + } + + /** Returns the object with the settings used for calls to createFederation. */ + public UnaryCallSettings createFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).createFederationSettings(); + } + + /** Returns the object with the settings used for calls to createFederation. */ + public OperationCallSettings + createFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .createFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public UnaryCallSettings updateFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).updateFederationSettings(); + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public OperationCallSettings + updateFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .updateFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public UnaryCallSettings deleteFederationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).deleteFederationSettings(); + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public OperationCallSettings + deleteFederationOperationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .deleteFederationOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DataprocMetastoreFederationStubSettings) getStubSettings()) + .testIamPermissionsSettings(); + } + + public static final DataprocMetastoreFederationSettings create( + DataprocMetastoreFederationStubSettings stub) throws IOException { + return new DataprocMetastoreFederationSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataprocMetastoreFederationStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataprocMetastoreFederationStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataprocMetastoreFederationStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreFederationSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataprocMetastoreFederationSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataprocMetastoreFederationStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataprocMetastoreFederationSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataprocMetastoreFederationStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataprocMetastoreFederationStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DataprocMetastoreFederationStubSettings.newHttpJsonBuilder()); + } + + public DataprocMetastoreFederationStubSettings.Builder getStubSettingsBuilder() { + return ((DataprocMetastoreFederationStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listFederations. */ + public PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return getStubSettingsBuilder().listFederationsSettings(); + } + + /** Returns the builder for the settings used for calls to getFederation. */ + public UnaryCallSettings.Builder getFederationSettings() { + return getStubSettingsBuilder().getFederationSettings(); + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public UnaryCallSettings.Builder + createFederationSettings() { + return getStubSettingsBuilder().createFederationSettings(); + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public OperationCallSettings.Builder + createFederationOperationSettings() { + return getStubSettingsBuilder().createFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public UnaryCallSettings.Builder + updateFederationSettings() { + return getStubSettingsBuilder().updateFederationSettings(); + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public OperationCallSettings.Builder + updateFederationOperationSettings() { + return getStubSettingsBuilder().updateFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public UnaryCallSettings.Builder + deleteFederationSettings() { + return getStubSettingsBuilder().deleteFederationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public OperationCallSettings.Builder + deleteFederationOperationSettings() { + return getStubSettingsBuilder().deleteFederationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public DataprocMetastoreFederationSettings build() throws IOException { + return new DataprocMetastoreFederationSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreSettings.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreSettings.java new file mode 100644 index 000000000000..db0be061e94f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreSettings.java @@ -0,0 +1,640 @@ +/* + * 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.v1beta; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.stub.DataprocMetastoreStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listServicesSettings(); + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceSettings(); + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listMetadataImports. */ + public PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listMetadataImportsSettings(); + } + + /** Returns the object with the settings used for calls to getMetadataImport. */ + public UnaryCallSettings getMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public UnaryCallSettings createMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public OperationCallSettings + createMetadataImportOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .createMetadataImportOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings updateMetadataImportSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).updateMetadataImportSettings(); + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public OperationCallSettings + updateMetadataImportOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .updateMetadataImportOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public UnaryCallSettings exportMetadataSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataSettings(); + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public OperationCallSettings + exportMetadataOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).exportMetadataOperationSettings(); + } + + /** Returns the object with the settings used for calls to restoreService. */ + public UnaryCallSettings restoreServiceSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceSettings(); + } + + /** Returns the object with the settings used for calls to restoreService. */ + public OperationCallSettings + restoreServiceOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).restoreServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listBackupsSettings(); + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getBackupSettings(); + } + + /** Returns the object with the settings used for calls to createBackup. */ + public UnaryCallSettings createBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupSettings(); + } + + /** Returns the object with the settings used for calls to createBackup. */ + public OperationCallSettings + createBackupOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).createBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings + removeIamPolicySettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).removeIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to queryMetadata. */ + public UnaryCallSettings queryMetadataSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).queryMetadataSettings(); + } + + /** Returns the object with the settings used for calls to queryMetadata. */ + public OperationCallSettings + queryMetadataOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).queryMetadataOperationSettings(); + } + + /** Returns the object with the settings used for calls to moveTableToDatabase. */ + public UnaryCallSettings moveTableToDatabaseSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).moveTableToDatabaseSettings(); + } + + /** Returns the object with the settings used for calls to moveTableToDatabase. */ + public OperationCallSettings< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .moveTableToDatabaseOperationSettings(); + } + + /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ + public UnaryCallSettings + alterMetadataResourceLocationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .alterMetadataResourceLocationSettings(); + } + + /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ + public OperationCallSettings< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()) + .alterMetadataResourceLocationOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DataprocMetastoreStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final DataprocMetastoreSettings create(DataprocMetastoreStubSettings stub) + throws IOException { + return new DataprocMetastoreSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataprocMetastoreStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataprocMetastoreStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataprocMetastoreStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataprocMetastoreStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataprocMetastoreStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataprocMetastoreStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataprocMetastoreStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataprocMetastoreSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataprocMetastoreStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataprocMetastoreSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataprocMetastoreStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataprocMetastoreStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DataprocMetastoreStubSettings.newHttpJsonBuilder()); + } + + public DataprocMetastoreStubSettings.Builder getStubSettingsBuilder() { + return ((DataprocMetastoreStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return getStubSettingsBuilder().listServicesSettings(); + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getStubSettingsBuilder().getServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return getStubSettingsBuilder().createServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public OperationCallSettings.Builder + createServiceOperationSettings() { + return getStubSettingsBuilder().createServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return getStubSettingsBuilder().updateServiceSettings(); + } + + /** Returns the builder for the settings used for calls to updateService. */ + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return getStubSettingsBuilder().updateServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return getStubSettingsBuilder().deleteServiceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return getStubSettingsBuilder().deleteServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listMetadataImports. */ + public PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return getStubSettingsBuilder().listMetadataImportsSettings(); + } + + /** Returns the builder for the settings used for calls to getMetadataImport. */ + public UnaryCallSettings.Builder + getMetadataImportSettings() { + return getStubSettingsBuilder().getMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public UnaryCallSettings.Builder + createMetadataImportSettings() { + return getStubSettingsBuilder().createMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings() { + return getStubSettingsBuilder().createMetadataImportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings.Builder + updateMetadataImportSettings() { + return getStubSettingsBuilder().updateMetadataImportSettings(); + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings() { + return getStubSettingsBuilder().updateMetadataImportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public UnaryCallSettings.Builder exportMetadataSettings() { + return getStubSettingsBuilder().exportMetadataSettings(); + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public OperationCallSettings.Builder + exportMetadataOperationSettings() { + return getStubSettingsBuilder().exportMetadataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public UnaryCallSettings.Builder restoreServiceSettings() { + return getStubSettingsBuilder().restoreServiceSettings(); + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public OperationCallSettings.Builder + restoreServiceOperationSettings() { + return getStubSettingsBuilder().restoreServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listBackups. */ + public PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings() { + return getStubSettingsBuilder().listBackupsSettings(); + } + + /** Returns the builder for the settings used for calls to getBackup. */ + public UnaryCallSettings.Builder getBackupSettings() { + return getStubSettingsBuilder().getBackupSettings(); + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public UnaryCallSettings.Builder createBackupSettings() { + return getStubSettingsBuilder().createBackupSettings(); + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public OperationCallSettings.Builder + createBackupOperationSettings() { + return getStubSettingsBuilder().createBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public UnaryCallSettings.Builder deleteBackupSettings() { + return getStubSettingsBuilder().deleteBackupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return getStubSettingsBuilder().deleteBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings.Builder + removeIamPolicySettings() { + return getStubSettingsBuilder().removeIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to queryMetadata. */ + public UnaryCallSettings.Builder queryMetadataSettings() { + return getStubSettingsBuilder().queryMetadataSettings(); + } + + /** Returns the builder for the settings used for calls to queryMetadata. */ + public OperationCallSettings.Builder< + QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> + queryMetadataOperationSettings() { + return getStubSettingsBuilder().queryMetadataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to moveTableToDatabase. */ + public UnaryCallSettings.Builder + moveTableToDatabaseSettings() { + return getStubSettingsBuilder().moveTableToDatabaseSettings(); + } + + /** Returns the builder for the settings used for calls to moveTableToDatabase. */ + public OperationCallSettings.Builder< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings() { + return getStubSettingsBuilder().moveTableToDatabaseOperationSettings(); + } + + /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ + public UnaryCallSettings.Builder + alterMetadataResourceLocationSettings() { + return getStubSettingsBuilder().alterMetadataResourceLocationSettings(); + } + + /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ + public OperationCallSettings.Builder< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings() { + return getStubSettingsBuilder().alterMetadataResourceLocationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public DataprocMetastoreSettings build() throws IOException { + return new DataprocMetastoreSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/gapic_metadata.json b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..64ac8f2d4872 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/gapic_metadata.json @@ -0,0 +1,129 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.metastore.v1beta", + "libraryPackage": "com.google.cloud.metastore.v1beta", + "services": { + "DataprocMetastore": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreClient", + "rpcs": { + "AlterMetadataResourceLocation": { + "methods": ["alterMetadataResourceLocationAsync", "alterMetadataResourceLocationOperationCallable", "alterMetadataResourceLocationCallable"] + }, + "CreateBackup": { + "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] + }, + "CreateMetadataImport": { + "methods": ["createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportAsync", "createMetadataImportOperationCallable", "createMetadataImportCallable"] + }, + "CreateService": { + "methods": ["createServiceAsync", "createServiceAsync", "createServiceAsync", "createServiceOperationCallable", "createServiceCallable"] + }, + "DeleteBackup": { + "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] + }, + "DeleteService": { + "methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] + }, + "ExportMetadata": { + "methods": ["exportMetadataAsync", "exportMetadataOperationCallable", "exportMetadataCallable"] + }, + "GetBackup": { + "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetMetadataImport": { + "methods": ["getMetadataImport", "getMetadataImport", "getMetadataImport", "getMetadataImportCallable"] + }, + "GetService": { + "methods": ["getService", "getService", "getService", "getServiceCallable"] + }, + "ListBackups": { + "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListMetadataImports": { + "methods": ["listMetadataImports", "listMetadataImports", "listMetadataImports", "listMetadataImportsPagedCallable", "listMetadataImportsCallable"] + }, + "ListServices": { + "methods": ["listServices", "listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] + }, + "MoveTableToDatabase": { + "methods": ["moveTableToDatabaseAsync", "moveTableToDatabaseOperationCallable", "moveTableToDatabaseCallable"] + }, + "QueryMetadata": { + "methods": ["queryMetadataAsync", "queryMetadataOperationCallable", "queryMetadataCallable"] + }, + "RemoveIamPolicy": { + "methods": ["removeIamPolicy", "removeIamPolicyCallable"] + }, + "RestoreService": { + "methods": ["restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceOperationCallable", "restoreServiceCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateMetadataImport": { + "methods": ["updateMetadataImportAsync", "updateMetadataImportAsync", "updateMetadataImportOperationCallable", "updateMetadataImportCallable"] + }, + "UpdateService": { + "methods": ["updateServiceAsync", "updateServiceAsync", "updateServiceOperationCallable", "updateServiceCallable"] + } + } + } + } + }, + "DataprocMetastoreFederation": { + "clients": { + "grpc": { + "libraryClient": "DataprocMetastoreFederationClient", + "rpcs": { + "CreateFederation": { + "methods": ["createFederationAsync", "createFederationAsync", "createFederationAsync", "createFederationOperationCallable", "createFederationCallable"] + }, + "DeleteFederation": { + "methods": ["deleteFederationAsync", "deleteFederationAsync", "deleteFederationAsync", "deleteFederationOperationCallable", "deleteFederationCallable"] + }, + "GetFederation": { + "methods": ["getFederation", "getFederation", "getFederation", "getFederationCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListFederations": { + "methods": ["listFederations", "listFederations", "listFederations", "listFederationsPagedCallable", "listFederationsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateFederation": { + "methods": ["updateFederationAsync", "updateFederationAsync", "updateFederationOperationCallable", "updateFederationCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/package-info.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/package-info.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/package-info.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/package-info.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..fa3e7c681016 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStub.java @@ -0,0 +1,134 @@ +/* + * 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.v1beta.stub; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.CreateFederationRequest; +import com.google.cloud.metastore.v1beta.DeleteFederationRequest; +import com.google.cloud.metastore.v1beta.Federation; +import com.google.cloud.metastore.v1beta.GetFederationRequest; +import com.google.cloud.metastore.v1beta.ListFederationsRequest; +import com.google.cloud.metastore.v1beta.ListFederationsResponse; +import com.google.cloud.metastore.v1beta.OperationMetadata; +import com.google.cloud.metastore.v1beta.UpdateFederationRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataprocMetastoreFederation service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@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 + listFederationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFederationsPagedCallable()"); + } + + public UnaryCallable listFederationsCallable() { + throw new UnsupportedOperationException("Not implemented: listFederationsCallable()"); + } + + public UnaryCallable getFederationCallable() { + throw new UnsupportedOperationException("Not implemented: getFederationCallable()"); + } + + public OperationCallable + createFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createFederationOperationCallable()"); + } + + public UnaryCallable createFederationCallable() { + throw new UnsupportedOperationException("Not implemented: createFederationCallable()"); + } + + public OperationCallable + updateFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateFederationOperationCallable()"); + } + + public UnaryCallable updateFederationCallable() { + throw new UnsupportedOperationException("Not implemented: updateFederationCallable()"); + } + + public OperationCallable + deleteFederationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFederationOperationCallable()"); + } + + public UnaryCallable deleteFederationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFederationCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStubSettings.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStubSettings.java new file mode 100644 index 000000000000..39ba0483dcc9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreFederationStubSettings.java @@ -0,0 +1,820 @@ +/* + * 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.v1beta.stub; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.CreateFederationRequest; +import com.google.cloud.metastore.v1beta.DeleteFederationRequest; +import com.google.cloud.metastore.v1beta.Federation; +import com.google.cloud.metastore.v1beta.GetFederationRequest; +import com.google.cloud.metastore.v1beta.ListFederationsRequest; +import com.google.cloud.metastore.v1beta.ListFederationsResponse; +import com.google.cloud.metastore.v1beta.OperationMetadata; +import com.google.cloud.metastore.v1beta.UpdateFederationRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreFederationStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings; + private final UnaryCallSettings getFederationSettings; + private final UnaryCallSettings createFederationSettings; + private final OperationCallSettings + createFederationOperationSettings; + private final UnaryCallSettings updateFederationSettings; + private final OperationCallSettings + updateFederationOperationSettings; + private final UnaryCallSettings deleteFederationSettings; + private final OperationCallSettings + deleteFederationOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListFederationsRequest, ListFederationsResponse, Federation> + LIST_FEDERATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFederationsRequest injectToken( + ListFederationsRequest payload, String token) { + return ListFederationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFederationsRequest injectPageSize( + ListFederationsRequest payload, int pageSize) { + return ListFederationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFederationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFederationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFederationsResponse payload) { + return payload.getFederationsList() == null + ? ImmutableList.of() + : payload.getFederationsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + LIST_FEDERATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFederationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_FEDERATIONS_PAGE_STR_DESC, request, context); + return ListFederationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listFederations. */ + public PagedCallSettings< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return listFederationsSettings; + } + + /** Returns the object with the settings used for calls to getFederation. */ + public UnaryCallSettings getFederationSettings() { + return getFederationSettings; + } + + /** Returns the object with the settings used for calls to createFederation. */ + public UnaryCallSettings createFederationSettings() { + return createFederationSettings; + } + + /** Returns the object with the settings used for calls to createFederation. */ + public OperationCallSettings + createFederationOperationSettings() { + return createFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public UnaryCallSettings updateFederationSettings() { + return updateFederationSettings; + } + + /** Returns the object with the settings used for calls to updateFederation. */ + public OperationCallSettings + updateFederationOperationSettings() { + return updateFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public UnaryCallSettings deleteFederationSettings() { + return deleteFederationSettings; + } + + /** Returns the object with the settings used for calls to deleteFederation. */ + public OperationCallSettings + deleteFederationOperationSettings() { + return deleteFederationOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public DataprocMetastoreFederationStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataprocMetastoreFederationStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataprocMetastoreFederationStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "metastore.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "metastore.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreFederationStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreFederationStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreFederationStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listFederationsSettings = settingsBuilder.listFederationsSettings().build(); + getFederationSettings = settingsBuilder.getFederationSettings().build(); + createFederationSettings = settingsBuilder.createFederationSettings().build(); + createFederationOperationSettings = settingsBuilder.createFederationOperationSettings().build(); + updateFederationSettings = settingsBuilder.updateFederationSettings().build(); + updateFederationOperationSettings = settingsBuilder.updateFederationOperationSettings().build(); + deleteFederationSettings = settingsBuilder.deleteFederationSettings().build(); + deleteFederationOperationSettings = settingsBuilder.deleteFederationOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for DataprocMetastoreFederationStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings; + private final UnaryCallSettings.Builder getFederationSettings; + private final UnaryCallSettings.Builder + createFederationSettings; + private final OperationCallSettings.Builder< + CreateFederationRequest, Federation, OperationMetadata> + createFederationOperationSettings; + private final UnaryCallSettings.Builder + updateFederationSettings; + private final OperationCallSettings.Builder< + UpdateFederationRequest, Federation, OperationMetadata> + updateFederationOperationSettings; + private final UnaryCallSettings.Builder + deleteFederationSettings; + private final OperationCallSettings.Builder + deleteFederationOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listFederationsSettings = PagedCallSettings.newBuilder(LIST_FEDERATIONS_PAGE_STR_FACT); + getFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFederationOperationSettings = OperationCallSettings.newBuilder(); + updateFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFederationOperationSettings = OperationCallSettings.newBuilder(); + deleteFederationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFederationOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listFederationsSettings, + getFederationSettings, + createFederationSettings, + updateFederationSettings, + deleteFederationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(DataprocMetastoreFederationStubSettings settings) { + super(settings); + + listFederationsSettings = settings.listFederationsSettings.toBuilder(); + getFederationSettings = settings.getFederationSettings.toBuilder(); + createFederationSettings = settings.createFederationSettings.toBuilder(); + createFederationOperationSettings = settings.createFederationOperationSettings.toBuilder(); + updateFederationSettings = settings.updateFederationSettings.toBuilder(); + updateFederationOperationSettings = settings.updateFederationOperationSettings.toBuilder(); + deleteFederationSettings = settings.deleteFederationSettings.toBuilder(); + deleteFederationOperationSettings = settings.deleteFederationOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listFederationsSettings, + getFederationSettings, + createFederationSettings, + updateFederationSettings, + deleteFederationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listFederationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteFederationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Federation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteFederationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listFederations. */ + public PagedCallSettings.Builder< + ListFederationsRequest, ListFederationsResponse, ListFederationsPagedResponse> + listFederationsSettings() { + return listFederationsSettings; + } + + /** Returns the builder for the settings used for calls to getFederation. */ + public UnaryCallSettings.Builder getFederationSettings() { + return getFederationSettings; + } + + /** Returns the builder for the settings used for calls to createFederation. */ + public UnaryCallSettings.Builder + createFederationSettings() { + return createFederationSettings; + } + + /** Returns the builder for the settings used for calls to createFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createFederationOperationSettings() { + return createFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + public UnaryCallSettings.Builder + updateFederationSettings() { + return updateFederationSettings; + } + + /** Returns the builder for the settings used for calls to updateFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateFederationOperationSettings() { + return updateFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + public UnaryCallSettings.Builder + deleteFederationSettings() { + return deleteFederationSettings; + } + + /** Returns the builder for the settings used for calls to deleteFederation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteFederationOperationSettings() { + return deleteFederationOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public DataprocMetastoreFederationStubSettings build() throws IOException { + return new DataprocMetastoreFederationStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStub.java new file mode 100644 index 000000000000..2c1151c09ad2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStub.java @@ -0,0 +1,280 @@ +/* + * 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.v1beta.stub; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1beta.Backup; +import com.google.cloud.metastore.v1beta.CreateBackupRequest; +import com.google.cloud.metastore.v1beta.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1beta.CreateServiceRequest; +import com.google.cloud.metastore.v1beta.DeleteBackupRequest; +import com.google.cloud.metastore.v1beta.DeleteServiceRequest; +import com.google.cloud.metastore.v1beta.ExportMetadataRequest; +import com.google.cloud.metastore.v1beta.GetBackupRequest; +import com.google.cloud.metastore.v1beta.GetMetadataImportRequest; +import com.google.cloud.metastore.v1beta.GetServiceRequest; +import com.google.cloud.metastore.v1beta.ListBackupsRequest; +import com.google.cloud.metastore.v1beta.ListBackupsResponse; +import com.google.cloud.metastore.v1beta.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1beta.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1beta.ListServicesRequest; +import com.google.cloud.metastore.v1beta.ListServicesResponse; +import com.google.cloud.metastore.v1beta.MetadataExport; +import com.google.cloud.metastore.v1beta.MetadataImport; +import com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1beta.OperationMetadata; +import com.google.cloud.metastore.v1beta.QueryMetadataRequest; +import com.google.cloud.metastore.v1beta.QueryMetadataResponse; +import com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest; +import com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse; +import com.google.cloud.metastore.v1beta.Restore; +import com.google.cloud.metastore.v1beta.RestoreServiceRequest; +import com.google.cloud.metastore.v1beta.Service; +import com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1beta.UpdateServiceRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class DataprocMetastoreStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listServicesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); + } + + public UnaryCallable listServicesCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); + } + + public UnaryCallable getServiceCallable() { + throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); + } + + public OperationCallable + createServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceOperationCallable()"); + } + + public UnaryCallable createServiceCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceCallable()"); + } + + public OperationCallable + updateServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceOperationCallable()"); + } + + public UnaryCallable updateServiceCallable() { + throw new UnsupportedOperationException("Not implemented: updateServiceCallable()"); + } + + public OperationCallable + deleteServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); + } + + public UnaryCallable deleteServiceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); + } + + public UnaryCallable + listMetadataImportsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listMetadataImportsPagedCallable()"); + } + + public UnaryCallable + listMetadataImportsCallable() { + throw new UnsupportedOperationException("Not implemented: listMetadataImportsCallable()"); + } + + public UnaryCallable getMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: getMetadataImportCallable()"); + } + + public OperationCallable + createMetadataImportOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createMetadataImportOperationCallable()"); + } + + public UnaryCallable createMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: createMetadataImportCallable()"); + } + + public OperationCallable + updateMetadataImportOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateMetadataImportOperationCallable()"); + } + + public UnaryCallable updateMetadataImportCallable() { + throw new UnsupportedOperationException("Not implemented: updateMetadataImportCallable()"); + } + + public OperationCallable + exportMetadataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportMetadataOperationCallable()"); + } + + public UnaryCallable exportMetadataCallable() { + throw new UnsupportedOperationException("Not implemented: exportMetadataCallable()"); + } + + public OperationCallable + restoreServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: restoreServiceOperationCallable()"); + } + + public UnaryCallable restoreServiceCallable() { + throw new UnsupportedOperationException("Not implemented: restoreServiceCallable()"); + } + + public UnaryCallable listBackupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); + } + + public UnaryCallable listBackupsCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); + } + + public UnaryCallable getBackupCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); + } + + public OperationCallable + createBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); + } + + public UnaryCallable createBackupCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); + } + + public OperationCallable + deleteBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); + } + + public UnaryCallable deleteBackupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); + } + + public UnaryCallable removeIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: removeIamPolicyCallable()"); + } + + public OperationCallable + queryMetadataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: queryMetadataOperationCallable()"); + } + + public UnaryCallable queryMetadataCallable() { + throw new UnsupportedOperationException("Not implemented: queryMetadataCallable()"); + } + + public OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: moveTableToDatabaseOperationCallable()"); + } + + public UnaryCallable moveTableToDatabaseCallable() { + throw new UnsupportedOperationException("Not implemented: moveTableToDatabaseCallable()"); + } + + public OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: alterMetadataResourceLocationOperationCallable()"); + } + + public UnaryCallable + alterMetadataResourceLocationCallable() { + throw new UnsupportedOperationException( + "Not implemented: alterMetadataResourceLocationCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStubSettings.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStubSettings.java new file mode 100644 index 000000000000..9e5e50bca8d0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStubSettings.java @@ -0,0 +1,1760 @@ +/* + * 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.v1beta.stub; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1beta.Backup; +import com.google.cloud.metastore.v1beta.CreateBackupRequest; +import com.google.cloud.metastore.v1beta.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1beta.CreateServiceRequest; +import com.google.cloud.metastore.v1beta.DeleteBackupRequest; +import com.google.cloud.metastore.v1beta.DeleteServiceRequest; +import com.google.cloud.metastore.v1beta.ExportMetadataRequest; +import com.google.cloud.metastore.v1beta.GetBackupRequest; +import com.google.cloud.metastore.v1beta.GetMetadataImportRequest; +import com.google.cloud.metastore.v1beta.GetServiceRequest; +import com.google.cloud.metastore.v1beta.ListBackupsRequest; +import com.google.cloud.metastore.v1beta.ListBackupsResponse; +import com.google.cloud.metastore.v1beta.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1beta.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1beta.ListServicesRequest; +import com.google.cloud.metastore.v1beta.ListServicesResponse; +import com.google.cloud.metastore.v1beta.MetadataExport; +import com.google.cloud.metastore.v1beta.MetadataImport; +import com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1beta.OperationMetadata; +import com.google.cloud.metastore.v1beta.QueryMetadataRequest; +import com.google.cloud.metastore.v1beta.QueryMetadataResponse; +import com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest; +import com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse; +import com.google.cloud.metastore.v1beta.Restore; +import com.google.cloud.metastore.v1beta.RestoreServiceRequest; +import com.google.cloud.metastore.v1beta.Service; +import com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1beta.UpdateServiceRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataprocMetastoreStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (metastore.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataprocMetastoreStubSettings.Builder dataprocMetastoreSettingsBuilder =
+ *     DataprocMetastoreStubSettings.newBuilder();
+ * dataprocMetastoreSettingsBuilder
+ *     .getServiceSettings()
+ *     .setRetrySettings(
+ *         dataprocMetastoreSettingsBuilder
+ *             .getServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataprocMetastoreStubSettings dataprocMetastoreSettings =
+ *     dataprocMetastoreSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataprocMetastoreStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings getServiceSettings; + private final UnaryCallSettings createServiceSettings; + private final OperationCallSettings + createServiceOperationSettings; + private final UnaryCallSettings updateServiceSettings; + private final OperationCallSettings + updateServiceOperationSettings; + private final UnaryCallSettings deleteServiceSettings; + private final OperationCallSettings + deleteServiceOperationSettings; + private final PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings; + private final UnaryCallSettings + getMetadataImportSettings; + private final UnaryCallSettings + createMetadataImportSettings; + private final OperationCallSettings< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings; + private final UnaryCallSettings + updateMetadataImportSettings; + private final OperationCallSettings< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings; + private final UnaryCallSettings exportMetadataSettings; + private final OperationCallSettings + exportMetadataOperationSettings; + private final UnaryCallSettings restoreServiceSettings; + private final OperationCallSettings + restoreServiceOperationSettings; + private final PagedCallSettings + listBackupsSettings; + private final UnaryCallSettings getBackupSettings; + private final UnaryCallSettings createBackupSettings; + private final OperationCallSettings + createBackupOperationSettings; + private final UnaryCallSettings deleteBackupSettings; + private final OperationCallSettings + deleteBackupOperationSettings; + private final UnaryCallSettings + removeIamPolicySettings; + private final UnaryCallSettings queryMetadataSettings; + private final OperationCallSettings< + QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> + queryMetadataOperationSettings; + private final UnaryCallSettings + moveTableToDatabaseSettings; + private final OperationCallSettings< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings; + private final UnaryCallSettings + alterMetadataResourceLocationSettings; + private final OperationCallSettings< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_SERVICES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServicesRequest injectToken(ListServicesRequest payload, String token) { + return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { + return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServicesResponse payload) { + return payload.getServicesList() == null + ? ImmutableList.of() + : payload.getServicesList(); + } + }; + + private static final PagedListDescriptor< + ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport> + LIST_METADATA_IMPORTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListMetadataImportsRequest, ListMetadataImportsResponse, MetadataImport>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMetadataImportsRequest injectToken( + ListMetadataImportsRequest payload, String token) { + return ListMetadataImportsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMetadataImportsRequest injectPageSize( + ListMetadataImportsRequest payload, int pageSize) { + return ListMetadataImportsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMetadataImportsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMetadataImportsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListMetadataImportsResponse payload) { + return payload.getMetadataImportsList() == null + ? ImmutableList.of() + : payload.getMetadataImportsList(); + } + }; + + private static final PagedListDescriptor + LIST_BACKUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { + return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { + return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBackupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBackupsResponse payload) { + return payload.getBackupsList() == null + ? ImmutableList.of() + : payload.getBackupsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + LIST_SERVICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); + return ListServicesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + LIST_METADATA_IMPORTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMetadataImportsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_METADATA_IMPORTS_PAGE_STR_DESC, request, context); + return ListMetadataImportsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + LIST_BACKUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBackupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); + return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return getServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return createServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public UnaryCallSettings updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the object with the settings used for calls to updateService. */ + public OperationCallSettings + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listMetadataImports. */ + public PagedCallSettings< + ListMetadataImportsRequest, ListMetadataImportsResponse, ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return listMetadataImportsSettings; + } + + /** Returns the object with the settings used for calls to getMetadataImport. */ + public UnaryCallSettings getMetadataImportSettings() { + return getMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public UnaryCallSettings createMetadataImportSettings() { + return createMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to createMetadataImport. */ + public OperationCallSettings + createMetadataImportOperationSettings() { + return createMetadataImportOperationSettings; + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings updateMetadataImportSettings() { + return updateMetadataImportSettings; + } + + /** Returns the object with the settings used for calls to updateMetadataImport. */ + public OperationCallSettings + updateMetadataImportOperationSettings() { + return updateMetadataImportOperationSettings; + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public UnaryCallSettings exportMetadataSettings() { + return exportMetadataSettings; + } + + /** Returns the object with the settings used for calls to exportMetadata. */ + public OperationCallSettings + exportMetadataOperationSettings() { + return exportMetadataOperationSettings; + } + + /** Returns the object with the settings used for calls to restoreService. */ + public UnaryCallSettings restoreServiceSettings() { + return restoreServiceSettings; + } + + /** Returns the object with the settings used for calls to restoreService. */ + public OperationCallSettings + restoreServiceOperationSettings() { + return restoreServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return listBackupsSettings; + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return getBackupSettings; + } + + /** Returns the object with the settings used for calls to createBackup. */ + public UnaryCallSettings createBackupSettings() { + return createBackupSettings; + } + + /** Returns the object with the settings used for calls to createBackup. */ + public OperationCallSettings + createBackupOperationSettings() { + return createBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return deleteBackupSettings; + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings + removeIamPolicySettings() { + return removeIamPolicySettings; + } + + /** Returns the object with the settings used for calls to queryMetadata. */ + public UnaryCallSettings queryMetadataSettings() { + return queryMetadataSettings; + } + + /** Returns the object with the settings used for calls to queryMetadata. */ + public OperationCallSettings + queryMetadataOperationSettings() { + return queryMetadataOperationSettings; + } + + /** Returns the object with the settings used for calls to moveTableToDatabase. */ + public UnaryCallSettings moveTableToDatabaseSettings() { + return moveTableToDatabaseSettings; + } + + /** Returns the object with the settings used for calls to moveTableToDatabase. */ + public OperationCallSettings< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings() { + return moveTableToDatabaseOperationSettings; + } + + /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ + public UnaryCallSettings + alterMetadataResourceLocationSettings() { + return alterMetadataResourceLocationSettings; + } + + /** Returns the object with the settings used for calls to alterMetadataResourceLocation. */ + public OperationCallSettings< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings() { + return alterMetadataResourceLocationOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public DataprocMetastoreStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataprocMetastoreStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataprocMetastoreStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "metastore.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "metastore.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataprocMetastoreStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataprocMetastoreStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataprocMetastoreStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listServicesSettings = settingsBuilder.listServicesSettings().build(); + getServiceSettings = settingsBuilder.getServiceSettings().build(); + createServiceSettings = settingsBuilder.createServiceSettings().build(); + createServiceOperationSettings = settingsBuilder.createServiceOperationSettings().build(); + updateServiceSettings = settingsBuilder.updateServiceSettings().build(); + updateServiceOperationSettings = settingsBuilder.updateServiceOperationSettings().build(); + deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); + deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); + listMetadataImportsSettings = settingsBuilder.listMetadataImportsSettings().build(); + getMetadataImportSettings = settingsBuilder.getMetadataImportSettings().build(); + createMetadataImportSettings = settingsBuilder.createMetadataImportSettings().build(); + createMetadataImportOperationSettings = + settingsBuilder.createMetadataImportOperationSettings().build(); + updateMetadataImportSettings = settingsBuilder.updateMetadataImportSettings().build(); + updateMetadataImportOperationSettings = + settingsBuilder.updateMetadataImportOperationSettings().build(); + exportMetadataSettings = settingsBuilder.exportMetadataSettings().build(); + exportMetadataOperationSettings = settingsBuilder.exportMetadataOperationSettings().build(); + restoreServiceSettings = settingsBuilder.restoreServiceSettings().build(); + restoreServiceOperationSettings = settingsBuilder.restoreServiceOperationSettings().build(); + listBackupsSettings = settingsBuilder.listBackupsSettings().build(); + getBackupSettings = settingsBuilder.getBackupSettings().build(); + createBackupSettings = settingsBuilder.createBackupSettings().build(); + createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); + deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); + deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); + removeIamPolicySettings = settingsBuilder.removeIamPolicySettings().build(); + queryMetadataSettings = settingsBuilder.queryMetadataSettings().build(); + queryMetadataOperationSettings = settingsBuilder.queryMetadataOperationSettings().build(); + moveTableToDatabaseSettings = settingsBuilder.moveTableToDatabaseSettings().build(); + moveTableToDatabaseOperationSettings = + settingsBuilder.moveTableToDatabaseOperationSettings().build(); + alterMetadataResourceLocationSettings = + settingsBuilder.alterMetadataResourceLocationSettings().build(); + alterMetadataResourceLocationOperationSettings = + settingsBuilder.alterMetadataResourceLocationOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for DataprocMetastoreStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings.Builder getServiceSettings; + private final UnaryCallSettings.Builder createServiceSettings; + private final OperationCallSettings.Builder + createServiceOperationSettings; + private final UnaryCallSettings.Builder updateServiceSettings; + private final OperationCallSettings.Builder + updateServiceOperationSettings; + private final UnaryCallSettings.Builder deleteServiceSettings; + private final OperationCallSettings.Builder + deleteServiceOperationSettings; + private final PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings; + private final UnaryCallSettings.Builder + getMetadataImportSettings; + private final UnaryCallSettings.Builder + createMetadataImportSettings; + private final OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings; + private final UnaryCallSettings.Builder + updateMetadataImportSettings; + private final OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings; + private final UnaryCallSettings.Builder + exportMetadataSettings; + private final OperationCallSettings.Builder< + ExportMetadataRequest, MetadataExport, OperationMetadata> + exportMetadataOperationSettings; + private final UnaryCallSettings.Builder + restoreServiceSettings; + private final OperationCallSettings.Builder + restoreServiceOperationSettings; + private final PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings; + private final UnaryCallSettings.Builder getBackupSettings; + private final UnaryCallSettings.Builder createBackupSettings; + private final OperationCallSettings.Builder + createBackupOperationSettings; + private final UnaryCallSettings.Builder deleteBackupSettings; + private final OperationCallSettings.Builder + deleteBackupOperationSettings; + private final UnaryCallSettings.Builder + removeIamPolicySettings; + private final UnaryCallSettings.Builder queryMetadataSettings; + private final OperationCallSettings.Builder< + QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> + queryMetadataOperationSettings; + private final UnaryCallSettings.Builder + moveTableToDatabaseSettings; + private final OperationCallSettings.Builder< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings; + private final UnaryCallSettings.Builder + alterMetadataResourceLocationSettings; + private final OperationCallSettings.Builder< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); + getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceOperationSettings = OperationCallSettings.newBuilder(); + updateServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateServiceOperationSettings = OperationCallSettings.newBuilder(); + deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteServiceOperationSettings = OperationCallSettings.newBuilder(); + listMetadataImportsSettings = + PagedCallSettings.newBuilder(LIST_METADATA_IMPORTS_PAGE_STR_FACT); + getMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMetadataImportOperationSettings = OperationCallSettings.newBuilder(); + updateMetadataImportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMetadataImportOperationSettings = OperationCallSettings.newBuilder(); + exportMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportMetadataOperationSettings = OperationCallSettings.newBuilder(); + restoreServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restoreServiceOperationSettings = OperationCallSettings.newBuilder(); + listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); + getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupOperationSettings = OperationCallSettings.newBuilder(); + deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupOperationSettings = OperationCallSettings.newBuilder(); + removeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + queryMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + queryMetadataOperationSettings = OperationCallSettings.newBuilder(); + moveTableToDatabaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + moveTableToDatabaseOperationSettings = OperationCallSettings.newBuilder(); + alterMetadataResourceLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + alterMetadataResourceLocationOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + createServiceSettings, + updateServiceSettings, + deleteServiceSettings, + listMetadataImportsSettings, + getMetadataImportSettings, + createMetadataImportSettings, + updateMetadataImportSettings, + exportMetadataSettings, + restoreServiceSettings, + listBackupsSettings, + getBackupSettings, + createBackupSettings, + deleteBackupSettings, + removeIamPolicySettings, + queryMetadataSettings, + moveTableToDatabaseSettings, + alterMetadataResourceLocationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(DataprocMetastoreStubSettings settings) { + super(settings); + + listServicesSettings = settings.listServicesSettings.toBuilder(); + getServiceSettings = settings.getServiceSettings.toBuilder(); + createServiceSettings = settings.createServiceSettings.toBuilder(); + createServiceOperationSettings = settings.createServiceOperationSettings.toBuilder(); + updateServiceSettings = settings.updateServiceSettings.toBuilder(); + updateServiceOperationSettings = settings.updateServiceOperationSettings.toBuilder(); + deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); + deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); + listMetadataImportsSettings = settings.listMetadataImportsSettings.toBuilder(); + getMetadataImportSettings = settings.getMetadataImportSettings.toBuilder(); + createMetadataImportSettings = settings.createMetadataImportSettings.toBuilder(); + createMetadataImportOperationSettings = + settings.createMetadataImportOperationSettings.toBuilder(); + updateMetadataImportSettings = settings.updateMetadataImportSettings.toBuilder(); + updateMetadataImportOperationSettings = + settings.updateMetadataImportOperationSettings.toBuilder(); + exportMetadataSettings = settings.exportMetadataSettings.toBuilder(); + exportMetadataOperationSettings = settings.exportMetadataOperationSettings.toBuilder(); + restoreServiceSettings = settings.restoreServiceSettings.toBuilder(); + restoreServiceOperationSettings = settings.restoreServiceOperationSettings.toBuilder(); + listBackupsSettings = settings.listBackupsSettings.toBuilder(); + getBackupSettings = settings.getBackupSettings.toBuilder(); + createBackupSettings = settings.createBackupSettings.toBuilder(); + createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); + deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); + deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); + removeIamPolicySettings = settings.removeIamPolicySettings.toBuilder(); + queryMetadataSettings = settings.queryMetadataSettings.toBuilder(); + queryMetadataOperationSettings = settings.queryMetadataOperationSettings.toBuilder(); + moveTableToDatabaseSettings = settings.moveTableToDatabaseSettings.toBuilder(); + moveTableToDatabaseOperationSettings = + settings.moveTableToDatabaseOperationSettings.toBuilder(); + alterMetadataResourceLocationSettings = + settings.alterMetadataResourceLocationSettings.toBuilder(); + alterMetadataResourceLocationOperationSettings = + settings.alterMetadataResourceLocationOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + createServiceSettings, + updateServiceSettings, + deleteServiceSettings, + listMetadataImportsSettings, + getMetadataImportSettings, + createMetadataImportSettings, + updateMetadataImportSettings, + exportMetadataSettings, + restoreServiceSettings, + listBackupsSettings, + getBackupSettings, + createBackupSettings, + deleteBackupSettings, + removeIamPolicySettings, + queryMetadataSettings, + moveTableToDatabaseSettings, + alterMetadataResourceLocationSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listServicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listMetadataImportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateMetadataImportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .exportMetadataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .restoreServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listBackupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .removeIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .queryMetadataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .moveTableToDatabaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .alterMetadataResourceLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .updateServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Service.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(3000000L)) + .build())); + + builder + .deleteServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1500000L)) + .build())); + + builder + .createMetadataImportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .updateMetadataImportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataImport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1200000L)) + .build())); + + builder + .exportMetadataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MetadataExport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .restoreServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Restore.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .createBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(120000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(4800000L)) + .build())); + + builder + .deleteBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1500000L)) + .build())); + + builder + .queryMetadataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(QueryMetadataResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .moveTableToDatabaseOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + MoveTableToDatabaseResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .alterMetadataResourceLocationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AlterMetadataResourceLocationResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return createServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + public UnaryCallSettings.Builder updateServiceSettings() { + return updateServiceSettings; + } + + /** Returns the builder for the settings used for calls to updateService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateServiceOperationSettings() { + return updateServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listMetadataImports. */ + public PagedCallSettings.Builder< + ListMetadataImportsRequest, + ListMetadataImportsResponse, + ListMetadataImportsPagedResponse> + listMetadataImportsSettings() { + return listMetadataImportsSettings; + } + + /** Returns the builder for the settings used for calls to getMetadataImport. */ + public UnaryCallSettings.Builder + getMetadataImportSettings() { + return getMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + public UnaryCallSettings.Builder + createMetadataImportSettings() { + return createMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to createMetadataImport. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateMetadataImportRequest, MetadataImport, OperationMetadata> + createMetadataImportOperationSettings() { + return createMetadataImportOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + public UnaryCallSettings.Builder + updateMetadataImportSettings() { + return updateMetadataImportSettings; + } + + /** Returns the builder for the settings used for calls to updateMetadataImport. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateMetadataImportRequest, MetadataImport, OperationMetadata> + updateMetadataImportOperationSettings() { + return updateMetadataImportOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + public UnaryCallSettings.Builder exportMetadataSettings() { + return exportMetadataSettings; + } + + /** Returns the builder for the settings used for calls to exportMetadata. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + exportMetadataOperationSettings() { + return exportMetadataOperationSettings; + } + + /** Returns the builder for the settings used for calls to restoreService. */ + public UnaryCallSettings.Builder restoreServiceSettings() { + return restoreServiceSettings; + } + + /** Returns the builder for the settings used for calls to restoreService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + restoreServiceOperationSettings() { + return restoreServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listBackups. */ + public PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings() { + return listBackupsSettings; + } + + /** Returns the builder for the settings used for calls to getBackup. */ + public UnaryCallSettings.Builder getBackupSettings() { + return getBackupSettings; + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public UnaryCallSettings.Builder createBackupSettings() { + return createBackupSettings; + } + + /** Returns the builder for the settings used for calls to createBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createBackupOperationSettings() { + return createBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public UnaryCallSettings.Builder deleteBackupSettings() { + return deleteBackupSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings.Builder + removeIamPolicySettings() { + return removeIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to queryMetadata. */ + public UnaryCallSettings.Builder queryMetadataSettings() { + return queryMetadataSettings; + } + + /** Returns the builder for the settings used for calls to queryMetadata. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + QueryMetadataRequest, QueryMetadataResponse, OperationMetadata> + queryMetadataOperationSettings() { + return queryMetadataOperationSettings; + } + + /** Returns the builder for the settings used for calls to moveTableToDatabase. */ + public UnaryCallSettings.Builder + moveTableToDatabaseSettings() { + return moveTableToDatabaseSettings; + } + + /** Returns the builder for the settings used for calls to moveTableToDatabase. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationSettings() { + return moveTableToDatabaseOperationSettings; + } + + /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ + public UnaryCallSettings.Builder + alterMetadataResourceLocationSettings() { + return alterMetadataResourceLocationSettings; + } + + /** Returns the builder for the settings used for calls to alterMetadataResourceLocation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationSettings() { + return alterMetadataResourceLocationOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public DataprocMetastoreStubSettings build() throws IOException { + return new DataprocMetastoreStubSettings(this); + } + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreCallableFactory.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationCallableFactory.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..91d1ddfa4291 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreFederationStub.java @@ -0,0 +1,523 @@ +/* + * 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.v1beta.stub; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.CreateFederationRequest; +import com.google.cloud.metastore.v1beta.DeleteFederationRequest; +import com.google.cloud.metastore.v1beta.Federation; +import com.google.cloud.metastore.v1beta.GetFederationRequest; +import com.google.cloud.metastore.v1beta.ListFederationsRequest; +import com.google.cloud.metastore.v1beta.ListFederationsResponse; +import com.google.cloud.metastore.v1beta.OperationMetadata; +import com.google.cloud.metastore.v1beta.UpdateFederationRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataprocMetastoreFederation service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { + private static final MethodDescriptor + listFederationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/ListFederations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFederationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFederationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/GetFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Federation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/CreateFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/UpdateFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFederationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/DeleteFederation") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFederationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + listFederationsCallable; + private final UnaryCallable + listFederationsPagedCallable; + private final UnaryCallable getFederationCallable; + private final UnaryCallable createFederationCallable; + private final OperationCallable + createFederationOperationCallable; + private final UnaryCallable updateFederationCallable; + private final OperationCallable + updateFederationOperationCallable; + private final UnaryCallable deleteFederationCallable; + private final OperationCallable + deleteFederationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataprocMetastoreFederationStub create( + DataprocMetastoreFederationStubSettings settings) throws IOException { + return new GrpcDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataprocMetastoreFederationStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataprocMetastoreFederationStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDataprocMetastoreFederationCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreFederationStub, 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 GrpcDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listFederationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFederationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("federation.name", String.valueOf(request.getFederation().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteFederationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFederationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.listFederationsCallable = + callableFactory.createUnaryCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.listFederationsPagedCallable = + callableFactory.createPagedCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.getFederationCallable = + callableFactory.createUnaryCallable( + getFederationTransportSettings, settings.getFederationSettings(), clientContext); + this.createFederationCallable = + callableFactory.createUnaryCallable( + createFederationTransportSettings, settings.createFederationSettings(), clientContext); + this.createFederationOperationCallable = + callableFactory.createOperationCallable( + createFederationTransportSettings, + settings.createFederationOperationSettings(), + clientContext, + operationsStub); + this.updateFederationCallable = + callableFactory.createUnaryCallable( + updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); + this.updateFederationOperationCallable = + callableFactory.createOperationCallable( + updateFederationTransportSettings, + settings.updateFederationOperationSettings(), + clientContext, + operationsStub); + this.deleteFederationCallable = + callableFactory.createUnaryCallable( + deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); + this.deleteFederationOperationCallable = + callableFactory.createOperationCallable( + deleteFederationTransportSettings, + settings.deleteFederationOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listFederationsCallable() { + return listFederationsCallable; + } + + @Override + public UnaryCallable + listFederationsPagedCallable() { + return listFederationsPagedCallable; + } + + @Override + public UnaryCallable getFederationCallable() { + return getFederationCallable; + } + + @Override + public UnaryCallable createFederationCallable() { + return createFederationCallable; + } + + @Override + public OperationCallable + createFederationOperationCallable() { + return createFederationOperationCallable; + } + + @Override + public UnaryCallable updateFederationCallable() { + return updateFederationCallable; + } + + @Override + public OperationCallable + updateFederationOperationCallable() { + return updateFederationOperationCallable; + } + + @Override + public UnaryCallable deleteFederationCallable() { + return deleteFederationCallable; + } + + @Override + public OperationCallable + deleteFederationOperationCallable() { + return deleteFederationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreStub.java new file mode 100644 index 000000000000..a1d07b5a063b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreStub.java @@ -0,0 +1,1124 @@ +/* + * 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.v1beta.stub; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1beta.Backup; +import com.google.cloud.metastore.v1beta.CreateBackupRequest; +import com.google.cloud.metastore.v1beta.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1beta.CreateServiceRequest; +import com.google.cloud.metastore.v1beta.DeleteBackupRequest; +import com.google.cloud.metastore.v1beta.DeleteServiceRequest; +import com.google.cloud.metastore.v1beta.ExportMetadataRequest; +import com.google.cloud.metastore.v1beta.GetBackupRequest; +import com.google.cloud.metastore.v1beta.GetMetadataImportRequest; +import com.google.cloud.metastore.v1beta.GetServiceRequest; +import com.google.cloud.metastore.v1beta.ListBackupsRequest; +import com.google.cloud.metastore.v1beta.ListBackupsResponse; +import com.google.cloud.metastore.v1beta.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1beta.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1beta.ListServicesRequest; +import com.google.cloud.metastore.v1beta.ListServicesResponse; +import com.google.cloud.metastore.v1beta.MetadataExport; +import com.google.cloud.metastore.v1beta.MetadataImport; +import com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1beta.OperationMetadata; +import com.google.cloud.metastore.v1beta.QueryMetadataRequest; +import com.google.cloud.metastore.v1beta.QueryMetadataResponse; +import com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest; +import com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse; +import com.google.cloud.metastore.v1beta.Restore; +import com.google.cloud.metastore.v1beta.RestoreServiceRequest; +import com.google.cloud.metastore.v1beta.Service; +import com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1beta.UpdateServiceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDataprocMetastoreStub extends DataprocMetastoreStub { + private static final MethodDescriptor + listServicesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ListServices") + .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/GetService") + .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/CreateService") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/UpdateService") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/DeleteService") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listMetadataImportsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/ListMetadataImports") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMetadataImportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMetadataImportsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/GetMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MetadataImport.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/CreateMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateMetadataImportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/UpdateMetadataImport") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportMetadataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ExportMetadata") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + restoreServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/RestoreService") + .setRequestMarshaller( + ProtoUtils.marshaller(RestoreServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listBackupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ListBackups") + .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/GetBackup") + .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/CreateBackup") + .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/DeleteBackup") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/RemoveIamPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoveIamPolicyResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + queryMetadataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/QueryMetadata") + .setRequestMarshaller( + ProtoUtils.marshaller(QueryMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + moveTableToDatabaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/MoveTableToDatabase") + .setRequestMarshaller( + ProtoUtils.marshaller(MoveTableToDatabaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + alterMetadataResourceLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/AlterMetadataResourceLocation") + .setRequestMarshaller( + ProtoUtils.marshaller(AlterMetadataResourceLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable + listMetadataImportsCallable; + private final UnaryCallable + listMetadataImportsPagedCallable; + private final UnaryCallable getMetadataImportCallable; + private final UnaryCallable createMetadataImportCallable; + private final OperationCallable + createMetadataImportOperationCallable; + private final UnaryCallable updateMetadataImportCallable; + private final OperationCallable + updateMetadataImportOperationCallable; + private final UnaryCallable exportMetadataCallable; + private final OperationCallable + exportMetadataOperationCallable; + private final UnaryCallable restoreServiceCallable; + private final OperationCallable + restoreServiceOperationCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable createBackupCallable; + private final OperationCallable + createBackupOperationCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable + removeIamPolicyCallable; + private final UnaryCallable queryMetadataCallable; + private final OperationCallable + queryMetadataOperationCallable; + private final UnaryCallable moveTableToDatabaseCallable; + private final OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable; + private final UnaryCallable + alterMetadataResourceLocationCallable; + private final OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) + throws IOException { + return new GrpcDataprocMetastoreStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataprocMetastoreStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataprocMetastoreStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataprocMetastoreCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataprocMetastoreStub, 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 GrpcDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listServicesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service.name", String.valueOf(request.getService().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listMetadataImportsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listMetadataImportsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateMetadataImportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateMetadataImportMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "metadata_import.name", + String.valueOf(request.getMetadataImport().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings exportMetadataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportMetadataMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings restoreServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restoreServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings listBackupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBackupsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + removeIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings queryMetadataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(queryMetadataMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings moveTableToDatabaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings + alterMetadataResourceLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service", String.valueOf(request.getService())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + operationsStub); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + operationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + operationsStub); + this.listMetadataImportsCallable = + callableFactory.createUnaryCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.listMetadataImportsPagedCallable = + callableFactory.createPagedCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.getMetadataImportCallable = + callableFactory.createUnaryCallable( + getMetadataImportTransportSettings, + settings.getMetadataImportSettings(), + clientContext); + this.createMetadataImportCallable = + callableFactory.createUnaryCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportSettings(), + clientContext); + this.createMetadataImportOperationCallable = + callableFactory.createOperationCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportOperationSettings(), + clientContext, + operationsStub); + this.updateMetadataImportCallable = + callableFactory.createUnaryCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportSettings(), + clientContext); + this.updateMetadataImportOperationCallable = + callableFactory.createOperationCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportOperationSettings(), + clientContext, + operationsStub); + this.exportMetadataCallable = + callableFactory.createUnaryCallable( + exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); + this.exportMetadataOperationCallable = + callableFactory.createOperationCallable( + exportMetadataTransportSettings, + settings.exportMetadataOperationSettings(), + clientContext, + operationsStub); + this.restoreServiceCallable = + callableFactory.createUnaryCallable( + restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); + this.restoreServiceOperationCallable = + callableFactory.createOperationCallable( + restoreServiceTransportSettings, + settings.restoreServiceOperationSettings(), + clientContext, + operationsStub); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.createBackupCallable = + callableFactory.createUnaryCallable( + createBackupTransportSettings, settings.createBackupSettings(), clientContext); + this.createBackupOperationCallable = + callableFactory.createOperationCallable( + createBackupTransportSettings, + settings.createBackupOperationSettings(), + clientContext, + operationsStub); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + operationsStub); + this.removeIamPolicyCallable = + callableFactory.createUnaryCallable( + removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); + this.queryMetadataCallable = + callableFactory.createUnaryCallable( + queryMetadataTransportSettings, settings.queryMetadataSettings(), clientContext); + this.queryMetadataOperationCallable = + callableFactory.createOperationCallable( + queryMetadataTransportSettings, + settings.queryMetadataOperationSettings(), + clientContext, + operationsStub); + this.moveTableToDatabaseCallable = + callableFactory.createUnaryCallable( + moveTableToDatabaseTransportSettings, + settings.moveTableToDatabaseSettings(), + clientContext); + this.moveTableToDatabaseOperationCallable = + callableFactory.createOperationCallable( + moveTableToDatabaseTransportSettings, + settings.moveTableToDatabaseOperationSettings(), + clientContext, + operationsStub); + this.alterMetadataResourceLocationCallable = + callableFactory.createUnaryCallable( + alterMetadataResourceLocationTransportSettings, + settings.alterMetadataResourceLocationSettings(), + clientContext); + this.alterMetadataResourceLocationOperationCallable = + callableFactory.createOperationCallable( + alterMetadataResourceLocationTransportSettings, + settings.alterMetadataResourceLocationOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable + listMetadataImportsCallable() { + return listMetadataImportsCallable; + } + + @Override + public UnaryCallable + listMetadataImportsPagedCallable() { + return listMetadataImportsPagedCallable; + } + + @Override + public UnaryCallable getMetadataImportCallable() { + return getMetadataImportCallable; + } + + @Override + public UnaryCallable createMetadataImportCallable() { + return createMetadataImportCallable; + } + + @Override + public OperationCallable + createMetadataImportOperationCallable() { + return createMetadataImportOperationCallable; + } + + @Override + public UnaryCallable updateMetadataImportCallable() { + return updateMetadataImportCallable; + } + + @Override + public OperationCallable + updateMetadataImportOperationCallable() { + return updateMetadataImportOperationCallable; + } + + @Override + public UnaryCallable exportMetadataCallable() { + return exportMetadataCallable; + } + + @Override + public OperationCallable + exportMetadataOperationCallable() { + return exportMetadataOperationCallable; + } + + @Override + public UnaryCallable restoreServiceCallable() { + return restoreServiceCallable; + } + + @Override + public OperationCallable + restoreServiceOperationCallable() { + return restoreServiceOperationCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable createBackupCallable() { + return createBackupCallable; + } + + @Override + public OperationCallable + createBackupOperationCallable() { + return createBackupOperationCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable removeIamPolicyCallable() { + return removeIamPolicyCallable; + } + + @Override + public UnaryCallable queryMetadataCallable() { + return queryMetadataCallable; + } + + @Override + public OperationCallable + queryMetadataOperationCallable() { + return queryMetadataOperationCallable; + } + + @Override + public UnaryCallable moveTableToDatabaseCallable() { + return moveTableToDatabaseCallable; + } + + @Override + public OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable() { + return moveTableToDatabaseOperationCallable; + } + + @Override + public UnaryCallable + alterMetadataResourceLocationCallable() { + return alterMetadataResourceLocationCallable; + } + + @Override + public OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable() { + return alterMetadataResourceLocationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreCallableFactory.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationCallableFactory.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationStub.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationStub.java new file mode 100644 index 000000000000..4dae0229a9c8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreFederationStub.java @@ -0,0 +1,823 @@ +/* + * 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.v1beta.stub; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.CreateFederationRequest; +import com.google.cloud.metastore.v1beta.DeleteFederationRequest; +import com.google.cloud.metastore.v1beta.Federation; +import com.google.cloud.metastore.v1beta.GetFederationRequest; +import com.google.cloud.metastore.v1beta.ListFederationsRequest; +import com.google.cloud.metastore.v1beta.ListFederationsResponse; +import com.google.cloud.metastore.v1beta.OperationMetadata; +import com.google.cloud.metastore.v1beta.UpdateFederationRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataprocMetastoreFederation service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonDataprocMetastoreFederationStub extends DataprocMetastoreFederationStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(OperationMetadata.getDescriptor()) + .add(Empty.getDescriptor()) + .add(Federation.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listFederationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/ListFederations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/federations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListFederationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/GetFederation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Federation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/CreateFederation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/federations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "federationId", request.getFederationId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("federation", request.getFederation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/UpdateFederation") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{federation.name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "federation.name", request.getFederation().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("federation", request.getFederation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteFederationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastoreFederation/DeleteFederation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/federations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteFederationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/services/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy", + "/v1beta/{resource=projects/*/locations/*/federations/*}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/services/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy", + "/v1beta/{resource=projects/*/locations/*/federations/*}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/services/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions", + "/v1beta/{resource=projects/*/locations/*/federations/*}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + listFederationsCallable; + private final UnaryCallable + listFederationsPagedCallable; + private final UnaryCallable getFederationCallable; + private final UnaryCallable createFederationCallable; + private final OperationCallable + createFederationOperationCallable; + private final UnaryCallable updateFederationCallable; + private final OperationCallable + updateFederationOperationCallable; + private final UnaryCallable deleteFederationCallable; + private final OperationCallable + deleteFederationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataprocMetastoreFederationStub create( + DataprocMetastoreFederationStubSettings settings) throws IOException { + return new HttpJsonDataprocMetastoreFederationStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataprocMetastoreFederationStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataprocMetastoreFederationStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonDataprocMetastoreFederationCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreFederationStub, 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 HttpJsonDataprocMetastoreFederationStub( + DataprocMetastoreFederationStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1beta/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listFederationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listFederationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteFederationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteFederationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listFederationsCallable = + callableFactory.createUnaryCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.listFederationsPagedCallable = + callableFactory.createPagedCallable( + listFederationsTransportSettings, settings.listFederationsSettings(), clientContext); + this.getFederationCallable = + callableFactory.createUnaryCallable( + getFederationTransportSettings, settings.getFederationSettings(), clientContext); + this.createFederationCallable = + callableFactory.createUnaryCallable( + createFederationTransportSettings, settings.createFederationSettings(), clientContext); + this.createFederationOperationCallable = + callableFactory.createOperationCallable( + createFederationTransportSettings, + settings.createFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateFederationCallable = + callableFactory.createUnaryCallable( + updateFederationTransportSettings, settings.updateFederationSettings(), clientContext); + this.updateFederationOperationCallable = + callableFactory.createOperationCallable( + updateFederationTransportSettings, + settings.updateFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteFederationCallable = + callableFactory.createUnaryCallable( + deleteFederationTransportSettings, settings.deleteFederationSettings(), clientContext); + this.deleteFederationOperationCallable = + callableFactory.createOperationCallable( + deleteFederationTransportSettings, + settings.deleteFederationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listFederationsMethodDescriptor); + methodDescriptors.add(getFederationMethodDescriptor); + methodDescriptors.add(createFederationMethodDescriptor); + methodDescriptors.add(updateFederationMethodDescriptor); + methodDescriptors.add(deleteFederationMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listFederationsCallable() { + return listFederationsCallable; + } + + @Override + public UnaryCallable + listFederationsPagedCallable() { + return listFederationsPagedCallable; + } + + @Override + public UnaryCallable getFederationCallable() { + return getFederationCallable; + } + + @Override + public UnaryCallable createFederationCallable() { + return createFederationCallable; + } + + @Override + public OperationCallable + createFederationOperationCallable() { + return createFederationOperationCallable; + } + + @Override + public UnaryCallable updateFederationCallable() { + return updateFederationCallable; + } + + @Override + public OperationCallable + updateFederationOperationCallable() { + return updateFederationOperationCallable; + } + + @Override + public UnaryCallable deleteFederationCallable() { + return deleteFederationCallable; + } + + @Override + public OperationCallable + deleteFederationOperationCallable() { + return deleteFederationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreStub.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreStub.java new file mode 100644 index 000000000000..47eafedb096e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/HttpJsonDataprocMetastoreStub.java @@ -0,0 +1,1789 @@ +/* + * 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.v1beta.stub; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1beta.Backup; +import com.google.cloud.metastore.v1beta.CreateBackupRequest; +import com.google.cloud.metastore.v1beta.CreateMetadataImportRequest; +import com.google.cloud.metastore.v1beta.CreateServiceRequest; +import com.google.cloud.metastore.v1beta.DeleteBackupRequest; +import com.google.cloud.metastore.v1beta.DeleteServiceRequest; +import com.google.cloud.metastore.v1beta.ExportMetadataRequest; +import com.google.cloud.metastore.v1beta.GetBackupRequest; +import com.google.cloud.metastore.v1beta.GetMetadataImportRequest; +import com.google.cloud.metastore.v1beta.GetServiceRequest; +import com.google.cloud.metastore.v1beta.ListBackupsRequest; +import com.google.cloud.metastore.v1beta.ListBackupsResponse; +import com.google.cloud.metastore.v1beta.ListMetadataImportsRequest; +import com.google.cloud.metastore.v1beta.ListMetadataImportsResponse; +import com.google.cloud.metastore.v1beta.ListServicesRequest; +import com.google.cloud.metastore.v1beta.ListServicesResponse; +import com.google.cloud.metastore.v1beta.MetadataExport; +import com.google.cloud.metastore.v1beta.MetadataImport; +import com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1beta.OperationMetadata; +import com.google.cloud.metastore.v1beta.QueryMetadataRequest; +import com.google.cloud.metastore.v1beta.QueryMetadataResponse; +import com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest; +import com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse; +import com.google.cloud.metastore.v1beta.Restore; +import com.google.cloud.metastore.v1beta.RestoreServiceRequest; +import com.google.cloud.metastore.v1beta.Service; +import com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest; +import com.google.cloud.metastore.v1beta.UpdateServiceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataprocMetastore service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(OperationMetadata.getDescriptor()) + .add(Empty.getDescriptor()) + .add(MetadataImport.getDescriptor()) + .add(MoveTableToDatabaseResponse.getDescriptor()) + .add(AlterMetadataResourceLocationResponse.getDescriptor()) + .add(QueryMetadataResponse.getDescriptor()) + .add(Restore.getDescriptor()) + .add(Service.getDescriptor()) + .add(Backup.getDescriptor()) + .add(MetadataExport.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listServicesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ListServices") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/services", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListServicesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/GetService") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Service.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/CreateService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/services", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "serviceId", request.getServiceId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("service", request.getService(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/UpdateService") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{service.name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "service.name", request.getService().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("service", request.getService(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/DeleteService") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/services/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listMetadataImportsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/ListMetadataImports") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListMetadataImportsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/GetMetadataImport") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/services/*/metadataImports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MetadataImport.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/CreateMetadataImport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "metadataImportId", request.getMetadataImportId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("metadataImport", request.getMetadataImport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateMetadataImportRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateMetadataImportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/UpdateMetadataImport") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{metadataImport.name=projects/*/locations/*/services/*/metadataImports/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "metadataImport.name", + request.getMetadataImport().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("metadataImport", request.getMetadataImport(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateMetadataImportRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + exportMetadataMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ExportMetadata") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{service=projects/*/locations/*/services/*}:exportMetadata", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportMetadataRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + restoreServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/RestoreService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{service=projects/*/locations/*/services/*}:restore", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RestoreServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listBackupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/ListBackups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/services/*}/backups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/GetBackup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/services/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Backup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/CreateBackup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/services/*}/backups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "backupId", request.getBackupId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backup", request.getBackup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/DeleteBackup") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/services/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + removeIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/RemoveIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RemoveIamPolicyResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + queryMetadataMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1beta.DataprocMetastore/QueryMetadata") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{service=projects/*/locations/*/services/*}:queryMetadata", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (QueryMetadataRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + moveTableToDatabaseMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/MoveTableToDatabase") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{service=projects/*/locations/*/services/*}:moveTableToDatabase", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (MoveTableToDatabaseRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + alterMetadataResourceLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.metastore.v1beta.DataprocMetastore/AlterMetadataResourceLocation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{service=projects/*/locations/*/services/*}:alterLocation", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "service", request.getService()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearService().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AlterMetadataResourceLocationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/services/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy", + "/v1beta/{resource=projects/*/locations/*/federations/*}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/services/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy", + "/v1beta/{resource=projects/*/locations/*/federations/*}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/services/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions", + "/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions", + "/v1beta/{resource=projects/*/locations/*/federations/*}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable updateServiceCallable; + private final OperationCallable + updateServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable + listMetadataImportsCallable; + private final UnaryCallable + listMetadataImportsPagedCallable; + private final UnaryCallable getMetadataImportCallable; + private final UnaryCallable createMetadataImportCallable; + private final OperationCallable + createMetadataImportOperationCallable; + private final UnaryCallable updateMetadataImportCallable; + private final OperationCallable + updateMetadataImportOperationCallable; + private final UnaryCallable exportMetadataCallable; + private final OperationCallable + exportMetadataOperationCallable; + private final UnaryCallable restoreServiceCallable; + private final OperationCallable + restoreServiceOperationCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable createBackupCallable; + private final OperationCallable + createBackupOperationCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable + removeIamPolicyCallable; + private final UnaryCallable queryMetadataCallable; + private final OperationCallable + queryMetadataOperationCallable; + private final UnaryCallable moveTableToDatabaseCallable; + private final OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable; + private final UnaryCallable + alterMetadataResourceLocationCallable; + private final OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataprocMetastoreStub create(DataprocMetastoreStubSettings settings) + throws IOException { + return new HttpJsonDataprocMetastoreStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataprocMetastoreStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataprocMetastoreStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDataprocMetastoreCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataprocMetastoreStub, 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 HttpJsonDataprocMetastoreStub( + DataprocMetastoreStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1beta/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listServicesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listMetadataImportsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listMetadataImportsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateMetadataImportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateMetadataImportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings exportMetadataTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportMetadataMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings restoreServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(restoreServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listBackupsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBackupsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + removeIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings queryMetadataTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(queryMetadataMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + moveTableToDatabaseTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + alterMetadataResourceLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateServiceCallable = + callableFactory.createUnaryCallable( + updateServiceTransportSettings, settings.updateServiceSettings(), clientContext); + this.updateServiceOperationCallable = + callableFactory.createOperationCallable( + updateServiceTransportSettings, + settings.updateServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listMetadataImportsCallable = + callableFactory.createUnaryCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.listMetadataImportsPagedCallable = + callableFactory.createPagedCallable( + listMetadataImportsTransportSettings, + settings.listMetadataImportsSettings(), + clientContext); + this.getMetadataImportCallable = + callableFactory.createUnaryCallable( + getMetadataImportTransportSettings, + settings.getMetadataImportSettings(), + clientContext); + this.createMetadataImportCallable = + callableFactory.createUnaryCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportSettings(), + clientContext); + this.createMetadataImportOperationCallable = + callableFactory.createOperationCallable( + createMetadataImportTransportSettings, + settings.createMetadataImportOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateMetadataImportCallable = + callableFactory.createUnaryCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportSettings(), + clientContext); + this.updateMetadataImportOperationCallable = + callableFactory.createOperationCallable( + updateMetadataImportTransportSettings, + settings.updateMetadataImportOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.exportMetadataCallable = + callableFactory.createUnaryCallable( + exportMetadataTransportSettings, settings.exportMetadataSettings(), clientContext); + this.exportMetadataOperationCallable = + callableFactory.createOperationCallable( + exportMetadataTransportSettings, + settings.exportMetadataOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.restoreServiceCallable = + callableFactory.createUnaryCallable( + restoreServiceTransportSettings, settings.restoreServiceSettings(), clientContext); + this.restoreServiceOperationCallable = + callableFactory.createOperationCallable( + restoreServiceTransportSettings, + settings.restoreServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.createBackupCallable = + callableFactory.createUnaryCallable( + createBackupTransportSettings, settings.createBackupSettings(), clientContext); + this.createBackupOperationCallable = + callableFactory.createOperationCallable( + createBackupTransportSettings, + settings.createBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.removeIamPolicyCallable = + callableFactory.createUnaryCallable( + removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); + this.queryMetadataCallable = + callableFactory.createUnaryCallable( + queryMetadataTransportSettings, settings.queryMetadataSettings(), clientContext); + this.queryMetadataOperationCallable = + callableFactory.createOperationCallable( + queryMetadataTransportSettings, + settings.queryMetadataOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.moveTableToDatabaseCallable = + callableFactory.createUnaryCallable( + moveTableToDatabaseTransportSettings, + settings.moveTableToDatabaseSettings(), + clientContext); + this.moveTableToDatabaseOperationCallable = + callableFactory.createOperationCallable( + moveTableToDatabaseTransportSettings, + settings.moveTableToDatabaseOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.alterMetadataResourceLocationCallable = + callableFactory.createUnaryCallable( + alterMetadataResourceLocationTransportSettings, + settings.alterMetadataResourceLocationSettings(), + clientContext); + this.alterMetadataResourceLocationOperationCallable = + callableFactory.createOperationCallable( + alterMetadataResourceLocationTransportSettings, + settings.alterMetadataResourceLocationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listServicesMethodDescriptor); + methodDescriptors.add(getServiceMethodDescriptor); + methodDescriptors.add(createServiceMethodDescriptor); + methodDescriptors.add(updateServiceMethodDescriptor); + methodDescriptors.add(deleteServiceMethodDescriptor); + methodDescriptors.add(listMetadataImportsMethodDescriptor); + methodDescriptors.add(getMetadataImportMethodDescriptor); + methodDescriptors.add(createMetadataImportMethodDescriptor); + methodDescriptors.add(updateMetadataImportMethodDescriptor); + methodDescriptors.add(exportMetadataMethodDescriptor); + methodDescriptors.add(restoreServiceMethodDescriptor); + methodDescriptors.add(listBackupsMethodDescriptor); + methodDescriptors.add(getBackupMethodDescriptor); + methodDescriptors.add(createBackupMethodDescriptor); + methodDescriptors.add(deleteBackupMethodDescriptor); + methodDescriptors.add(removeIamPolicyMethodDescriptor); + methodDescriptors.add(queryMetadataMethodDescriptor); + methodDescriptors.add(moveTableToDatabaseMethodDescriptor); + methodDescriptors.add(alterMetadataResourceLocationMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable updateServiceCallable() { + return updateServiceCallable; + } + + @Override + public OperationCallable + updateServiceOperationCallable() { + return updateServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable + listMetadataImportsCallable() { + return listMetadataImportsCallable; + } + + @Override + public UnaryCallable + listMetadataImportsPagedCallable() { + return listMetadataImportsPagedCallable; + } + + @Override + public UnaryCallable getMetadataImportCallable() { + return getMetadataImportCallable; + } + + @Override + public UnaryCallable createMetadataImportCallable() { + return createMetadataImportCallable; + } + + @Override + public OperationCallable + createMetadataImportOperationCallable() { + return createMetadataImportOperationCallable; + } + + @Override + public UnaryCallable updateMetadataImportCallable() { + return updateMetadataImportCallable; + } + + @Override + public OperationCallable + updateMetadataImportOperationCallable() { + return updateMetadataImportOperationCallable; + } + + @Override + public UnaryCallable exportMetadataCallable() { + return exportMetadataCallable; + } + + @Override + public OperationCallable + exportMetadataOperationCallable() { + return exportMetadataOperationCallable; + } + + @Override + public UnaryCallable restoreServiceCallable() { + return restoreServiceCallable; + } + + @Override + public OperationCallable + restoreServiceOperationCallable() { + return restoreServiceOperationCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable createBackupCallable() { + return createBackupCallable; + } + + @Override + public OperationCallable + createBackupOperationCallable() { + return createBackupOperationCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable removeIamPolicyCallable() { + return removeIamPolicyCallable; + } + + @Override + public UnaryCallable queryMetadataCallable() { + return queryMetadataCallable; + } + + @Override + public OperationCallable + queryMetadataOperationCallable() { + return queryMetadataOperationCallable; + } + + @Override + public UnaryCallable moveTableToDatabaseCallable() { + return moveTableToDatabaseCallable; + } + + @Override + public OperationCallable< + MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata> + moveTableToDatabaseOperationCallable() { + return moveTableToDatabaseOperationCallable; + } + + @Override + public UnaryCallable + alterMetadataResourceLocationCallable() { + return alterMetadataResourceLocationCallable; + } + + @Override + public OperationCallable< + AlterMetadataResourceLocationRequest, + AlterMetadataResourceLocationResponse, + OperationMetadata> + alterMetadataResourceLocationOperationCallable() { + return alterMetadataResourceLocationOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientHttpJsonTest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientHttpJsonTest.java new file mode 100644 index 000000000000..ded6322b2043 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientHttpJsonTest.java @@ -0,0 +1,2245 @@ +/* + * 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.v1beta; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.stub.HttpJsonDataprocMetastoreStub; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreClientHttpJsonTest { + private static MockHttpService mockService; + private static DataprocMetastoreClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataprocMetastoreStub.getMethodDescriptors(), + DataprocMetastoreSettings.getDefaultEndpoint()); + DataprocMetastoreSettings settings = + DataprocMetastoreSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataprocMetastoreSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listServicesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest2() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listServicesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Service service = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Service actualResponse = client.updateServiceAsync(service, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Service service = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServiceAsync(service, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7842/locations/location-7842/services/service-7842"; + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listMetadataImportsTest() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMetadataImportsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMetadataImportsTest2() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listMetadataImportsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMetadataImportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4503/locations/location-4503/services/service-4503/metadataImports/metadataImport-4503"; + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createMetadataImportExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + MetadataImport metadataImport = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MetadataImport actualResponse = + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateMetadataImportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MetadataImport metadataImport = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void exportMetadataTest() throws Exception { + MetadataExport expectedResponse = + MetadataExport.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + + MetadataExport actualResponse = client.exportMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportMetadataExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + client.exportMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest2() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest3() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreServiceTest4() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void restoreServiceExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String service = "projects/project-9852/locations/location-9852/services/service-9852"; + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4913/locations/location-4913/services/service-4913"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4613/locations/location-4613/services/service-4613/backups/backup-4613"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void removeIamPolicyTest() throws Exception { + RemoveIamPolicyResponse expectedResponse = + RemoveIamPolicyResponse.newBuilder().setSuccess(true).build(); + mockService.addResponse(expectedResponse); + + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setAsynchronous(true) + .build(); + + RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setAsynchronous(true) + .build(); + client.removeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryMetadataTest() throws Exception { + QueryMetadataResponse expectedResponse = + QueryMetadataResponse.newBuilder() + .setResultManifestUri("resultManifestUri233134176") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("queryMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + + QueryMetadataResponse actualResponse = client.queryMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void queryMetadataExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + client.queryMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void moveTableToDatabaseTest() throws Exception { + MoveTableToDatabaseResponse expectedResponse = MoveTableToDatabaseResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("moveTableToDatabaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + MoveTableToDatabaseRequest request = + MoveTableToDatabaseRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setTableName("tableName-1988717703") + .setDbName("dbName-1339126743") + .setDestinationDbName("destinationDbName-2077361705") + .build(); + + MoveTableToDatabaseResponse actualResponse = client.moveTableToDatabaseAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void moveTableToDatabaseExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + MoveTableToDatabaseRequest request = + MoveTableToDatabaseRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setTableName("tableName-1988717703") + .setDbName("dbName-1339126743") + .setDestinationDbName("destinationDbName-2077361705") + .build(); + client.moveTableToDatabaseAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void alterMetadataResourceLocationTest() throws Exception { + AlterMetadataResourceLocationResponse expectedResponse = + AlterMetadataResourceLocationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("alterMetadataResourceLocationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + + AlterMetadataResourceLocationResponse actualResponse = + client.alterMetadataResourceLocationAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void alterMetadataResourceLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + client.alterMetadataResourceLocationAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientTest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientTest.java new file mode 100644 index 000000000000..de63890d1b36 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientTest.java @@ -0,0 +1,2057 @@ +/* + * 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.v1beta; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListBackupsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListLocationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListMetadataImportsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreClient.ListServicesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreClientTest { + private static MockDataprocMetastore mockDataprocMetastore; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataprocMetastoreClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataprocMetastore = new MockDataprocMetastore(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockDataprocMetastore, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataprocMetastoreSettings settings = + DataprocMetastoreSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listServicesTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServicesTest2() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListServicesPagedResponse pagedListResponse = client.listServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + Service actualResponse = client.getService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(serviceId, actualRequest.getServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createServiceTest2() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + + Service actualResponse = client.createServiceAsync(parent, service, serviceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(serviceId, actualRequest.getServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + Service service = Service.newBuilder().build(); + String serviceId = "serviceId-194185552"; + client.createServiceAsync(parent, service, serviceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateServiceTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setNetwork("network1843485230") + .setEndpointUri("endpointUri-1135817833") + .setPort(3446913) + .setStateMessage("stateMessage1128185398") + .setArtifactGcsUri("artifactGcsUri-2145935545") + .setMetadataIntegration(MetadataIntegration.newBuilder().build()) + .setMaintenanceWindow(MaintenanceWindow.newBuilder().build()) + .setUid("uid115792") + .setMetadataManagementActivity(MetadataManagementActivity.newBuilder().build()) + .setEncryptionConfig(EncryptionConfig.newBuilder().build()) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .setTelemetryConfig(TelemetryConfig.newBuilder().build()) + .setScalingConfig(ScalingConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Service actualResponse = client.updateServiceAsync(service, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateServiceRequest actualRequest = ((UpdateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + Service service = Service.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServiceAsync(service, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteServiceAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.deleteServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listMetadataImportsTest() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMetadataImportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMetadataImportsTest2() throws Exception { + MetadataImport responsesElement = MetadataImport.newBuilder().build(); + ListMetadataImportsResponse expectedResponse = + ListMetadataImportsResponse.newBuilder() + .setNextPageToken("") + .addAllMetadataImports(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMetadataImportsPagedResponse pagedListResponse = client.listMetadataImports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMetadataImportsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMetadataImportsRequest actualRequest = ((ListMetadataImportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMetadataImportsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMetadataImports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + MetadataImportName name = + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]"); + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + MetadataImport actualResponse = client.getMetadataImport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMetadataImportRequest actualRequest = ((GetMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMetadataImportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getMetadataImport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMetadataImportRequest actualRequest = + ((CreateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createMetadataImportTest2() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + + MetadataImport actualResponse = + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMetadataImportRequest actualRequest = + ((CreateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(metadataImportId, actualRequest.getMetadataImportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMetadataImportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + String metadataImportId = "metadataImportId1824548847"; + client.createMetadataImportAsync(parent, metadataImport, metadataImportId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateMetadataImportTest() throws Exception { + MetadataImport expectedResponse = + MetadataImport.newBuilder() + .setName( + MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMetadataImportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MetadataImport actualResponse = + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateMetadataImportRequest actualRequest = + ((UpdateMetadataImportRequest) actualRequests.get(0)); + + Assert.assertEquals(metadataImport, actualRequest.getMetadataImport()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateMetadataImportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + MetadataImport metadataImport = MetadataImport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMetadataImportAsync(metadataImport, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportMetadataTest() throws Exception { + MetadataExport expectedResponse = + MetadataExport.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + + MetadataExport actualResponse = client.exportMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportMetadataRequest actualRequest = ((ExportMetadataRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getDestinationGcsFolder(), actualRequest.getDestinationGcsFolder()); + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertEquals(request.getDatabaseDumpType(), actualRequest.getDatabaseDumpType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportMetadataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ExportMetadataRequest request = + ExportMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setRequestId("requestId693933066") + .build(); + client.exportMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service.toString(), actualRequest.getService()); + Assert.assertEquals(backup.toString(), actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest2() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service.toString(), actualRequest.getService()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest3() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String service = "service1984153269"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(backup.toString(), actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String service = "service1984153269"; + BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restoreServiceTest4() throws Exception { + Restore expectedResponse = + Restore.newBuilder() + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setBackup(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setDetails("details1557721666") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String service = "service1984153269"; + String backup = "backup-1396673086"; + + Restore actualResponse = client.restoreServiceAsync(service, backup).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreServiceRequest actualRequest = ((RestoreServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreServiceExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String service = "service1984153269"; + String backup = "backup-1396673086"; + client.restoreServiceAsync(service, backup).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + mockDataprocMetastore.addResponse(expectedResponse); + + String name = "name3373707"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setServiceRevision(Service.newBuilder().build()) + .setDescription("description-1724546052") + .addAllRestoringServices(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String parent = "parent-995424086"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String parent = "parent-995424086"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + String name = "name3373707"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void removeIamPolicyTest() throws Exception { + RemoveIamPolicyResponse expectedResponse = + RemoveIamPolicyResponse.newBuilder().setSuccess(true).build(); + mockDataprocMetastore.addResponse(expectedResponse); + + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setAsynchronous(true) + .build(); + + RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveIamPolicyRequest actualRequest = ((RemoveIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getAsynchronous(), actualRequest.getAsynchronous()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setAsynchronous(true) + .build(); + client.removeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryMetadataTest() throws Exception { + QueryMetadataResponse expectedResponse = + QueryMetadataResponse.newBuilder() + .setResultManifestUri("resultManifestUri233134176") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("queryMetadataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + + QueryMetadataResponse actualResponse = client.queryMetadataAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + QueryMetadataRequest actualRequest = ((QueryMetadataRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void queryMetadataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + client.queryMetadataAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void moveTableToDatabaseTest() throws Exception { + MoveTableToDatabaseResponse expectedResponse = MoveTableToDatabaseResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("moveTableToDatabaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + MoveTableToDatabaseRequest request = + MoveTableToDatabaseRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setTableName("tableName-1988717703") + .setDbName("dbName-1339126743") + .setDestinationDbName("destinationDbName-2077361705") + .build(); + + MoveTableToDatabaseResponse actualResponse = client.moveTableToDatabaseAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + MoveTableToDatabaseRequest actualRequest = ((MoveTableToDatabaseRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getTableName(), actualRequest.getTableName()); + Assert.assertEquals(request.getDbName(), actualRequest.getDbName()); + Assert.assertEquals(request.getDestinationDbName(), actualRequest.getDestinationDbName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void moveTableToDatabaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + MoveTableToDatabaseRequest request = + MoveTableToDatabaseRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setTableName("tableName-1988717703") + .setDbName("dbName-1339126743") + .setDestinationDbName("destinationDbName-2077361705") + .build(); + client.moveTableToDatabaseAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void alterMetadataResourceLocationTest() throws Exception { + AlterMetadataResourceLocationResponse expectedResponse = + AlterMetadataResourceLocationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("alterMetadataResourceLocationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastore.addResponse(resultOperation); + + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + + AlterMetadataResourceLocationResponse actualResponse = + client.alterMetadataResourceLocationAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastore.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AlterMetadataResourceLocationRequest actualRequest = + ((AlterMetadataResourceLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getService(), actualRequest.getService()); + Assert.assertEquals(request.getResourceName(), actualRequest.getResourceName()); + Assert.assertEquals(request.getLocationUri(), actualRequest.getLocationUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void alterMetadataResourceLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastore.addException(exception); + + try { + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + client.alterMetadataResourceLocationAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientHttpJsonTest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientHttpJsonTest.java new file mode 100644 index 000000000000..e2e49988dec0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientHttpJsonTest.java @@ -0,0 +1,882 @@ +/* + * 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.v1beta; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.stub.HttpJsonDataprocMetastoreFederationStub; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationClientHttpJsonTest { + private static MockHttpService mockService; + private static DataprocMetastoreFederationClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataprocMetastoreFederationStub.getMethodDescriptors(), + DataprocMetastoreFederationSettings.getDefaultEndpoint()); + DataprocMetastoreFederationSettings settings = + DataprocMetastoreFederationSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataprocMetastoreFederationSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreFederationClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listFederationsTest() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFederationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFederationsTest2() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFederationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockService.addResponse(expectedResponse); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Federation federation = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Federation federation = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFederationAsync(federation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteFederationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFederationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteFederationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFederationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2678/locations/location-2678/federations/federation-2678"; + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientTest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientTest.java new file mode 100644 index 000000000000..7a15a2cdbc5e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationClientTest.java @@ -0,0 +1,807 @@ +/* + * 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.v1beta; + +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListFederationsPagedResponse; +import static com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataprocMetastoreFederationClientTest { + private static MockDataprocMetastoreFederation mockDataprocMetastoreFederation; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataprocMetastoreFederationClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataprocMetastoreFederation = new MockDataprocMetastoreFederation(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockDataprocMetastoreFederation, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataprocMetastoreFederationSettings settings = + DataprocMetastoreFederationSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataprocMetastoreFederationClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listFederationsTest() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFederationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFederationsTest2() throws Exception { + Federation responsesElement = Federation.newBuilder().build(); + ListFederationsResponse expectedResponse = + ListFederationsResponse.newBuilder() + .setNextPageToken("") + .addAllFederations(Arrays.asList(responsesElement)) + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFederationsPagedResponse pagedListResponse = client.listFederations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFederationsList().get(0), resources.get(0)); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFederationsRequest actualRequest = ((ListFederationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFederationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFederations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + mockDataprocMetastoreFederation.addResponse(expectedResponse); + + String name = "name3373707"; + + Federation actualResponse = client.getFederation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFederationRequest actualRequest = ((GetFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String name = "name3373707"; + client.getFederation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(federationId, actualRequest.getFederationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createFederationTest2() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + String parent = "parent-995424086"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + + Federation actualResponse = + client.createFederationAsync(parent, federation, federationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFederationRequest actualRequest = ((CreateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(federationId, actualRequest.getFederationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String parent = "parent-995424086"; + Federation federation = Federation.newBuilder().build(); + String federationId = "federationId-735921218"; + client.createFederationAsync(parent, federation, federationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateFederationTest() throws Exception { + Federation expectedResponse = + Federation.newBuilder() + .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setVersion("version351608024") + .putAllBackendMetastores(new HashMap()) + .setEndpointUri("endpointUri-1135817833") + .setStateMessage("stateMessage1128185398") + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + Federation federation = Federation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Federation actualResponse = client.updateFederationAsync(federation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFederationRequest actualRequest = ((UpdateFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(federation, actualRequest.getFederation()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + Federation federation = Federation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFederationAsync(federation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteFederationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFederationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]"); + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteFederationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteFederationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataprocMetastoreFederation.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteFederationAsync(name).get(); + + List actualRequests = mockDataprocMetastoreFederation.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFederationRequest actualRequest = ((DeleteFederationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFederationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataprocMetastoreFederation.addException(exception); + + try { + String name = "name3373707"; + client.deleteFederationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastore.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastore.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastore.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastore.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreFederation.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreFederation.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreFederationImpl.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreFederationImpl.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreFederationImpl.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreFederationImpl.java diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreImpl.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreImpl.java similarity index 100% rename from java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreImpl.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockDataprocMetastoreImpl.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockIAMPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockIAMPolicy.java new file mode 100644 index 000000000000..0367f900a97b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * 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.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockIAMPolicyImpl.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..0682bff26722 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * 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.v1beta; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockLocations.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockLocations.java new file mode 100644 index 000000000000..c26982214990 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockLocations.java @@ -0,0 +1,59 @@ +/* + * 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.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockLocationsImpl.java b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockLocationsImpl.java new file mode 100644 index 000000000000..dfbaf2ac2595 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * 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.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationGrpc.java b/owl-bot-staging/java-dataproc-metastore/v1beta/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationGrpc.java new file mode 100644 index 000000000000..c9c279476556 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreFederationGrpc.java @@ -0,0 +1,733 @@ +package com.google.cloud.metastore.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Configures and manages metastore federation services.
+ * Dataproc Metastore Federation Service allows federating a collection of
+ * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+ * Metastores. The Federation Service exposes a gRPC URL through which metadata
+ * from the backend metastores are served at query time.
+ * The Dataproc Metastore Federation API defines the following resource model:
+ * * The service works with a collection of Google Cloud projects.
+ * * Each project has a collection of available locations.
+ * * Each location has a collection of federations.
+ * * Dataproc Metastore Federations are resources with names of the
+ * form:
+ * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/metastore/v1beta/metastore_federation.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DataprocMetastoreFederationGrpc { + + private DataprocMetastoreFederationGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.metastore.v1beta.DataprocMetastoreFederation"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListFederationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFederations", + requestType = com.google.cloud.metastore.v1beta.ListFederationsRequest.class, + responseType = com.google.cloud.metastore.v1beta.ListFederationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListFederationsMethod() { + io.grpc.MethodDescriptor getListFederationsMethod; + if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getListFederationsMethod = DataprocMetastoreFederationGrpc.getListFederationsMethod) == null) { + DataprocMetastoreFederationGrpc.getListFederationsMethod = getListFederationsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFederations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ListFederationsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ListFederationsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("ListFederations")) + .build(); + } + } + } + return getListFederationsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFederation", + requestType = com.google.cloud.metastore.v1beta.GetFederationRequest.class, + responseType = com.google.cloud.metastore.v1beta.Federation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetFederationMethod() { + io.grpc.MethodDescriptor getGetFederationMethod; + if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getGetFederationMethod = DataprocMetastoreFederationGrpc.getGetFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getGetFederationMethod = getGetFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.GetFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.Federation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("GetFederation")) + .build(); + } + } + } + return getGetFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFederation", + requestType = com.google.cloud.metastore.v1beta.CreateFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateFederationMethod() { + io.grpc.MethodDescriptor getCreateFederationMethod; + if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getCreateFederationMethod = DataprocMetastoreFederationGrpc.getCreateFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getCreateFederationMethod = getCreateFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.CreateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("CreateFederation")) + .build(); + } + } + } + return getCreateFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFederation", + requestType = com.google.cloud.metastore.v1beta.UpdateFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateFederationMethod() { + io.grpc.MethodDescriptor getUpdateFederationMethod; + if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getUpdateFederationMethod = DataprocMetastoreFederationGrpc.getUpdateFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getUpdateFederationMethod = getUpdateFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.UpdateFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("UpdateFederation")) + .build(); + } + } + } + return getUpdateFederationMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteFederationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFederation", + requestType = com.google.cloud.metastore.v1beta.DeleteFederationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteFederationMethod() { + io.grpc.MethodDescriptor getDeleteFederationMethod; + if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + if ((getDeleteFederationMethod = DataprocMetastoreFederationGrpc.getDeleteFederationMethod) == null) { + DataprocMetastoreFederationGrpc.getDeleteFederationMethod = getDeleteFederationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFederation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.DeleteFederationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreFederationMethodDescriptorSupplier("DeleteFederation")) + .build(); + } + } + } + return getDeleteFederationMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DataprocMetastoreFederationStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataprocMetastoreFederationBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationBlockingStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DataprocMetastoreFederationFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFederationFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationFutureStub(channel, callOptions); + } + }; + return DataprocMetastoreFederationFutureStub.newStub(factory, channel); + } + + /** + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + default void listFederations(com.google.cloud.metastore.v1beta.ListFederationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFederationsMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + default void getFederation(com.google.cloud.metastore.v1beta.GetFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFederationMethod(), responseObserver); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + default void createFederation(com.google.cloud.metastore.v1beta.CreateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFederationMethod(), responseObserver); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + default void updateFederation(com.google.cloud.metastore.v1beta.UpdateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFederationMethod(), responseObserver); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + default void deleteFederation(com.google.cloud.metastore.v1beta.DeleteFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFederationMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static abstract class DataprocMetastoreFederationImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return DataprocMetastoreFederationGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationStub + extends io.grpc.stub.AbstractAsyncStub { + private DataprocMetastoreFederationStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public void listFederations(com.google.cloud.metastore.v1beta.ListFederationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFederationsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public void getFederation(com.google.cloud.metastore.v1beta.GetFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public void createFederation(com.google.cloud.metastore.v1beta.CreateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public void updateFederation(com.google.cloud.metastore.v1beta.UpdateFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public void deleteFederation(com.google.cloud.metastore.v1beta.DeleteFederationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataprocMetastoreFederationBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public com.google.cloud.metastore.v1beta.ListFederationsResponse listFederations(com.google.cloud.metastore.v1beta.ListFederationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFederationsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public com.google.cloud.metastore.v1beta.Federation getFederation(com.google.cloud.metastore.v1beta.GetFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public com.google.longrunning.Operation createFederation(com.google.cloud.metastore.v1beta.CreateFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public com.google.longrunning.Operation updateFederation(com.google.cloud.metastore.v1beta.UpdateFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFederationMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public com.google.longrunning.Operation deleteFederation(com.google.cloud.metastore.v1beta.DeleteFederationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFederationMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastoreFederation. + *
+   * Configures and manages metastore federation services.
+   * Dataproc Metastore Federation Service allows federating a collection of
+   * backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
+   * Metastores. The Federation Service exposes a gRPC URL through which metadata
+   * from the backend metastores are served at query time.
+   * The Dataproc Metastore Federation API defines the following resource model:
+   * * The service works with a collection of Google Cloud projects.
+   * * Each project has a collection of available locations.
+   * * Each location has a collection of federations.
+   * * Dataproc Metastore Federations are resources with names of the
+   * form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFederationFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataprocMetastoreFederationFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFederationFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFederationFutureStub(channel, callOptions); + } + + /** + *
+     * Lists federations in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listFederations( + com.google.cloud.metastore.v1beta.ListFederationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFederationsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a single federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getFederation( + com.google.cloud.metastore.v1beta.GetFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a metastore federation in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createFederation( + com.google.cloud.metastore.v1beta.CreateFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the fields of a federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateFederation( + com.google.cloud.metastore.v1beta.UpdateFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFederationMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single federation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteFederation( + com.google.cloud.metastore.v1beta.DeleteFederationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFederationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_FEDERATIONS = 0; + private static final int METHODID_GET_FEDERATION = 1; + private static final int METHODID_CREATE_FEDERATION = 2; + private static final int METHODID_UPDATE_FEDERATION = 3; + private static final int METHODID_DELETE_FEDERATION = 4; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_FEDERATIONS: + serviceImpl.listFederations((com.google.cloud.metastore.v1beta.ListFederationsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FEDERATION: + serviceImpl.getFederation((com.google.cloud.metastore.v1beta.GetFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_FEDERATION: + serviceImpl.createFederation((com.google.cloud.metastore.v1beta.CreateFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_FEDERATION: + serviceImpl.updateFederation((com.google.cloud.metastore.v1beta.UpdateFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FEDERATION: + serviceImpl.deleteFederation((com.google.cloud.metastore.v1beta.DeleteFederationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListFederationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.ListFederationsRequest, + com.google.cloud.metastore.v1beta.ListFederationsResponse>( + service, METHODID_LIST_FEDERATIONS))) + .addMethod( + getGetFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.GetFederationRequest, + com.google.cloud.metastore.v1beta.Federation>( + service, METHODID_GET_FEDERATION))) + .addMethod( + getCreateFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.CreateFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_FEDERATION))) + .addMethod( + getUpdateFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.UpdateFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_FEDERATION))) + .addMethod( + getDeleteFederationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.DeleteFederationRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_FEDERATION))) + .build(); + } + + private static abstract class DataprocMetastoreFederationBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataprocMetastoreFederationBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataprocMetastoreFederation"); + } + } + + private static final class DataprocMetastoreFederationFileDescriptorSupplier + extends DataprocMetastoreFederationBaseDescriptorSupplier { + DataprocMetastoreFederationFileDescriptorSupplier() {} + } + + private static final class DataprocMetastoreFederationMethodDescriptorSupplier + extends DataprocMetastoreFederationBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataprocMetastoreFederationMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataprocMetastoreFederationGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataprocMetastoreFederationFileDescriptorSupplier()) + .addMethod(getListFederationsMethod()) + .addMethod(getGetFederationMethod()) + .addMethod(getCreateFederationMethod()) + .addMethod(getUpdateFederationMethod()) + .addMethod(getDeleteFederationMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreGrpc.java b/owl-bot-staging/java-dataproc-metastore/v1beta/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreGrpc.java new file mode 100644 index 000000000000..fc5a7b38c8a4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/grpc-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreGrpc.java @@ -0,0 +1,1965 @@ +package com.google.cloud.metastore.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * 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:
+ * * The service works with a collection of Google Cloud projects, named:
+ * `/projects/*`
+ * * Each project has a collection of available locations, named: `/locations/*`
+ *   (a location must refer to a Google Cloud `region`)
+ * * Each location has a collection of services, named: `/services/*`
+ * * Dataproc Metastore services are resources with names of the form:
+ *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/metastore/v1beta/metastore.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DataprocMetastoreGrpc { + + private DataprocMetastoreGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.metastore.v1beta.DataprocMetastore"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListServicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListServices", + requestType = com.google.cloud.metastore.v1beta.ListServicesRequest.class, + responseType = com.google.cloud.metastore.v1beta.ListServicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListServicesMethod() { + io.grpc.MethodDescriptor getListServicesMethod; + if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListServicesMethod = DataprocMetastoreGrpc.getListServicesMethod) == null) { + DataprocMetastoreGrpc.getListServicesMethod = getListServicesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ListServicesResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListServices")) + .build(); + } + } + } + return getListServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetService", + requestType = com.google.cloud.metastore.v1beta.GetServiceRequest.class, + responseType = com.google.cloud.metastore.v1beta.Service.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetServiceMethod() { + io.grpc.MethodDescriptor getGetServiceMethod; + if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetServiceMethod = DataprocMetastoreGrpc.getGetServiceMethod) == null) { + DataprocMetastoreGrpc.getGetServiceMethod = getGetServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.Service.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetService")) + .build(); + } + } + } + return getGetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateService", + requestType = com.google.cloud.metastore.v1beta.CreateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateServiceMethod() { + io.grpc.MethodDescriptor getCreateServiceMethod; + if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateServiceMethod = DataprocMetastoreGrpc.getCreateServiceMethod) == null) { + DataprocMetastoreGrpc.getCreateServiceMethod = getCreateServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.CreateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateService")) + .build(); + } + } + } + return getCreateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateService", + requestType = com.google.cloud.metastore.v1beta.UpdateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateServiceMethod() { + io.grpc.MethodDescriptor getUpdateServiceMethod; + if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getUpdateServiceMethod = DataprocMetastoreGrpc.getUpdateServiceMethod) == null) { + DataprocMetastoreGrpc.getUpdateServiceMethod = getUpdateServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.UpdateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("UpdateService")) + .build(); + } + } + } + return getUpdateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteService", + requestType = com.google.cloud.metastore.v1beta.DeleteServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteServiceMethod() { + io.grpc.MethodDescriptor getDeleteServiceMethod; + if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getDeleteServiceMethod = DataprocMetastoreGrpc.getDeleteServiceMethod) == null) { + DataprocMetastoreGrpc.getDeleteServiceMethod = getDeleteServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("DeleteService")) + .build(); + } + } + } + return getDeleteServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListMetadataImportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMetadataImports", + requestType = com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.class, + responseType = com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListMetadataImportsMethod() { + io.grpc.MethodDescriptor getListMetadataImportsMethod; + if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListMetadataImportsMethod = DataprocMetastoreGrpc.getListMetadataImportsMethod) == null) { + DataprocMetastoreGrpc.getListMetadataImportsMethod = getListMetadataImportsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMetadataImports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListMetadataImports")) + .build(); + } + } + } + return getListMetadataImportsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMetadataImport", + requestType = com.google.cloud.metastore.v1beta.GetMetadataImportRequest.class, + responseType = com.google.cloud.metastore.v1beta.MetadataImport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetMetadataImportMethod() { + io.grpc.MethodDescriptor getGetMetadataImportMethod; + if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetMetadataImportMethod = DataprocMetastoreGrpc.getGetMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getGetMetadataImportMethod = getGetMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.GetMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetMetadataImport")) + .build(); + } + } + } + return getGetMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMetadataImport", + requestType = com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateMetadataImportMethod() { + io.grpc.MethodDescriptor getCreateMetadataImportMethod; + if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateMetadataImportMethod = DataprocMetastoreGrpc.getCreateMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getCreateMetadataImportMethod = getCreateMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateMetadataImport")) + .build(); + } + } + } + return getCreateMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateMetadataImportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMetadataImport", + requestType = com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateMetadataImportMethod() { + io.grpc.MethodDescriptor getUpdateMetadataImportMethod; + if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getUpdateMetadataImportMethod = DataprocMetastoreGrpc.getUpdateMetadataImportMethod) == null) { + DataprocMetastoreGrpc.getUpdateMetadataImportMethod = getUpdateMetadataImportMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateMetadataImport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("UpdateMetadataImport")) + .build(); + } + } + } + return getUpdateMetadataImportMethod; + } + + private static volatile io.grpc.MethodDescriptor getExportMetadataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportMetadata", + requestType = com.google.cloud.metastore.v1beta.ExportMetadataRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExportMetadataMethod() { + io.grpc.MethodDescriptor getExportMetadataMethod; + if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getExportMetadataMethod = DataprocMetastoreGrpc.getExportMetadataMethod) == null) { + DataprocMetastoreGrpc.getExportMetadataMethod = getExportMetadataMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportMetadata")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ExportMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ExportMetadata")) + .build(); + } + } + } + return getExportMetadataMethod; + } + + private static volatile io.grpc.MethodDescriptor getRestoreServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestoreService", + requestType = com.google.cloud.metastore.v1beta.RestoreServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRestoreServiceMethod() { + io.grpc.MethodDescriptor getRestoreServiceMethod; + if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getRestoreServiceMethod = DataprocMetastoreGrpc.getRestoreServiceMethod) == null) { + DataprocMetastoreGrpc.getRestoreServiceMethod = getRestoreServiceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.RestoreServiceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("RestoreService")) + .build(); + } + } + } + return getRestoreServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListBackupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackups", + requestType = com.google.cloud.metastore.v1beta.ListBackupsRequest.class, + responseType = com.google.cloud.metastore.v1beta.ListBackupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListBackupsMethod() { + io.grpc.MethodDescriptor getListBackupsMethod; + if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getListBackupsMethod = DataprocMetastoreGrpc.getListBackupsMethod) == null) { + DataprocMetastoreGrpc.getListBackupsMethod = getListBackupsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.ListBackupsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("ListBackups")) + .build(); + } + } + } + return getListBackupsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackup", + requestType = com.google.cloud.metastore.v1beta.GetBackupRequest.class, + responseType = com.google.cloud.metastore.v1beta.Backup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBackupMethod() { + io.grpc.MethodDescriptor getGetBackupMethod; + if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getGetBackupMethod = DataprocMetastoreGrpc.getGetBackupMethod) == null) { + DataprocMetastoreGrpc.getGetBackupMethod = getGetBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.Backup.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("GetBackup")) + .build(); + } + } + } + return getGetBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackup", + requestType = com.google.cloud.metastore.v1beta.CreateBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateBackupMethod() { + io.grpc.MethodDescriptor getCreateBackupMethod; + if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getCreateBackupMethod = DataprocMetastoreGrpc.getCreateBackupMethod) == null) { + DataprocMetastoreGrpc.getCreateBackupMethod = getCreateBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.CreateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("CreateBackup")) + .build(); + } + } + } + return getCreateBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", + requestType = com.google.cloud.metastore.v1beta.DeleteBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteBackupMethod() { + io.grpc.MethodDescriptor getDeleteBackupMethod; + if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getDeleteBackupMethod = DataprocMetastoreGrpc.getDeleteBackupMethod) == null) { + DataprocMetastoreGrpc.getDeleteBackupMethod = getDeleteBackupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("DeleteBackup")) + .build(); + } + } + } + return getDeleteBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveIamPolicy", + requestType = com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.class, + responseType = com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveIamPolicyMethod() { + io.grpc.MethodDescriptor getRemoveIamPolicyMethod; + if ((getRemoveIamPolicyMethod = DataprocMetastoreGrpc.getRemoveIamPolicyMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getRemoveIamPolicyMethod = DataprocMetastoreGrpc.getRemoveIamPolicyMethod) == null) { + DataprocMetastoreGrpc.getRemoveIamPolicyMethod = getRemoveIamPolicyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("RemoveIamPolicy")) + .build(); + } + } + } + return getRemoveIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor getQueryMetadataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "QueryMetadata", + requestType = com.google.cloud.metastore.v1beta.QueryMetadataRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getQueryMetadataMethod() { + io.grpc.MethodDescriptor getQueryMetadataMethod; + if ((getQueryMetadataMethod = DataprocMetastoreGrpc.getQueryMetadataMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getQueryMetadataMethod = DataprocMetastoreGrpc.getQueryMetadataMethod) == null) { + DataprocMetastoreGrpc.getQueryMetadataMethod = getQueryMetadataMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryMetadata")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.QueryMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("QueryMetadata")) + .build(); + } + } + } + return getQueryMetadataMethod; + } + + private static volatile io.grpc.MethodDescriptor getMoveTableToDatabaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "MoveTableToDatabase", + requestType = com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getMoveTableToDatabaseMethod() { + io.grpc.MethodDescriptor getMoveTableToDatabaseMethod; + if ((getMoveTableToDatabaseMethod = DataprocMetastoreGrpc.getMoveTableToDatabaseMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getMoveTableToDatabaseMethod = DataprocMetastoreGrpc.getMoveTableToDatabaseMethod) == null) { + DataprocMetastoreGrpc.getMoveTableToDatabaseMethod = getMoveTableToDatabaseMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MoveTableToDatabase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("MoveTableToDatabase")) + .build(); + } + } + } + return getMoveTableToDatabaseMethod; + } + + private static volatile io.grpc.MethodDescriptor getAlterMetadataResourceLocationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AlterMetadataResourceLocation", + requestType = com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAlterMetadataResourceLocationMethod() { + io.grpc.MethodDescriptor getAlterMetadataResourceLocationMethod; + if ((getAlterMetadataResourceLocationMethod = DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod) == null) { + synchronized (DataprocMetastoreGrpc.class) { + if ((getAlterMetadataResourceLocationMethod = DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod) == null) { + DataprocMetastoreGrpc.getAlterMetadataResourceLocationMethod = getAlterMetadataResourceLocationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AlterMetadataResourceLocation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataprocMetastoreMethodDescriptorSupplier("AlterMetadataResourceLocation")) + .build(); + } + } + } + return getAlterMetadataResourceLocationMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DataprocMetastoreStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreStub(channel, callOptions); + } + }; + return DataprocMetastoreStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataprocMetastoreBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreBlockingStub(channel, callOptions); + } + }; + return DataprocMetastoreBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DataprocMetastoreFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataprocMetastoreFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFutureStub(channel, callOptions); + } + }; + return DataprocMetastoreFutureStub.newStub(factory, channel); + } + + /** + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + default void listServices(com.google.cloud.metastore.v1beta.ListServicesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + default void getService(com.google.cloud.metastore.v1beta.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + default void createService(com.google.cloud.metastore.v1beta.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateServiceMethod(), responseObserver); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + default void updateService(com.google.cloud.metastore.v1beta.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateServiceMethod(), responseObserver); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + default void deleteService(com.google.cloud.metastore.v1beta.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteServiceMethod(), responseObserver); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + default void listMetadataImports(com.google.cloud.metastore.v1beta.ListMetadataImportsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMetadataImportsMethod(), responseObserver); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + default void getMetadataImport(com.google.cloud.metastore.v1beta.GetMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + default void createMetadataImport(com.google.cloud.metastore.v1beta.CreateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + default void updateMetadataImport(com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateMetadataImportMethod(), responseObserver); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + default void exportMetadata(com.google.cloud.metastore.v1beta.ExportMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportMetadataMethod(), responseObserver); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + default void restoreService(com.google.cloud.metastore.v1beta.RestoreServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRestoreServiceMethod(), responseObserver); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + default void listBackups(com.google.cloud.metastore.v1beta.ListBackupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListBackupsMethod(), responseObserver); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + default void getBackup(com.google.cloud.metastore.v1beta.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + default void createBackup(com.google.cloud.metastore.v1beta.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateBackupMethod(), responseObserver); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + default void deleteBackup(com.google.cloud.metastore.v1beta.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteBackupMethod(), responseObserver); + } + + /** + *
+     * Removes the attached IAM policies for a resource
+     * 
+ */ + default void removeIamPolicy(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveIamPolicyMethod(), responseObserver); + } + + /** + *
+     * Query DPMS metadata.
+     * 
+ */ + default void queryMetadata(com.google.cloud.metastore.v1beta.QueryMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryMetadataMethod(), responseObserver); + } + + /** + *
+     * Move a table to another database.
+     * 
+ */ + default void moveTableToDatabase(com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMoveTableToDatabaseMethod(), responseObserver); + } + + /** + *
+     * Alter metadata resource location. The metadata resource can be a database,
+     * table, or partition. This functionality only updates the parent directory
+     * for the respective metadata resource and does not transfer any existing
+     * data to the new location.
+     * 
+ */ + default void alterMetadataResourceLocation(com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAlterMetadataResourceLocationMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static abstract class DataprocMetastoreImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return DataprocMetastoreGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreStub + extends io.grpc.stub.AbstractAsyncStub { + private DataprocMetastoreStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public void listServices(com.google.cloud.metastore.v1beta.ListServicesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public void getService(com.google.cloud.metastore.v1beta.GetServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public void createService(com.google.cloud.metastore.v1beta.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public void updateService(com.google.cloud.metastore.v1beta.UpdateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public void deleteService(com.google.cloud.metastore.v1beta.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public void listMetadataImports(com.google.cloud.metastore.v1beta.ListMetadataImportsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public void getMetadataImport(com.google.cloud.metastore.v1beta.GetMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public void createMetadataImport(com.google.cloud.metastore.v1beta.CreateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public void updateMetadataImport(com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public void exportMetadata(com.google.cloud.metastore.v1beta.ExportMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public void restoreService(com.google.cloud.metastore.v1beta.RestoreServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public void listBackups(com.google.cloud.metastore.v1beta.ListBackupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public void getBackup(com.google.cloud.metastore.v1beta.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public void createBackup(com.google.cloud.metastore.v1beta.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public void deleteBackup(com.google.cloud.metastore.v1beta.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes the attached IAM policies for a resource
+     * 
+ */ + public void removeIamPolicy(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Query DPMS metadata.
+     * 
+ */ + public void queryMetadata(com.google.cloud.metastore.v1beta.QueryMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getQueryMetadataMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Move a table to another database.
+     * 
+ */ + public void moveTableToDatabase(com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getMoveTableToDatabaseMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Alter metadata resource location. The metadata resource can be a database,
+     * table, or partition. This functionality only updates the parent directory
+     * for the respective metadata resource and does not transfer any existing
+     * data to the new location.
+     * 
+ */ + public void alterMetadataResourceLocation(com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataprocMetastoreBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public com.google.cloud.metastore.v1beta.ListServicesResponse listServices(com.google.cloud.metastore.v1beta.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public com.google.cloud.metastore.v1beta.Service getService(com.google.cloud.metastore.v1beta.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public com.google.longrunning.Operation createService(com.google.cloud.metastore.v1beta.CreateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public com.google.longrunning.Operation updateService(com.google.cloud.metastore.v1beta.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public com.google.longrunning.Operation deleteService(com.google.cloud.metastore.v1beta.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse listMetadataImports(com.google.cloud.metastore.v1beta.ListMetadataImportsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMetadataImportsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport(com.google.cloud.metastore.v1beta.GetMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createMetadataImport(com.google.cloud.metastore.v1beta.CreateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public com.google.longrunning.Operation updateMetadataImport(com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMetadataImportMethod(), getCallOptions(), request); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public com.google.longrunning.Operation exportMetadata(com.google.cloud.metastore.v1beta.ExportMetadataRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportMetadataMethod(), getCallOptions(), request); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public com.google.longrunning.Operation restoreService(com.google.cloud.metastore.v1beta.RestoreServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestoreServiceMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public com.google.cloud.metastore.v1beta.ListBackupsResponse listBackups(com.google.cloud.metastore.v1beta.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public com.google.cloud.metastore.v1beta.Backup getBackup(com.google.cloud.metastore.v1beta.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createBackup(com.google.cloud.metastore.v1beta.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackup(com.google.cloud.metastore.v1beta.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes the attached IAM policies for a resource
+     * 
+ */ + public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse removeIamPolicy(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveIamPolicyMethod(), getCallOptions(), request); + } + + /** + *
+     * Query DPMS metadata.
+     * 
+ */ + public com.google.longrunning.Operation queryMetadata(com.google.cloud.metastore.v1beta.QueryMetadataRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getQueryMetadataMethod(), getCallOptions(), request); + } + + /** + *
+     * Move a table to another database.
+     * 
+ */ + public com.google.longrunning.Operation moveTableToDatabase(com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getMoveTableToDatabaseMethod(), getCallOptions(), request); + } + + /** + *
+     * Alter metadata resource location. The metadata resource can be a database,
+     * table, or partition. This functionality only updates the parent directory
+     * for the respective metadata resource and does not transfer any existing
+     * data to the new location.
+     * 
+ */ + public com.google.longrunning.Operation alterMetadataResourceLocation(com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAlterMetadataResourceLocationMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataprocMetastore. + *
+   * 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:
+   * * The service works with a collection of Google Cloud projects, named:
+   * `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   *   (a location must refer to a Google Cloud `region`)
+   * * Each location has a collection of services, named: `/services/*`
+   * * Dataproc Metastore services are resources with names of the form:
+   *   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ */ + public static final class DataprocMetastoreFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataprocMetastoreFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataprocMetastoreFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataprocMetastoreFutureStub(channel, callOptions); + } + + /** + *
+     * Lists services in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listServices( + com.google.cloud.metastore.v1beta.ListServicesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the details of a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getService( + com.google.cloud.metastore.v1beta.GetServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a metastore service in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createService( + com.google.cloud.metastore.v1beta.CreateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the parameters of a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateService( + com.google.cloud.metastore.v1beta.UpdateServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteService( + com.google.cloud.metastore.v1beta.DeleteServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists imports in a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listMetadataImports( + com.google.cloud.metastore.v1beta.ListMetadataImportsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMetadataImportsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details of a single import.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getMetadataImport( + com.google.cloud.metastore.v1beta.GetMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new MetadataImport in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createMetadataImport( + com.google.cloud.metastore.v1beta.CreateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates a single import.
+     * Only the description field of MetadataImport is supported to be updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateMetadataImport( + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMetadataImportMethod(), getCallOptions()), request); + } + + /** + *
+     * Exports metadata from a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture exportMetadata( + com.google.cloud.metastore.v1beta.ExportMetadataRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportMetadataMethod(), getCallOptions()), request); + } + + /** + *
+     * Restores a service from a backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture restoreService( + com.google.cloud.metastore.v1beta.RestoreServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestoreServiceMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists backups in a service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listBackups( + com.google.cloud.metastore.v1beta.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details of a single backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBackup( + com.google.cloud.metastore.v1beta.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new backup in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createBackup( + com.google.cloud.metastore.v1beta.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a single backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteBackup( + com.google.cloud.metastore.v1beta.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes the attached IAM policies for a resource
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture removeIamPolicy( + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), request); + } + + /** + *
+     * Query DPMS metadata.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture queryMetadata( + com.google.cloud.metastore.v1beta.QueryMetadataRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getQueryMetadataMethod(), getCallOptions()), request); + } + + /** + *
+     * Move a table to another database.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture moveTableToDatabase( + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getMoveTableToDatabaseMethod(), getCallOptions()), request); + } + + /** + *
+     * Alter metadata resource location. The metadata resource can be a database,
+     * table, or partition. This functionality only updates the parent directory
+     * for the respective metadata resource and does not transfer any existing
+     * data to the new location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture alterMetadataResourceLocation( + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_SERVICES = 0; + private static final int METHODID_GET_SERVICE = 1; + private static final int METHODID_CREATE_SERVICE = 2; + private static final int METHODID_UPDATE_SERVICE = 3; + private static final int METHODID_DELETE_SERVICE = 4; + private static final int METHODID_LIST_METADATA_IMPORTS = 5; + private static final int METHODID_GET_METADATA_IMPORT = 6; + private static final int METHODID_CREATE_METADATA_IMPORT = 7; + private static final int METHODID_UPDATE_METADATA_IMPORT = 8; + private static final int METHODID_EXPORT_METADATA = 9; + private static final int METHODID_RESTORE_SERVICE = 10; + private static final int METHODID_LIST_BACKUPS = 11; + private static final int METHODID_GET_BACKUP = 12; + private static final int METHODID_CREATE_BACKUP = 13; + private static final int METHODID_DELETE_BACKUP = 14; + private static final int METHODID_REMOVE_IAM_POLICY = 15; + private static final int METHODID_QUERY_METADATA = 16; + private static final int METHODID_MOVE_TABLE_TO_DATABASE = 17; + private static final int METHODID_ALTER_METADATA_RESOURCE_LOCATION = 18; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_SERVICES: + serviceImpl.listServices((com.google.cloud.metastore.v1beta.ListServicesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SERVICE: + serviceImpl.getService((com.google.cloud.metastore.v1beta.GetServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SERVICE: + serviceImpl.createService((com.google.cloud.metastore.v1beta.CreateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SERVICE: + serviceImpl.updateService((com.google.cloud.metastore.v1beta.UpdateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SERVICE: + serviceImpl.deleteService((com.google.cloud.metastore.v1beta.DeleteServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_METADATA_IMPORTS: + serviceImpl.listMetadataImports((com.google.cloud.metastore.v1beta.ListMetadataImportsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_METADATA_IMPORT: + serviceImpl.getMetadataImport((com.google.cloud.metastore.v1beta.GetMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_METADATA_IMPORT: + serviceImpl.createMetadataImport((com.google.cloud.metastore.v1beta.CreateMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_METADATA_IMPORT: + serviceImpl.updateMetadataImport((com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_METADATA: + serviceImpl.exportMetadata((com.google.cloud.metastore.v1beta.ExportMetadataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTORE_SERVICE: + serviceImpl.restoreService((com.google.cloud.metastore.v1beta.RestoreServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_BACKUPS: + serviceImpl.listBackups((com.google.cloud.metastore.v1beta.ListBackupsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP: + serviceImpl.getBackup((com.google.cloud.metastore.v1beta.GetBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BACKUP: + serviceImpl.createBackup((com.google.cloud.metastore.v1beta.CreateBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_BACKUP: + serviceImpl.deleteBackup((com.google.cloud.metastore.v1beta.DeleteBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_IAM_POLICY: + serviceImpl.removeIamPolicy((com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_QUERY_METADATA: + serviceImpl.queryMetadata((com.google.cloud.metastore.v1beta.QueryMetadataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MOVE_TABLE_TO_DATABASE: + serviceImpl.moveTableToDatabase((com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ALTER_METADATA_RESOURCE_LOCATION: + serviceImpl.alterMetadataResourceLocation((com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListServicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.ListServicesRequest, + com.google.cloud.metastore.v1beta.ListServicesResponse>( + service, METHODID_LIST_SERVICES))) + .addMethod( + getGetServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.GetServiceRequest, + com.google.cloud.metastore.v1beta.Service>( + service, METHODID_GET_SERVICE))) + .addMethod( + getCreateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.CreateServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_SERVICE))) + .addMethod( + getUpdateServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.UpdateServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_SERVICE))) + .addMethod( + getDeleteServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.DeleteServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_SERVICE))) + .addMethod( + getListMetadataImportsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.ListMetadataImportsRequest, + com.google.cloud.metastore.v1beta.ListMetadataImportsResponse>( + service, METHODID_LIST_METADATA_IMPORTS))) + .addMethod( + getGetMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.GetMetadataImportRequest, + com.google.cloud.metastore.v1beta.MetadataImport>( + service, METHODID_GET_METADATA_IMPORT))) + .addMethod( + getCreateMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.CreateMetadataImportRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_METADATA_IMPORT))) + .addMethod( + getUpdateMetadataImportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_METADATA_IMPORT))) + .addMethod( + getExportMetadataMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.ExportMetadataRequest, + com.google.longrunning.Operation>( + service, METHODID_EXPORT_METADATA))) + .addMethod( + getRestoreServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.RestoreServiceRequest, + com.google.longrunning.Operation>( + service, METHODID_RESTORE_SERVICE))) + .addMethod( + getListBackupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.ListBackupsRequest, + com.google.cloud.metastore.v1beta.ListBackupsResponse>( + service, METHODID_LIST_BACKUPS))) + .addMethod( + getGetBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.GetBackupRequest, + com.google.cloud.metastore.v1beta.Backup>( + service, METHODID_GET_BACKUP))) + .addMethod( + getCreateBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.CreateBackupRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_BACKUP))) + .addMethod( + getDeleteBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.DeleteBackupRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_BACKUP))) + .addMethod( + getRemoveIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest, + com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse>( + service, METHODID_REMOVE_IAM_POLICY))) + .addMethod( + getQueryMetadataMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.QueryMetadataRequest, + com.google.longrunning.Operation>( + service, METHODID_QUERY_METADATA))) + .addMethod( + getMoveTableToDatabaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest, + com.google.longrunning.Operation>( + service, METHODID_MOVE_TABLE_TO_DATABASE))) + .addMethod( + getAlterMetadataResourceLocationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest, + com.google.longrunning.Operation>( + service, METHODID_ALTER_METADATA_RESOURCE_LOCATION))) + .build(); + } + + private static abstract class DataprocMetastoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataprocMetastoreBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataprocMetastore"); + } + } + + private static final class DataprocMetastoreFileDescriptorSupplier + extends DataprocMetastoreBaseDescriptorSupplier { + DataprocMetastoreFileDescriptorSupplier() {} + } + + private static final class DataprocMetastoreMethodDescriptorSupplier + extends DataprocMetastoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataprocMetastoreMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataprocMetastoreGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataprocMetastoreFileDescriptorSupplier()) + .addMethod(getListServicesMethod()) + .addMethod(getGetServiceMethod()) + .addMethod(getCreateServiceMethod()) + .addMethod(getUpdateServiceMethod()) + .addMethod(getDeleteServiceMethod()) + .addMethod(getListMetadataImportsMethod()) + .addMethod(getGetMetadataImportMethod()) + .addMethod(getCreateMetadataImportMethod()) + .addMethod(getUpdateMetadataImportMethod()) + .addMethod(getExportMetadataMethod()) + .addMethod(getRestoreServiceMethod()) + .addMethod(getListBackupsMethod()) + .addMethod(getGetBackupMethod()) + .addMethod(getCreateBackupMethod()) + .addMethod(getDeleteBackupMethod()) + .addMethod(getRemoveIamPolicyMethod()) + .addMethod(getQueryMetadataMethod()) + .addMethod(getMoveTableToDatabaseMethod()) + .addMethod(getAlterMetadataResourceLocationMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequest.java new file mode 100644 index 000000000000..4f1757e3360e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequest.java @@ -0,0 +1,959 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest} + */ +public final class AlterMetadataResourceLocationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) + AlterMetadataResourceLocationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AlterMetadataResourceLocationRequest.newBuilder() to construct. + private AlterMetadataResourceLocationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AlterMetadataResourceLocationRequest() { + service_ = ""; + resourceName_ = ""; + locationUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AlterMetadataResourceLocationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.class, com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceName_ = ""; + /** + *
+   * Required. The relative metadata resource name in the following format.
+   * `databases/{database_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+   * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The resourceName. + */ + @java.lang.Override + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } + } + /** + *
+   * Required. The relative metadata resource name in the following format.
+   * `databases/{database_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+   * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_URI_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object locationUri_ = ""; + /** + *
+   * Required. The new location URI for the metadata resource.
+   * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The locationUri. + */ + @java.lang.Override + public java.lang.String getLocationUri() { + java.lang.Object ref = locationUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationUri_ = s; + return s; + } + } + /** + *
+   * Required. The new location URI for the metadata resource.
+   * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for locationUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationUriBytes() { + java.lang.Object ref = locationUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, locationUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, locationUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest other = (com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getResourceName() + .equals(other.getResourceName())) return false; + if (!getLocationUri() + .equals(other.getLocationUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getResourceName().hashCode(); + hash = (37 * hash) + LOCATION_URI_FIELD_NUMBER; + hash = (53 * hash) + getLocationUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.class, com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + resourceName_ = ""; + locationUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest build() { + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest buildPartial() { + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest result = new com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceName_ = resourceName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.locationUri_ = locationUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest other) { + if (other == com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceName().isEmpty()) { + resourceName_ = other.resourceName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLocationUri().isEmpty()) { + locationUri_ = other.locationUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + resourceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + locationUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object resourceName_ = ""; + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The resourceName. + */ + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resourceName. + */ + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearResourceName() { + resourceName_ = getDefaultInstance().getResourceName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The relative metadata resource name in the following format.
+     * `databases/{database_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}`
+     * or
+     * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+     * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object locationUri_ = ""; + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The locationUri. + */ + public java.lang.String getLocationUri() { + java.lang.Object ref = locationUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for locationUri. + */ + public com.google.protobuf.ByteString + getLocationUriBytes() { + java.lang.Object ref = locationUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The locationUri to set. + * @return This builder for chaining. + */ + public Builder setLocationUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + locationUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearLocationUri() { + locationUri_ = getDefaultInstance().getLocationUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Required. The new location URI for the metadata resource.
+     * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for locationUri to set. + * @return This builder for chaining. + */ + public Builder setLocationUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + locationUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) + private static final com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest(); + } + + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlterMetadataResourceLocationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequestOrBuilder.java new file mode 100644 index 000000000000..d3290e3fdba9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationRequestOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface AlterMetadataResourceLocationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Required. The relative metadata resource name in the following format.
+   * `databases/{database_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+   * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The resourceName. + */ + java.lang.String getResourceName(); + /** + *
+   * Required. The relative metadata resource name in the following format.
+   * `databases/{database_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}`
+   * or
+   * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
+   * 
+ * + * string resource_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resourceName. + */ + com.google.protobuf.ByteString + getResourceNameBytes(); + + /** + *
+   * Required. The new location URI for the metadata resource.
+   * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The locationUri. + */ + java.lang.String getLocationUri(); + /** + *
+   * Required. The new location URI for the metadata resource.
+   * 
+ * + * string location_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for locationUri. + */ + com.google.protobuf.ByteString + getLocationUriBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponse.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponse.java new file mode 100644 index 000000000000..40ac0e5ea21e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponse.java @@ -0,0 +1,411 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Response message for
+ * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse} + */ +public final class AlterMetadataResourceLocationResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) + AlterMetadataResourceLocationResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AlterMetadataResourceLocationResponse.newBuilder() to construct. + private AlterMetadataResourceLocationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AlterMetadataResourceLocationResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AlterMetadataResourceLocationResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.class, com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse other = (com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.class, com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse build() { + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse buildPartial() { + com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse result = new com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) { + return mergeFrom((com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse other) { + if (other == com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) + private static final com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse(); + } + + public static com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlterMetadataResourceLocationResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponseOrBuilder.java new file mode 100644 index 000000000000..9ce42826687f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AlterMetadataResourceLocationResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface AlterMetadataResourceLocationResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfig.java new file mode 100644 index 000000000000..53adaf32b676 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfig.java @@ -0,0 +1,1195 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Configuration information for the auxiliary service versions.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.AuxiliaryVersionConfig} + */ +public final class AuxiliaryVersionConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) + AuxiliaryVersionConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use AuxiliaryVersionConfig.newBuilder() to construct. + private AuxiliaryVersionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuxiliaryVersionConfig() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuxiliaryVersionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.class, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; + private static final class ConfigOverridesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1beta.NetworkConfig networkConfig_; + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig() { + return networkConfig_ == null ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() : networkConfig_; + } + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return networkConfig_ == null ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() : networkConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetConfigOverrides(), + ConfigOverridesDefaultEntryHolder.defaultEntry, + 2); + if (networkConfig_ != null) { + output.writeMessage(3, getNetworkConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + for (java.util.Map.Entry entry + : internalGetConfigOverrides().getMap().entrySet()) { + com.google.protobuf.MapEntry + configOverrides__ = ConfigOverridesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, configOverrides__); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getNetworkConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig other = (com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetConfigOverrides().equals( + other.internalGetConfigOverrides())) return false; + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig() + .equals(other.getNetworkConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetConfigOverrides().getMap().isEmpty()) { + hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + internalGetConfigOverrides().hashCode(); + } + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration information for the auxiliary service versions.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.AuxiliaryVersionConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableConfigOverrides(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.class, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + internalGetMutableConfigOverrides().clear(); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig build() { + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig buildPartial() { + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig result = new com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configOverrides_ = internalGetConfigOverrides(); + result.configOverrides_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.networkConfig_ = networkConfigBuilder_ == null + ? networkConfig_ + : networkConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig other) { + if (other == com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableConfigOverrides().mergeFrom( + other.internalGetConfigOverrides()); + bitField0_ |= 0x00000002; + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + configOverrides__ = input.readMessage( + ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableConfigOverrides().getMutableMap().put( + configOverrides__.getKey(), configOverrides__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getNetworkConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The Hive metastore version of the auxiliary service. It must be less
+     * than the primary Hive metastore service's version.
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + private com.google.protobuf.MapField + internalGetMutableConfigOverrides() { + if (configOverrides_ == null) { + configOverrides_ = com.google.protobuf.MapField.newMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + if (!configOverrides_.isMutable()) { + configOverrides_ = configOverrides_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearConfigOverrides() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableConfigOverrides().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder removeConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableConfigOverrides().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableConfigOverrides() { + bitField0_ |= 0x00000002; + return internalGetMutableConfigOverrides().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putConfigOverrides( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableConfigOverrides().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+     * the primary version's overrides. If keys are present in both the auxiliary
+     * version's overrides and the primary version's overrides, the value from
+     * the auxiliary version's overrides takes precedence.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putAllConfigOverrides( + java.util.Map values) { + internalGetMutableConfigOverrides().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.cloud.metastore.v1beta.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig, com.google.cloud.metastore.v1beta.NetworkConfig.Builder, com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder> networkConfigBuilder_; + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + public com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setNetworkConfig(com.google.cloud.metastore.v1beta.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + } else { + networkConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setNetworkConfig( + com.google.cloud.metastore.v1beta.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeNetworkConfig(com.google.cloud.metastore.v1beta.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + networkConfig_ != null && + networkConfig_ != com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance()) { + getNetworkConfigBuilder().mergeFrom(value); + } else { + networkConfig_ = value; + } + } else { + networkConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.NetworkConfig.Builder getNetworkConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null ? + com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() : networkConfig_; + } + } + /** + *
+     * Output only. The network configuration contains the endpoint URI(s) of the
+     * auxiliary Hive metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig, com.google.cloud.metastore.v1beta.NetworkConfig.Builder, com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig, com.google.cloud.metastore.v1beta.NetworkConfig.Builder, com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder>( + getNetworkConfig(), + getParentForChildren(), + isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) + private static final com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig(); + } + + public static com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuxiliaryVersionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfigOrBuilder.java new file mode 100644 index 000000000000..3cb898ccbae7 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/AuxiliaryVersionConfigOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface AuxiliaryVersionConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.AuxiliaryVersionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The Hive metastore version of the auxiliary service. It must be less
+   * than the primary Hive metastore service's version.
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + int getConfigOverridesCount(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + boolean containsConfigOverrides( + java.lang.String key); + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getConfigOverrides(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.util.Map + getConfigOverridesMap(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
+   * the primary version's overrides. If keys are present in both the auxiliary
+   * version's overrides and the primary version's overrides, the value from
+   * the auxiliary version's overrides takes precedence.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.lang.String getConfigOverridesOrThrow( + java.lang.String key); + + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The networkConfig. + */ + com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig(); + /** + *
+   * Output only. The network configuration contains the endpoint URI(s) of the
+   * auxiliary Hive metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastore.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastore.java new file mode 100644 index 000000000000..40e8467b1e4e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastore.java @@ -0,0 +1,906 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Represents a backend metastore for the federation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.BackendMetastore} + */ +public final class BackendMetastore extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.BackendMetastore) + BackendMetastoreOrBuilder { +private static final long serialVersionUID = 0L; + // Use BackendMetastore.newBuilder() to construct. + private BackendMetastore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BackendMetastore() { + name_ = ""; + metastoreType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BackendMetastore(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_BackendMetastore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.BackendMetastore.class, com.google.cloud.metastore.v1beta.BackendMetastore.Builder.class); + } + + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.BackendMetastore.MetastoreType} + */ + public enum MetastoreType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The metastore type is not set.
+     * 
+ * + * METASTORE_TYPE_UNSPECIFIED = 0; + */ + METASTORE_TYPE_UNSPECIFIED(0), + /** + *
+     * The backend metastore is Dataplex.
+     * 
+ * + * DATAPLEX = 1; + */ + DATAPLEX(1), + /** + *
+     * The backend metastore is BigQuery.
+     * 
+ * + * BIGQUERY = 2; + */ + BIGQUERY(2), + /** + *
+     * The backend metastore is Dataproc Metastore.
+     * 
+ * + * DATAPROC_METASTORE = 3; + */ + DATAPROC_METASTORE(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The metastore type is not set.
+     * 
+ * + * METASTORE_TYPE_UNSPECIFIED = 0; + */ + public static final int METASTORE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The backend metastore is Dataplex.
+     * 
+ * + * DATAPLEX = 1; + */ + public static final int DATAPLEX_VALUE = 1; + /** + *
+     * The backend metastore is BigQuery.
+     * 
+ * + * BIGQUERY = 2; + */ + public static final int BIGQUERY_VALUE = 2; + /** + *
+     * The backend metastore is Dataproc Metastore.
+     * 
+ * + * DATAPROC_METASTORE = 3; + */ + public static final int DATAPROC_METASTORE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetastoreType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetastoreType forNumber(int value) { + switch (value) { + case 0: return METASTORE_TYPE_UNSPECIFIED; + case 1: return DATAPLEX; + case 2: return BIGQUERY; + case 3: return DATAPROC_METASTORE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MetastoreType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetastoreType findValueByNumber(int number) { + return MetastoreType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.BackendMetastore.getDescriptor().getEnumTypes().get(0); + } + + private static final MetastoreType[] VALUES = values(); + + public static MetastoreType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetastoreType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.BackendMetastore.MetastoreType) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METASTORE_TYPE_FIELD_NUMBER = 2; + private int metastoreType_ = 0; + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + @java.lang.Override public int getMetastoreTypeValue() { + return metastoreType_; + } + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType getMetastoreType() { + com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType result = com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.forNumber(metastoreType_); + return result == null ? com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (metastoreType_ != com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.METASTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, metastoreType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (metastoreType_ != com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.METASTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, metastoreType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.BackendMetastore)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.BackendMetastore other = (com.google.cloud.metastore.v1beta.BackendMetastore) obj; + + if (!getName() + .equals(other.getName())) return false; + if (metastoreType_ != other.metastoreType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + METASTORE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + metastoreType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.BackendMetastore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.BackendMetastore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a backend metastore for the federation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.BackendMetastore} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.BackendMetastore) + com.google.cloud.metastore.v1beta.BackendMetastoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_BackendMetastore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.BackendMetastore.class, com.google.cloud.metastore.v1beta.BackendMetastore.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.BackendMetastore.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + metastoreType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackendMetastore getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.BackendMetastore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackendMetastore build() { + com.google.cloud.metastore.v1beta.BackendMetastore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackendMetastore buildPartial() { + com.google.cloud.metastore.v1beta.BackendMetastore result = new com.google.cloud.metastore.v1beta.BackendMetastore(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.BackendMetastore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metastoreType_ = metastoreType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.BackendMetastore) { + return mergeFrom((com.google.cloud.metastore.v1beta.BackendMetastore)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.BackendMetastore other) { + if (other == com.google.cloud.metastore.v1beta.BackendMetastore.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.metastoreType_ != 0) { + setMetastoreTypeValue(other.getMetastoreTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + metastoreType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The relative resource name of the metastore that is being federated.
+     * The formats of the relative resource names for the currently supported
+     * metastores are listed below:
+     * * BigQuery
+     *     * `projects/{project_id}`
+     * * Dataproc Metastore
+     *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int metastoreType_ = 0; + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + @java.lang.Override public int getMetastoreTypeValue() { + return metastoreType_; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @param value The enum numeric value on the wire for metastoreType to set. + * @return This builder for chaining. + */ + public Builder setMetastoreTypeValue(int value) { + metastoreType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType getMetastoreType() { + com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType result = com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.forNumber(metastoreType_); + return result == null ? com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType.UNRECOGNIZED : result; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @param value The metastoreType to set. + * @return This builder for chaining. + */ + public Builder setMetastoreType(com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + metastoreType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of the backend metastore.
+     * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @return This builder for chaining. + */ + public Builder clearMetastoreType() { + bitField0_ = (bitField0_ & ~0x00000002); + metastoreType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.BackendMetastore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.BackendMetastore) + private static final com.google.cloud.metastore.v1beta.BackendMetastore DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.BackendMetastore(); + } + + public static com.google.cloud.metastore.v1beta.BackendMetastore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackendMetastore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackendMetastore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastoreOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastoreOrBuilder.java new file mode 100644 index 000000000000..aa61de1f8477 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackendMetastoreOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public interface BackendMetastoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.BackendMetastore) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The relative resource name of the metastore that is being federated.
+   * The formats of the relative resource names for the currently supported
+   * metastores are listed below:
+   * * BigQuery
+   *     * `projects/{project_id}`
+   * * Dataproc Metastore
+   *     * `projects/{project_id}/locations/{location}/services/{service_id}`
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @return The enum numeric value on the wire for metastoreType. + */ + int getMetastoreTypeValue(); + /** + *
+   * The type of the backend metastore.
+   * 
+ * + * .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2; + * @return The metastoreType. + */ + com.google.cloud.metastore.v1beta.BackendMetastore.MetastoreType getMetastoreType(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Backup.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Backup.java new file mode 100644 index 000000000000..3a48c8f4b18e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Backup.java @@ -0,0 +1,1993 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * The details of a backup resource.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Backup} + */ +public final class Backup extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Backup) + BackupOrBuilder { +private static final long serialVersionUID = 0L; + // Use Backup.newBuilder() to construct. + private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Backup() { + name_ = ""; + state_ = 0; + description_ = ""; + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Backup(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Backup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Backup.class, com.google.cloud.metastore.v1beta.Backup.Builder.class); + } + + /** + *
+   * The current state of the backup.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.Backup.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the backup is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The backup is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The backup is being deleted.
+     * 
+ * + * DELETING = 2; + */ + DELETING(2), + /** + *
+     * The backup is active and ready to use.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + *
+     * The backup failed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + *
+     * The backup is being restored.
+     * 
+ * + * RESTORING = 5; + */ + RESTORING(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the backup is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The backup is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The backup is being deleted.
+     * 
+ * + * DELETING = 2; + */ + public static final int DELETING_VALUE = 2; + /** + *
+     * The backup is active and ready to use.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + *
+     * The backup failed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + *
+     * The backup is being restored.
+     * 
+ * + * RESTORING = 5; + */ + public static final int RESTORING_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return DELETING; + case 3: return ACTIVE; + case 4: return FAILED; + case 5: return RESTORING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.Backup.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Backup.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Backup.State getState() { + com.google.cloud.metastore.v1beta.Backup.State result = com.google.cloud.metastore.v1beta.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.Backup.State.UNRECOGNIZED : result; + } + + public static final int SERVICE_REVISION_FIELD_NUMBER = 5; + private com.google.cloud.metastore.v1beta.Service serviceRevision_; + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + @java.lang.Override + public boolean hasServiceRevision() { + return serviceRevision_ != null; + } + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service getServiceRevision() { + return serviceRevision_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : serviceRevision_; + } + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceRevisionOrBuilder() { + return serviceRevision_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : serviceRevision_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESTORING_SERVICES_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList restoringServices_; + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + public com.google.protobuf.ProtocolStringList + getRestoringServicesList() { + return restoringServices_; + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + public int getRestoringServicesCount() { + return restoringServices_.size(); + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + public java.lang.String getRestoringServices(int index) { + return restoringServices_.get(index); + } + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + public com.google.protobuf.ByteString + getRestoringServicesBytes(int index) { + return restoringServices_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1beta.Backup.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (serviceRevision_ != null) { + output.writeMessage(5, getServiceRevision()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + for (int i = 0; i < restoringServices_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, restoringServices_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1beta.Backup.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, state_); + } + if (serviceRevision_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getServiceRevision()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + { + int dataSize = 0; + for (int i = 0; i < restoringServices_.size(); i++) { + dataSize += computeStringSizeNoTag(restoringServices_.getRaw(i)); + } + size += dataSize; + size += 1 * getRestoringServicesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.Backup)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.Backup other = (com.google.cloud.metastore.v1beta.Backup) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (hasServiceRevision() != other.hasServiceRevision()) return false; + if (hasServiceRevision()) { + if (!getServiceRevision() + .equals(other.getServiceRevision())) return false; + } + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getRestoringServicesList() + .equals(other.getRestoringServicesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasServiceRevision()) { + hash = (37 * hash) + SERVICE_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getServiceRevision().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getRestoringServicesCount() > 0) { + hash = (37 * hash) + RESTORING_SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getRestoringServicesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.Backup parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Backup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Backup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Backup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.Backup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a backup resource.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Backup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Backup) + com.google.cloud.metastore.v1beta.BackupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Backup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Backup.class, com.google.cloud.metastore.v1beta.Backup.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.Backup.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + serviceRevision_ = null; + if (serviceRevisionBuilder_ != null) { + serviceRevisionBuilder_.dispose(); + serviceRevisionBuilder_ = null; + } + description_ = ""; + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Backup_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Backup getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.Backup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Backup build() { + com.google.cloud.metastore.v1beta.Backup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Backup buildPartial() { + com.google.cloud.metastore.v1beta.Backup result = new com.google.cloud.metastore.v1beta.Backup(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.Backup result) { + if (((bitField0_ & 0x00000040) != 0)) { + restoringServices_ = restoringServices_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.restoringServices_ = restoringServices_; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.Backup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.serviceRevision_ = serviceRevisionBuilder_ == null + ? serviceRevision_ + : serviceRevisionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.Backup) { + return mergeFrom((com.google.cloud.metastore.v1beta.Backup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.Backup other) { + if (other == com.google.cloud.metastore.v1beta.Backup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasServiceRevision()) { + mergeServiceRevision(other.getServiceRevision()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.restoringServices_.isEmpty()) { + if (restoringServices_.isEmpty()) { + restoringServices_ = other.restoringServices_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureRestoringServicesIsMutable(); + restoringServices_.addAll(other.restoringServices_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getServiceRevisionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureRestoringServicesIsMutable(); + restoringServices_.add(s); + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the backup, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the backup was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the backup finished creating.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Backup.State getState() { + com.google.cloud.metastore.v1beta.Backup.State result = com.google.cloud.metastore.v1beta.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.Backup.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1beta.Backup.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.Service serviceRevision_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder> serviceRevisionBuilder_; + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + public boolean hasServiceRevision() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + public com.google.cloud.metastore.v1beta.Service getServiceRevision() { + if (serviceRevisionBuilder_ == null) { + return serviceRevision_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : serviceRevision_; + } else { + return serviceRevisionBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setServiceRevision(com.google.cloud.metastore.v1beta.Service value) { + if (serviceRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceRevision_ = value; + } else { + serviceRevisionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setServiceRevision( + com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { + if (serviceRevisionBuilder_ == null) { + serviceRevision_ = builderForValue.build(); + } else { + serviceRevisionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeServiceRevision(com.google.cloud.metastore.v1beta.Service value) { + if (serviceRevisionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + serviceRevision_ != null && + serviceRevision_ != com.google.cloud.metastore.v1beta.Service.getDefaultInstance()) { + getServiceRevisionBuilder().mergeFrom(value); + } else { + serviceRevision_ = value; + } + } else { + serviceRevisionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearServiceRevision() { + bitField0_ = (bitField0_ & ~0x00000010); + serviceRevision_ = null; + if (serviceRevisionBuilder_ != null) { + serviceRevisionBuilder_.dispose(); + serviceRevisionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.Service.Builder getServiceRevisionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getServiceRevisionFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceRevisionOrBuilder() { + if (serviceRevisionBuilder_ != null) { + return serviceRevisionBuilder_.getMessageOrBuilder(); + } else { + return serviceRevision_ == null ? + com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : serviceRevision_; + } + } + /** + *
+     * Output only. The revision of the service at the time of backup.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder> + getServiceRevisionFieldBuilder() { + if (serviceRevisionBuilder_ == null) { + serviceRevisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder>( + getServiceRevision(), + getParentForChildren(), + isClean()); + serviceRevision_ = null; + } + return serviceRevisionBuilder_; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The description of the backup.
+     * 
+ * + * string description = 6; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRestoringServicesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + restoringServices_ = new com.google.protobuf.LazyStringArrayList(restoringServices_); + bitField0_ |= 0x00000040; + } + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + public com.google.protobuf.ProtocolStringList + getRestoringServicesList() { + return restoringServices_.getUnmodifiableView(); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + public int getRestoringServicesCount() { + return restoringServices_.size(); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + public java.lang.String getRestoringServices(int index) { + return restoringServices_.get(index); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + public com.google.protobuf.ByteString + getRestoringServicesBytes(int index) { + return restoringServices_.getByteString(index); + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index to set the value at. + * @param value The restoringServices to set. + * @return This builder for chaining. + */ + public Builder setRestoringServices( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRestoringServicesIsMutable(); + restoringServices_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The restoringServices to add. + * @return This builder for chaining. + */ + public Builder addRestoringServices( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRestoringServicesIsMutable(); + restoringServices_.add(value); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param values The restoringServices to add. + * @return This builder for chaining. + */ + public Builder addAllRestoringServices( + java.lang.Iterable values) { + ensureRestoringServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, restoringServices_); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearRestoringServices() { + restoringServices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. Services that are restoring from the backup.
+     * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes of the restoringServices to add. + * @return This builder for chaining. + */ + public Builder addRestoringServicesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureRestoringServicesIsMutable(); + restoringServices_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Backup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Backup) + private static final com.google.cloud.metastore.v1beta.Backup DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Backup(); + } + + public static com.google.cloud.metastore.v1beta.Backup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Backup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Backup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupName.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupName.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupOrBuilder.java new file mode 100644 index 000000000000..9494c4ce986e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/BackupOrBuilder.java @@ -0,0 +1,192 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface BackupOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Backup) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the backup, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the backup was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the backup finished creating.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1beta.Backup.State getState(); + + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the serviceRevision field is set. + */ + boolean hasServiceRevision(); + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The serviceRevision. + */ + com.google.cloud.metastore.v1beta.Service getServiceRevision(); + /** + *
+   * Output only. The revision of the service at the time of backup.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceRevisionOrBuilder(); + + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of the backup.
+   * 
+ * + * string description = 6; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return A list containing the restoringServices. + */ + java.util.List + getRestoringServicesList(); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The count of restoringServices. + */ + int getRestoringServicesCount(); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the element to return. + * @return The restoringServices at the given index. + */ + java.lang.String getRestoringServices(int index); + /** + *
+   * Output only. Services that are restoring from the backup.
+   * 
+ * + * repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param index The index of the value to return. + * @return The bytes of the restoringServices at the given index. + */ + com.google.protobuf.ByteString + getRestoringServicesBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequest.java new file mode 100644 index 000000000000..88fde53f70d7 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequest.java @@ -0,0 +1,1256 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1beta.DataprocMetastore.CreateBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.CreateBackupRequest} + */ +public final class CreateBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.CreateBackupRequest) + CreateBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateBackupRequest.newBuilder() to construct. + private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateBackupRequest() { + parent_ = ""; + backupId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.CreateBackupRequest.class, com.google.cloud.metastore.v1beta.CreateBackupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1beta.Backup 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return backup_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Backup getBackup() { + return backup_ == null ? com.google.cloud.metastore.v1beta.Backup.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupOrBuilder() { + return backup_ == null ? com.google.cloud.metastore.v1beta.Backup.getDefaultInstance() : backup_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); + } + if (backup_ != null) { + output.writeMessage(3, getBackup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); + } + if (backup_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBackup()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.CreateBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.CreateBackupRequest other = (com.google.cloud.metastore.v1beta.CreateBackupRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getBackupId() + .equals(other.getBackupId())) return false; + if (hasBackup() != other.hasBackup()) return false; + if (hasBackup()) { + if (!getBackup() + .equals(other.getBackup())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + if (hasBackup()) { + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.CreateBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateBackup][google.cloud.metastore.v1beta.DataprocMetastore.CreateBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.CreateBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.CreateBackupRequest) + com.google.cloud.metastore.v1beta.CreateBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.CreateBackupRequest.class, com.google.cloud.metastore.v1beta.CreateBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.CreateBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupId_ = ""; + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.CreateBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateBackupRequest build() { + com.google.cloud.metastore.v1beta.CreateBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateBackupRequest buildPartial() { + com.google.cloud.metastore.v1beta.CreateBackupRequest result = new com.google.cloud.metastore.v1beta.CreateBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.CreateBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupId_ = backupId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backup_ = backupBuilder_ == null + ? backup_ + : backupBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.CreateBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.CreateBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.CreateBackupRequest other) { + if (other == com.google.cloud.metastore.v1beta.CreateBackupRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBackup()) { + mergeBackup(other.getBackup()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + backupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getBackupFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * backup of the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString + getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.Backup backup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Backup, com.google.cloud.metastore.v1beta.Backup.Builder, com.google.cloud.metastore.v1beta.BackupOrBuilder> backupBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + public boolean hasBackup() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + public com.google.cloud.metastore.v1beta.Backup getBackup() { + if (backupBuilder_ == null) { + return backup_ == null ? com.google.cloud.metastore.v1beta.Backup.getDefaultInstance() : backup_; + } else { + return backupBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setBackup(com.google.cloud.metastore.v1beta.Backup value) { + if (backupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backup_ = value; + } else { + backupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setBackup( + com.google.cloud.metastore.v1beta.Backup.Builder builderForValue) { + if (backupBuilder_ == null) { + backup_ = builderForValue.build(); + } else { + backupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeBackup(com.google.cloud.metastore.v1beta.Backup value) { + if (backupBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + backup_ != null && + backup_ != com.google.cloud.metastore.v1beta.Backup.getDefaultInstance()) { + getBackupBuilder().mergeFrom(value); + } else { + backup_ = value; + } + } else { + backupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearBackup() { + bitField0_ = (bitField0_ & ~0x00000004); + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.Backup.Builder getBackupBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBackupFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupOrBuilder() { + if (backupBuilder_ != null) { + return backupBuilder_.getMessageOrBuilder(); + } else { + return backup_ == null ? + com.google.cloud.metastore.v1beta.Backup.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Backup, com.google.cloud.metastore.v1beta.Backup.Builder, com.google.cloud.metastore.v1beta.BackupOrBuilder> + getBackupFieldBuilder() { + if (backupBuilder_ == null) { + backupBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Backup, com.google.cloud.metastore.v1beta.Backup.Builder, com.google.cloud.metastore.v1beta.BackupOrBuilder>( + getBackup(), + getParentForChildren(), + isClean()); + backup_ = null; + } + return backupBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.CreateBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.CreateBackupRequest) + private static final com.google.cloud.metastore.v1beta.CreateBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.CreateBackupRequest(); + } + + public static com.google.cloud.metastore.v1beta.CreateBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequestOrBuilder.java new file mode 100644 index 000000000000..39231d908aac --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateBackupRequestOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface CreateBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.CreateBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * backup of the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + *
+   * 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.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString + getBackupIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the backup field is set. + */ + boolean hasBackup(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The backup. + */ + com.google.cloud.metastore.v1beta.Backup getBackup(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequest.java new file mode 100644 index 000000000000..35bf6a510ee4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequest.java @@ -0,0 +1,1266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for CreateFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.CreateFederationRequest} + */ +public final class CreateFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.CreateFederationRequest) + CreateFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateFederationRequest.newBuilder() to construct. + private CreateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateFederationRequest() { + parent_ = ""; + federationId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.CreateFederationRequest.class, com.google.cloud.metastore.v1beta.CreateFederationRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEDERATION_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + @java.lang.Override + public java.lang.String getFederationId() { + java.lang.Object ref = federationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + federationId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFederationIdBytes() { + java.lang.Object ref = federationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + federationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEDERATION_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1beta.Federation 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + @java.lang.Override + public boolean hasFederation() { + return federation_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Federation getFederation() { + return federation_ == null ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder() { + return federation_ == null ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() : federation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, federationId_); + } + if (federation_ != null) { + output.writeMessage(3, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(federationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, federationId_); + } + if (federation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.CreateFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.CreateFederationRequest other = (com.google.cloud.metastore.v1beta.CreateFederationRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFederationId() + .equals(other.getFederationId())) return false; + if (hasFederation() != other.hasFederation()) return false; + if (hasFederation()) { + if (!getFederation() + .equals(other.getFederation())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FEDERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getFederationId().hashCode(); + if (hasFederation()) { + hash = (37 * hash) + FEDERATION_FIELD_NUMBER; + hash = (53 * hash) + getFederation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.CreateFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.CreateFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.CreateFederationRequest) + com.google.cloud.metastore.v1beta.CreateFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.CreateFederationRequest.class, com.google.cloud.metastore.v1beta.CreateFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.CreateFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + federationId_ = ""; + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.CreateFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateFederationRequest build() { + com.google.cloud.metastore.v1beta.CreateFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateFederationRequest buildPartial() { + com.google.cloud.metastore.v1beta.CreateFederationRequest result = new com.google.cloud.metastore.v1beta.CreateFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.CreateFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.federationId_ = federationId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.federation_ = federationBuilder_ == null + ? federation_ + : federationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.CreateFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.CreateFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.CreateFederationRequest other) { + if (other == com.google.cloud.metastore.v1beta.CreateFederationRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFederationId().isEmpty()) { + federationId_ = other.federationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasFederation()) { + mergeFederation(other.getFederation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + federationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getFederationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location in which to create a
+     * federation service, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + public java.lang.String getFederationId() { + java.lang.Object ref = federationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + federationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + public com.google.protobuf.ByteString + getFederationIdBytes() { + java.lang.Object ref = federationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + federationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The federationId to set. + * @return This builder for chaining. + */ + public Builder setFederationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + federationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearFederationId() { + federationId_ = getDefaultInstance().getFederationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for federationId to set. + * @return This builder for chaining. + */ + public Builder setFederationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + federationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.Federation federation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder> federationBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + public boolean hasFederation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + public com.google.cloud.metastore.v1beta.Federation getFederation() { + if (federationBuilder_ == null) { + return federation_ == null ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() : federation_; + } else { + return federationBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation(com.google.cloud.metastore.v1beta.Federation value) { + if (federationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + federation_ = value; + } else { + federationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation( + com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { + if (federationBuilder_ == null) { + federation_ = builderForValue.build(); + } else { + federationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFederation(com.google.cloud.metastore.v1beta.Federation value) { + if (federationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + federation_ != null && + federation_ != com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()) { + getFederationBuilder().mergeFrom(value); + } else { + federation_ = value; + } + } else { + federationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFederation() { + bitField0_ = (bitField0_ & ~0x00000004); + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.Federation.Builder getFederationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFederationFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder() { + if (federationBuilder_ != null) { + return federationBuilder_.getMessageOrBuilder(); + } else { + return federation_ == null ? + com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder> + getFederationFieldBuilder() { + if (federationBuilder_ == null) { + federationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder>( + getFederation(), + getParentForChildren(), + isClean()); + federation_ = null; + } + return federationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.CreateFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.CreateFederationRequest) + private static final com.google.cloud.metastore.v1beta.CreateFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.CreateFederationRequest(); + } + + public static com.google.cloud.metastore.v1beta.CreateFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequestOrBuilder.java new file mode 100644 index 000000000000..af7d28ab50d6 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateFederationRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public interface CreateFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.CreateFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location in which to create a
+   * federation service, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federationId. + */ + java.lang.String getFederationId(); + /** + *
+   * 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.
+   * 
+ * + * string federation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for federationId. + */ + com.google.protobuf.ByteString + getFederationIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + boolean hasFederation(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + com.google.cloud.metastore.v1beta.Federation getFederation(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequest.java new file mode 100644 index 000000000000..6496a1d4b1bc --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequest.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.CreateMetadataImportRequest} + */ +public final class CreateMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.CreateMetadataImportRequest) + CreateMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateMetadataImportRequest.newBuilder() to construct. + private CreateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateMetadataImportRequest() { + parent_ = ""; + metadataImportId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.class, com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_IMPORT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + @java.lang.Override + public java.lang.String getMetadataImportId() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataImportId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataImportIdBytes() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataImportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_IMPORT_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1beta.MetadataImport 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + @java.lang.Override + public boolean hasMetadataImport() { + return metadataImport_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport() { + return metadataImport_ == null ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder() { + return metadataImport_ == null ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() : metadataImport_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metadataImportId_); + } + if (metadataImport_ != null) { + output.writeMessage(3, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadataImportId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, metadataImportId_); + } + if (metadataImport_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.CreateMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.CreateMetadataImportRequest other = (com.google.cloud.metastore.v1beta.CreateMetadataImportRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getMetadataImportId() + .equals(other.getMetadataImportId())) return false; + if (hasMetadataImport() != other.hasMetadataImport()) return false; + if (hasMetadataImport()) { + if (!getMetadataImport() + .equals(other.getMetadataImport())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + METADATA_IMPORT_ID_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImportId().hashCode(); + if (hasMetadataImport()) { + hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImport().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.CreateMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.CreateMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.CreateMetadataImportRequest) + com.google.cloud.metastore.v1beta.CreateMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.class, com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + metadataImportId_ = ""; + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateMetadataImportRequest build() { + com.google.cloud.metastore.v1beta.CreateMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1beta.CreateMetadataImportRequest result = new com.google.cloud.metastore.v1beta.CreateMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.CreateMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataImportId_ = metadataImportId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadataImport_ = metadataImportBuilder_ == null + ? metadataImport_ + : metadataImportBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.CreateMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.CreateMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.CreateMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1beta.CreateMetadataImportRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMetadataImportId().isEmpty()) { + metadataImportId_ = other.metadataImportId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasMetadataImport()) { + mergeMetadataImport(other.getMetadataImport()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + metadataImportId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getMetadataImportFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service in which to create a
+     * metastore import, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + public java.lang.String getMetadataImportId() { + java.lang.Object ref = metadataImportId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataImportId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + public com.google.protobuf.ByteString + getMetadataImportIdBytes() { + java.lang.Object ref = metadataImportId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataImportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The metadataImportId to set. + * @return This builder for chaining. + */ + public Builder setMetadataImportId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataImportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearMetadataImportId() { + metadataImportId_ = getDefaultInstance().getMetadataImportId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for metadataImportId to set. + * @return This builder for chaining. + */ + public Builder setMetadataImportIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataImportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.MetadataImport metadataImport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> metadataImportBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + public boolean hasMetadataImport() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport() { + if (metadataImportBuilder_ == null) { + return metadataImport_ == null ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() : metadataImport_; + } else { + return metadataImportBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport(com.google.cloud.metastore.v1beta.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataImport_ = value; + } else { + metadataImportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport( + com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { + if (metadataImportBuilder_ == null) { + metadataImport_ = builderForValue.build(); + } else { + metadataImportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeMetadataImport(com.google.cloud.metastore.v1beta.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadataImport_ != null && + metadataImport_ != com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()) { + getMetadataImportBuilder().mergeFrom(value); + } else { + metadataImport_ = value; + } + } else { + metadataImportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearMetadataImport() { + bitField0_ = (bitField0_ & ~0x00000004); + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.MetadataImport.Builder getMetadataImportBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataImportFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder() { + if (metadataImportBuilder_ != null) { + return metadataImportBuilder_.getMessageOrBuilder(); + } else { + return metadataImport_ == null ? + com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> + getMetadataImportFieldBuilder() { + if (metadataImportBuilder_ == null) { + metadataImportBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder>( + getMetadataImport(), + getParentForChildren(), + isClean()); + metadataImport_ = null; + } + return metadataImportBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.CreateMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.CreateMetadataImportRequest) + private static final com.google.cloud.metastore.v1beta.CreateMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.CreateMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1beta.CreateMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..716c0655c59d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateMetadataImportRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface CreateMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.CreateMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service in which to create a
+   * metastore import, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImportId. + */ + java.lang.String getMetadataImportId(); + /** + *
+   * 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.
+   * 
+ * + * string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for metadataImportId. + */ + com.google.protobuf.ByteString + getMetadataImportIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + boolean hasMetadataImport(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequest.java new file mode 100644 index 000000000000..27f2c50b21ab --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequest.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.CreateService][google.cloud.metastore.v1beta.DataprocMetastore.CreateService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.CreateServiceRequest} + */ +public final class CreateServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.CreateServiceRequest) + CreateServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateServiceRequest.newBuilder() to construct. + private CreateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateServiceRequest() { + parent_ = ""; + serviceId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.CreateServiceRequest.class, com.google.cloud.metastore.v1beta.CreateServiceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + @java.lang.Override + public java.lang.String getServiceId() { + java.lang.Object ref = serviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceId_ = s; + return s; + } + } + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceIdBytes() { + java.lang.Object ref = serviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1beta.Service 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service getService() { + return service_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder() { + return service_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : service_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceId_); + } + if (service_ != null) { + output.writeMessage(3, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceId_); + } + if (service_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.CreateServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.CreateServiceRequest other = (com.google.cloud.metastore.v1beta.CreateServiceRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getServiceId() + .equals(other.getServiceId())) return false; + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService() + .equals(other.getService())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.CreateServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.CreateService][google.cloud.metastore.v1beta.DataprocMetastore.CreateService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.CreateServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.CreateServiceRequest) + com.google.cloud.metastore.v1beta.CreateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.CreateServiceRequest.class, com.google.cloud.metastore.v1beta.CreateServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.CreateServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + serviceId_ = ""; + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.CreateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateServiceRequest build() { + com.google.cloud.metastore.v1beta.CreateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateServiceRequest buildPartial() { + com.google.cloud.metastore.v1beta.CreateServiceRequest result = new com.google.cloud.metastore.v1beta.CreateServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.CreateServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceId_ = serviceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.service_ = serviceBuilder_ == null + ? service_ + : serviceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.CreateServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.CreateServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.CreateServiceRequest other) { + if (other == com.google.cloud.metastore.v1beta.CreateServiceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getServiceId().isEmpty()) { + serviceId_ = other.serviceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + serviceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getServiceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + public java.lang.String getServiceId() { + java.lang.Object ref = serviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + public com.google.protobuf.ByteString + getServiceIdBytes() { + java.lang.Object ref = serviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The serviceId to set. + * @return This builder for chaining. + */ + public Builder setServiceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + serviceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearServiceId() { + serviceId_ = getDefaultInstance().getServiceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for serviceId to set. + * @return This builder for chaining. + */ + public Builder setServiceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + serviceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.Service service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder> serviceBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + public boolean hasService() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + public com.google.cloud.metastore.v1beta.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService(com.google.cloud.metastore.v1beta.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + } else { + serviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService( + com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeService(com.google.cloud.metastore.v1beta.Service value) { + if (serviceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + service_ != null && + service_ != com.google.cloud.metastore.v1beta.Service.getDefaultInstance()) { + getServiceBuilder().mergeFrom(value); + } else { + service_ = value; + } + } else { + serviceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000004); + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.Service.Builder getServiceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null ? + com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : 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.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder>( + getService(), + getParentForChildren(), + isClean()); + service_ = null; + } + return serviceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.CreateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.CreateServiceRequest) + private static final com.google.cloud.metastore.v1beta.CreateServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.CreateServiceRequest(); + } + + public static com.google.cloud.metastore.v1beta.CreateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.CreateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequestOrBuilder.java new file mode 100644 index 000000000000..3a422230a379 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/CreateServiceRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface CreateServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.CreateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * 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}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The serviceId. + */ + java.lang.String getServiceId(); + /** + *
+   * 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.
+   * 
+ * + * string service_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for serviceId. + */ + com.google.protobuf.ByteString + getServiceIdBytes(); + + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + boolean hasService(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + com.google.cloud.metastore.v1beta.Service getService(); + /** + *
+   * 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.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfig.java new file mode 100644 index 000000000000..bb34f88449dd --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfig.java @@ -0,0 +1,505 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Specifies how metastore metadata should be integrated with the Data Catalog
+ * service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DataCatalogConfig} + */ +public final class DataCatalogConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DataCatalogConfig) + DataCatalogConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataCatalogConfig.newBuilder() to construct. + private DataCatalogConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataCatalogConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataCatalogConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DataCatalogConfig.class, com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 2; + private boolean enabled_ = false; + /** + *
+   * Defines whether the metastore metadata should be synced to Data Catalog.
+   * The default value is to disable syncing metastore metadata to Data Catalog.
+   * 
+ * + * bool enabled = 2; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(2, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, enabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.DataCatalogConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.DataCatalogConfig other = (com.google.cloud.metastore.v1beta.DataCatalogConfig) obj; + + if (getEnabled() + != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DataCatalogConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.DataCatalogConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies how metastore metadata should be integrated with the Data Catalog
+   * service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DataCatalogConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DataCatalogConfig) + com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DataCatalogConfig.class, com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.DataCatalogConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataCatalogConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataCatalogConfig build() { + com.google.cloud.metastore.v1beta.DataCatalogConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataCatalogConfig buildPartial() { + com.google.cloud.metastore.v1beta.DataCatalogConfig result = new com.google.cloud.metastore.v1beta.DataCatalogConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.DataCatalogConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.DataCatalogConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.DataCatalogConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.DataCatalogConfig other) { + if (other == com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean enabled_ ; + /** + *
+     * Defines whether the metastore metadata should be synced to Data Catalog.
+     * The default value is to disable syncing metastore metadata to Data Catalog.
+     * 
+ * + * bool enabled = 2; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + *
+     * Defines whether the metastore metadata should be synced to Data Catalog.
+     * The default value is to disable syncing metastore metadata to Data Catalog.
+     * 
+ * + * bool enabled = 2; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Defines whether the metastore metadata should be synced to Data Catalog.
+     * The default value is to disable syncing metastore metadata to Data Catalog.
+     * 
+ * + * bool enabled = 2; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DataCatalogConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DataCatalogConfig) + private static final com.google.cloud.metastore.v1beta.DataCatalogConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DataCatalogConfig(); + } + + public static com.google.cloud.metastore.v1beta.DataCatalogConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataCatalogConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataCatalogConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfigOrBuilder.java new file mode 100644 index 000000000000..af977049fb89 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataCatalogConfigOrBuilder.java @@ -0,0 +1,20 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface DataCatalogConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DataCatalogConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Defines whether the metastore metadata should be synced to Data Catalog.
+   * The default value is to disable syncing metastore metadata to Data Catalog.
+   * 
+ * + * bool enabled = 2; + * @return The enabled. + */ + boolean getEnabled(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpec.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpec.java new file mode 100644 index 000000000000..1529b9bd7e51 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpec.java @@ -0,0 +1,554 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * The specification of database dump to import from or export to.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DatabaseDumpSpec} + */ +public final class DatabaseDumpSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DatabaseDumpSpec) + DatabaseDumpSpecOrBuilder { +private static final long serialVersionUID = 0L; + // Use DatabaseDumpSpec.newBuilder() to construct. + private DatabaseDumpSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DatabaseDumpSpec() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DatabaseDumpSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.class, com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Builder.class); + } + + /** + *
+   * The type of the database dump.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.DatabaseDumpSpec.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The type of the database dump is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Database dump is a MySQL dump file.
+     * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + /** + *
+     * Database dump contains Avro files.
+     * 
+ * + * AVRO = 2; + */ + AVRO(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The type of the database dump is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Database dump is a MySQL dump file.
+     * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + /** + *
+     * Database dump contains Avro files.
+     * 
+ * + * AVRO = 2; + */ + public static final int AVRO_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return MYSQL; + case 2: return AVRO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.DatabaseDumpSpec.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.DatabaseDumpSpec.Type) + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.DatabaseDumpSpec)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.DatabaseDumpSpec other = (com.google.cloud.metastore.v1beta.DatabaseDumpSpec) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.DatabaseDumpSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The specification of database dump to import from or export to.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DatabaseDumpSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DatabaseDumpSpec) + com.google.cloud.metastore.v1beta.DatabaseDumpSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.class, com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.DatabaseDumpSpec.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DatabaseDumpSpec getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.DatabaseDumpSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DatabaseDumpSpec build() { + com.google.cloud.metastore.v1beta.DatabaseDumpSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DatabaseDumpSpec buildPartial() { + com.google.cloud.metastore.v1beta.DatabaseDumpSpec result = new com.google.cloud.metastore.v1beta.DatabaseDumpSpec(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.DatabaseDumpSpec) { + return mergeFrom((com.google.cloud.metastore.v1beta.DatabaseDumpSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.DatabaseDumpSpec other) { + if (other == com.google.cloud.metastore.v1beta.DatabaseDumpSpec.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DatabaseDumpSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DatabaseDumpSpec) + private static final com.google.cloud.metastore.v1beta.DatabaseDumpSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DatabaseDumpSpec(); + } + + public static com.google.cloud.metastore.v1beta.DatabaseDumpSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseDumpSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DatabaseDumpSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpecOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpecOrBuilder.java new file mode 100644 index 000000000000..33076da9c960 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DatabaseDumpSpecOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface DatabaseDumpSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DatabaseDumpSpec) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfig.java new file mode 100644 index 000000000000..844a717edf4d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfig.java @@ -0,0 +1,763 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Specifies how metastore metadata should be integrated with the Dataplex
+ * service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DataplexConfig} + */ +public final class DataplexConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DataplexConfig) + DataplexConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataplexConfig.newBuilder() to construct. + private DataplexConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataplexConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataplexConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataplexConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetLakeResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataplexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DataplexConfig.class, com.google.cloud.metastore.v1beta.DataplexConfig.Builder.class); + } + + public static final int LAKE_RESOURCES_FIELD_NUMBER = 1; + private static final class LakeResourcesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.metastore.v1beta.Lake> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataplexConfig_LakeResourcesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.metastore.v1beta.Lake.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1beta.Lake> lakeResources_; + private com.google.protobuf.MapField + internalGetLakeResources() { + if (lakeResources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LakeResourcesDefaultEntryHolder.defaultEntry); + } + return lakeResources_; + } + public int getLakeResourcesCount() { + return internalGetLakeResources().getMap().size(); + } + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + @java.lang.Override + public boolean containsLakeResources( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLakeResources().getMap().containsKey(key); + } + /** + * Use {@link #getLakeResourcesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLakeResources() { + return getLakeResourcesMap(); + } + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + @java.lang.Override + public java.util.Map getLakeResourcesMap() { + return internalGetLakeResources().getMap(); + } + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1beta.Lake defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLakeResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLakeResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLakeResources(), + LakeResourcesDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetLakeResources().getMap().entrySet()) { + com.google.protobuf.MapEntry + lakeResources__ = LakeResourcesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, lakeResources__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.DataplexConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.DataplexConfig other = (com.google.cloud.metastore.v1beta.DataplexConfig) obj; + + if (!internalGetLakeResources().equals( + other.internalGetLakeResources())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetLakeResources().getMap().isEmpty()) { + hash = (37 * hash) + LAKE_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + internalGetLakeResources().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DataplexConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.DataplexConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies how metastore metadata should be integrated with the Dataplex
+   * service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DataplexConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DataplexConfig) + com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataplexConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetLakeResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableLakeResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataplexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DataplexConfig.class, com.google.cloud.metastore.v1beta.DataplexConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.DataplexConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableLakeResources().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DataplexConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataplexConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataplexConfig build() { + com.google.cloud.metastore.v1beta.DataplexConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataplexConfig buildPartial() { + com.google.cloud.metastore.v1beta.DataplexConfig result = new com.google.cloud.metastore.v1beta.DataplexConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.DataplexConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lakeResources_ = internalGetLakeResources(); + result.lakeResources_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.DataplexConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.DataplexConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.DataplexConfig other) { + if (other == com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance()) return this; + internalGetMutableLakeResources().mergeFrom( + other.internalGetLakeResources()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + lakeResources__ = input.readMessage( + LakeResourcesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLakeResources().getMutableMap().put( + lakeResources__.getKey(), lakeResources__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1beta.Lake> lakeResources_; + private com.google.protobuf.MapField + internalGetLakeResources() { + if (lakeResources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LakeResourcesDefaultEntryHolder.defaultEntry); + } + return lakeResources_; + } + private com.google.protobuf.MapField + internalGetMutableLakeResources() { + if (lakeResources_ == null) { + lakeResources_ = com.google.protobuf.MapField.newMapField( + LakeResourcesDefaultEntryHolder.defaultEntry); + } + if (!lakeResources_.isMutable()) { + lakeResources_ = lakeResources_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return lakeResources_; + } + public int getLakeResourcesCount() { + return internalGetLakeResources().getMap().size(); + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + @java.lang.Override + public boolean containsLakeResources( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLakeResources().getMap().containsKey(key); + } + /** + * Use {@link #getLakeResourcesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLakeResources() { + return getLakeResourcesMap(); + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + @java.lang.Override + public java.util.Map getLakeResourcesMap() { + return internalGetLakeResources().getMap(); + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1beta.Lake defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLakeResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLakeResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLakeResources() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableLakeResources().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + public Builder removeLakeResources( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLakeResources().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLakeResources() { + bitField0_ |= 0x00000001; + return internalGetMutableLakeResources().getMutableMap(); + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + public Builder putLakeResources( + java.lang.String key, + com.google.cloud.metastore.v1beta.Lake value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLakeResources().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * A reference to the Lake resources that this metastore service is attached
+     * to. The key is the lake resource name. Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + public Builder putAllLakeResources( + java.util.Map values) { + internalGetMutableLakeResources().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DataplexConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DataplexConfig) + private static final com.google.cloud.metastore.v1beta.DataplexConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DataplexConfig(); + } + + public static com.google.cloud.metastore.v1beta.DataplexConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataplexConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataplexConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfigOrBuilder.java new file mode 100644 index 000000000000..9d00eebec826 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DataplexConfigOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface DataplexConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DataplexConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + int getLakeResourcesCount(); + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + boolean containsLakeResources( + java.lang.String key); + /** + * Use {@link #getLakeResourcesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLakeResources(); + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + java.util.Map + getLakeResourcesMap(); + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + /* nullable */ +com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1beta.Lake defaultValue); + /** + *
+   * A reference to the Lake resources that this metastore service is attached
+   * to. The key is the lake resource name. Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.Lake> lake_resources = 1; + */ + com.google.cloud.metastore.v1beta.Lake getLakeResourcesOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequest.java new file mode 100644 index 000000000000..216fc71d0ac4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequest.java @@ -0,0 +1,823 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DeleteBackupRequest} + */ +public final class DeleteBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DeleteBackupRequest) + DeleteBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteBackupRequest.newBuilder() to construct. + private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteBackupRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DeleteBackupRequest.class, com.google.cloud.metastore.v1beta.DeleteBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.DeleteBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.DeleteBackupRequest other = (com.google.cloud.metastore.v1beta.DeleteBackupRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.DeleteBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DeleteBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DeleteBackupRequest) + com.google.cloud.metastore.v1beta.DeleteBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DeleteBackupRequest.class, com.google.cloud.metastore.v1beta.DeleteBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.DeleteBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.DeleteBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteBackupRequest build() { + com.google.cloud.metastore.v1beta.DeleteBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteBackupRequest buildPartial() { + com.google.cloud.metastore.v1beta.DeleteBackupRequest result = new com.google.cloud.metastore.v1beta.DeleteBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.DeleteBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.DeleteBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.DeleteBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.DeleteBackupRequest other) { + if (other == com.google.cloud.metastore.v1beta.DeleteBackupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to delete, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DeleteBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DeleteBackupRequest) + private static final com.google.cloud.metastore.v1beta.DeleteBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DeleteBackupRequest(); + } + + public static com.google.cloud.metastore.v1beta.DeleteBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequestOrBuilder.java new file mode 100644 index 000000000000..21517a95230d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteBackupRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface DeleteBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DeleteBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the backup to delete, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequest.java new file mode 100644 index 000000000000..d50ca0c3e219 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequest.java @@ -0,0 +1,821 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for DeleteFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DeleteFederationRequest} + */ +public final class DeleteFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DeleteFederationRequest) + DeleteFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteFederationRequest.newBuilder() to construct. + private DeleteFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteFederationRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DeleteFederationRequest.class, com.google.cloud.metastore.v1beta.DeleteFederationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.DeleteFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.DeleteFederationRequest other = (com.google.cloud.metastore.v1beta.DeleteFederationRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.DeleteFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DeleteFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DeleteFederationRequest) + com.google.cloud.metastore.v1beta.DeleteFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DeleteFederationRequest.class, com.google.cloud.metastore.v1beta.DeleteFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.DeleteFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.DeleteFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteFederationRequest build() { + com.google.cloud.metastore.v1beta.DeleteFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteFederationRequest buildPartial() { + com.google.cloud.metastore.v1beta.DeleteFederationRequest result = new com.google.cloud.metastore.v1beta.DeleteFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.DeleteFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.DeleteFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.DeleteFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.DeleteFederationRequest other) { + if (other == com.google.cloud.metastore.v1beta.DeleteFederationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to delete,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DeleteFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DeleteFederationRequest) + private static final com.google.cloud.metastore.v1beta.DeleteFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DeleteFederationRequest(); + } + + public static com.google.cloud.metastore.v1beta.DeleteFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequestOrBuilder.java new file mode 100644 index 000000000000..3384a87770f5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteFederationRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public interface DeleteFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DeleteFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore federation to delete,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequest.java new file mode 100644 index 000000000000..0d2e481e1b8d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequest.java @@ -0,0 +1,823 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.DeleteService][google.cloud.metastore.v1beta.DataprocMetastore.DeleteService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DeleteServiceRequest} + */ +public final class DeleteServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.DeleteServiceRequest) + DeleteServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteServiceRequest.newBuilder() to construct. + private DeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteServiceRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DeleteServiceRequest.class, com.google.cloud.metastore.v1beta.DeleteServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.DeleteServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.DeleteServiceRequest other = (com.google.cloud.metastore.v1beta.DeleteServiceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.DeleteServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.DeleteService][google.cloud.metastore.v1beta.DataprocMetastore.DeleteService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.DeleteServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.DeleteServiceRequest) + com.google.cloud.metastore.v1beta.DeleteServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.DeleteServiceRequest.class, com.google.cloud.metastore.v1beta.DeleteServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.DeleteServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.DeleteServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteServiceRequest build() { + com.google.cloud.metastore.v1beta.DeleteServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteServiceRequest buildPartial() { + com.google.cloud.metastore.v1beta.DeleteServiceRequest result = new com.google.cloud.metastore.v1beta.DeleteServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.DeleteServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.DeleteServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.DeleteServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.DeleteServiceRequest other) { + if (other == com.google.cloud.metastore.v1beta.DeleteServiceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to delete, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.DeleteServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.DeleteServiceRequest) + private static final com.google.cloud.metastore.v1beta.DeleteServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.DeleteServiceRequest(); + } + + public static com.google.cloud.metastore.v1beta.DeleteServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.DeleteServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequestOrBuilder.java new file mode 100644 index 000000000000..aeeee3d76f2e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/DeleteServiceRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface DeleteServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.DeleteServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore service to delete, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfig.java new file mode 100644 index 000000000000..da2b3e75cf89 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfig.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Encryption settings for the service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.EncryptionConfig} + */ +public final class EncryptionConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.EncryptionConfig) + EncryptionConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use EncryptionConfig.newBuilder() to construct. + private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EncryptionConfig() { + kmsKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EncryptionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.EncryptionConfig.class, com.google.cloud.metastore.v1beta.EncryptionConfig.Builder.class); + } + + public static final int KMS_KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } + } + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.EncryptionConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.EncryptionConfig other = (com.google.cloud.metastore.v1beta.EncryptionConfig) obj; + + if (!getKmsKey() + .equals(other.getKmsKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.EncryptionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Encryption settings for the service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.EncryptionConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.EncryptionConfig) + com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.EncryptionConfig.class, com.google.cloud.metastore.v1beta.EncryptionConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.EncryptionConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_EncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.EncryptionConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.EncryptionConfig build() { + com.google.cloud.metastore.v1beta.EncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.EncryptionConfig buildPartial() { + com.google.cloud.metastore.v1beta.EncryptionConfig result = new com.google.cloud.metastore.v1beta.EncryptionConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.EncryptionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kmsKey_ = kmsKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.EncryptionConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.EncryptionConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.EncryptionConfig other) { + if (other == com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance()) return this; + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + kmsKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object kmsKey_ = ""; + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString + getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The fully qualified customer provided Cloud KMS key name to use for
+     * customer data encryption, in the following form:
+     * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+     * 
+ * + * string kms_key = 1; + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.EncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.EncryptionConfig) + private static final com.google.cloud.metastore.v1beta.EncryptionConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.EncryptionConfig(); + } + + public static com.google.cloud.metastore.v1beta.EncryptionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EncryptionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.EncryptionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfigOrBuilder.java new file mode 100644 index 000000000000..de9bfc4b2686 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/EncryptionConfigOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface EncryptionConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + /** + *
+   * The fully qualified customer provided Cloud KMS key name to use for
+   * customer data encryption, in the following form:
+   * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
+   * 
+ * + * string kms_key = 1; + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString + getKmsKeyBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequest.java new file mode 100644 index 000000000000..20ca693d74bb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequest.java @@ -0,0 +1,1253 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ExportMetadataRequest} + */ +public final class ExportMetadataRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ExportMetadataRequest) + ExportMetadataRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExportMetadataRequest.newBuilder() to construct. + private ExportMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExportMetadataRequest() { + service_ = ""; + requestId_ = ""; + databaseDumpType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExportMetadataRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ExportMetadataRequest.class, com.google.cloud.metastore.v1beta.ExportMetadataRequest.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DESTINATION_GCS_FOLDER(2), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 2: return DESTINATION_GCS_FOLDER; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int DESTINATION_GCS_FOLDER_FIELD_NUMBER = 2; + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + public boolean hasDestinationGcsFolder() { + return destinationCase_ == 2; + } + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + public java.lang.String getDestinationGcsFolder() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } + } + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + public com.google.protobuf.ByteString + getDestinationGcsFolderBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 4; + private int databaseDumpType_ = 0; + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (destinationCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, databaseDumpType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (destinationCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, databaseDumpType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ExportMetadataRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ExportMetadataRequest other = (com.google.cloud.metastore.v1beta.ExportMetadataRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (databaseDumpType_ != other.databaseDumpType_) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 2: + if (!getDestinationGcsFolder() + .equals(other.getDestinationGcsFolder())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseDumpType_; + switch (destinationCase_) { + case 2: + hash = (37 * hash) + DESTINATION_GCS_FOLDER_FIELD_NUMBER; + hash = (53 * hash) + getDestinationGcsFolder().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ExportMetadataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ExportMetadataRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ExportMetadataRequest) + com.google.cloud.metastore.v1beta.ExportMetadataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ExportMetadataRequest.class, com.google.cloud.metastore.v1beta.ExportMetadataRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ExportMetadataRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + requestId_ = ""; + databaseDumpType_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ExportMetadataRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ExportMetadataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ExportMetadataRequest build() { + com.google.cloud.metastore.v1beta.ExportMetadataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ExportMetadataRequest buildPartial() { + com.google.cloud.metastore.v1beta.ExportMetadataRequest result = new com.google.cloud.metastore.v1beta.ExportMetadataRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ExportMetadataRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.databaseDumpType_ = databaseDumpType_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1beta.ExportMetadataRequest result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ExportMetadataRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.ExportMetadataRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ExportMetadataRequest other) { + if (other == com.google.cloud.metastore.v1beta.ExportMetadataRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.databaseDumpType_ != 0) { + setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); + } + switch (other.getDestinationCase()) { + case DESTINATION_GCS_FOLDER: { + destinationCase_ = 2; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 2; + destination_ = s; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + databaseDumpType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + @java.lang.Override + public boolean hasDestinationGcsFolder() { + return destinationCase_ == 2; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + @java.lang.Override + public java.lang.String getDestinationGcsFolder() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 2) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationGcsFolderBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 2) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 2) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @param value The destinationGcsFolder to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsFolder( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @return This builder for chaining. + */ + public Builder clearDestinationGcsFolder() { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A Cloud Storage URI of a folder, in the format
+     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+     * `<export_folder>` containing exported files will be created below it.
+     * 
+ * + * string destination_gcs_folder = 2; + * @param value The bytes for destinationGcsFolder to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsFolderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationCase_ = 2; + destination_ = value; + onChanged(); + return this; + } + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * export, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int databaseDumpType_ = 0; + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpTypeValue(int value) { + databaseDumpType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpType(com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + databaseDumpType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearDatabaseDumpType() { + bitField0_ = (bitField0_ & ~0x00000008); + databaseDumpType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ExportMetadataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ExportMetadataRequest) + private static final com.google.cloud.metastore.v1beta.ExportMetadataRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ExportMetadataRequest(); + } + + public static com.google.cloud.metastore.v1beta.ExportMetadataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportMetadataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ExportMetadataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequestOrBuilder.java new file mode 100644 index 000000000000..5a2f53824cb4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ExportMetadataRequestOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ExportMetadataRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ExportMetadataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return Whether the destinationGcsFolder field is set. + */ + boolean hasDestinationGcsFolder(); + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The destinationGcsFolder. + */ + java.lang.String getDestinationGcsFolder(); + /** + *
+   * A Cloud Storage URI of a folder, in the format
+   * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
+   * `<export_folder>` containing exported files will be created below it.
+   * 
+ * + * string destination_gcs_folder = 2; + * @return The bytes for destinationGcsFolder. + */ + com.google.protobuf.ByteString + getDestinationGcsFolderBytes(); + + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * export, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); + + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + int getDatabaseDumpTypeValue(); + /** + *
+   * Optional. The type of the database dump. If unspecified, defaults to
+   * `MYSQL`.
+   * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The databaseDumpType. + */ + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType(); + + public com.google.cloud.metastore.v1beta.ExportMetadataRequest.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Federation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Federation.java new file mode 100644 index 000000000000..db5f6134bdb8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Federation.java @@ -0,0 +1,2724 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Represents a federation of multiple backend metastores.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Federation} + */ +public final class Federation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Federation) + FederationOrBuilder { +private static final long serialVersionUID = 0L; + // Use Federation.newBuilder() to construct. + private Federation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Federation() { + name_ = ""; + version_ = ""; + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + uid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Federation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_Federation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 6: + return internalGetBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_Federation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Federation.class, com.google.cloud.metastore.v1beta.Federation.Builder.class); + } + + /** + *
+   * The current state of the federation.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.Federation.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metastore federation is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metastore federation is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The metastore federation is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + *
+     * The metastore federation is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + *
+     * The metastore federation is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + *
+     * The metastore federation has encountered an error and cannot be used. The
+     * metastore federation should be deleted.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metastore federation is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metastore federation is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The metastore federation is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + *
+     * The metastore federation is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + *
+     * The metastore federation is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + *
+     * The metastore federation has encountered an error and cannot be used. The
+     * metastore federation should be deleted.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return ACTIVE; + case 3: return UPDATING; + case 4: return DELETING; + case 5: return ERROR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.Federation.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Federation.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int VERSION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKEND_METASTORES_FIELD_NUMBER = 6; + private static final class BackendMetastoresDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.metastore.v1beta.BackendMetastore.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> backendMetastores_; + private com.google.protobuf.MapField + internalGetBackendMetastores() { + if (backendMetastores_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + return backendMetastores_; + } + public int getBackendMetastoresCount() { + return internalGetBackendMetastores().getMap().size(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public boolean containsBackendMetastores( + int key) { + + return internalGetBackendMetastores().getMap().containsKey(key); + } + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBackendMetastores() { + return getBackendMetastoresMap(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public java.util.Map getBackendMetastoresMap() { + return internalGetBackendMetastores().getMap(); + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1beta.BackendMetastore defaultValue) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrThrow( + int key) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_ = 0; + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Federation.State getState() { + com.google.cloud.metastore.v1beta.Federation.State result = com.google.cloud.metastore.v1beta.Federation.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.Federation.State.UNRECOGNIZED : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object stateMessage_ = ""; + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetBackendMetastores(), + BackendMetastoresDefaultEntryHolder.defaultEntry, + 6); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, endpointUri_); + } + if (state_ != com.google.cloud.metastore.v1beta.Federation.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, uid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); + } + for (java.util.Map.Entry entry + : internalGetBackendMetastores().getMap().entrySet()) { + com.google.protobuf.MapEntry + backendMetastores__ = BackendMetastoresDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, backendMetastores__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, endpointUri_); + } + if (state_ != com.google.cloud.metastore.v1beta.Federation.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, uid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.Federation)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.Federation other = (com.google.cloud.metastore.v1beta.Federation) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetBackendMetastores().equals( + other.internalGetBackendMetastores())) return false; + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (state_ != other.state_) return false; + if (!getStateMessage() + .equals(other.getStateMessage())) return false; + if (!getUid() + .equals(other.getUid())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetBackendMetastores().getMap().isEmpty()) { + hash = (37 * hash) + BACKEND_METASTORES_FIELD_NUMBER; + hash = (53 * hash) + internalGetBackendMetastores().hashCode(); + } + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.Federation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Federation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Federation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Federation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.Federation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a federation of multiple backend metastores.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Federation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Federation) + com.google.cloud.metastore.v1beta.FederationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_Federation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 6: + return internalGetBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 6: + return internalGetMutableBackendMetastores(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_Federation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Federation.class, com.google.cloud.metastore.v1beta.Federation.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.Federation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + version_ = ""; + internalGetMutableBackendMetastores().clear(); + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + uid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_Federation_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Federation getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.Federation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Federation build() { + com.google.cloud.metastore.v1beta.Federation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Federation buildPartial() { + com.google.cloud.metastore.v1beta.Federation result = new com.google.cloud.metastore.v1beta.Federation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.Federation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.backendMetastores_ = internalGetBackendMetastores(); + result.backendMetastores_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endpointUri_ = endpointUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.stateMessage_ = stateMessage_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.uid_ = uid_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.Federation) { + return mergeFrom((com.google.cloud.metastore.v1beta.Federation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.Federation other) { + if (other == com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000010; + onChanged(); + } + internalGetMutableBackendMetastores().mergeFrom( + other.internalGetBackendMetastores()); + bitField0_ |= 0x00000020; + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + com.google.protobuf.MapEntry + backendMetastores__ = input.readMessage( + BackendMetastoresDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableBackendMetastores().getMutableMap().put( + backendMetastores__.getKey(), backendMetastores__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + state_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: { + stateMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the federation, of the
+     * form:
+     * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metastore federation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metastore federation was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * User-defined labels for the metastore federation.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Immutable. The Apache Hive metastore version of the federation. All backend
+     * metastore versions must be compatible with the federation version.
+     * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, com.google.cloud.metastore.v1beta.BackendMetastore> backendMetastores_; + private com.google.protobuf.MapField + internalGetBackendMetastores() { + if (backendMetastores_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + return backendMetastores_; + } + private com.google.protobuf.MapField + internalGetMutableBackendMetastores() { + if (backendMetastores_ == null) { + backendMetastores_ = com.google.protobuf.MapField.newMapField( + BackendMetastoresDefaultEntryHolder.defaultEntry); + } + if (!backendMetastores_.isMutable()) { + backendMetastores_ = backendMetastores_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return backendMetastores_; + } + public int getBackendMetastoresCount() { + return internalGetBackendMetastores().getMap().size(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public boolean containsBackendMetastores( + int key) { + + return internalGetBackendMetastores().getMap().containsKey(key); + } + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBackendMetastores() { + return getBackendMetastoresMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public java.util.Map getBackendMetastoresMap() { + return internalGetBackendMetastores().getMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1beta.BackendMetastore defaultValue) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrThrow( + int key) { + + java.util.Map map = + internalGetBackendMetastores().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearBackendMetastores() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableBackendMetastores().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + public Builder removeBackendMetastores( + int key) { + + internalGetMutableBackendMetastores().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableBackendMetastores() { + bitField0_ |= 0x00000020; + return internalGetMutableBackendMetastores().getMutableMap(); + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + public Builder putBackendMetastores( + int key, + com.google.cloud.metastore.v1beta.BackendMetastore value) { + + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableBackendMetastores().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + *
+     * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+     * federation service serves metadata at query time. The map key represents
+     * the order in which `BackendMetastore`s should be evaluated to resolve
+     * database names at query time and should be greater than or equal to zero. A
+     * `BackendMetastore` with a lower number will be evaluated before a
+     * `BackendMetastore` with a higher number.
+     * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + public Builder putAllBackendMetastores( + java.util.Map values) { + internalGetMutableBackendMetastores().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. The federation endpoint.
+     * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Federation.State getState() { + com.google.cloud.metastore.v1beta.Federation.State result = com.google.cloud.metastore.v1beta.Federation.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.Federation.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1beta.Federation.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the federation.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000080); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + stateMessage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + stateMessage_ = getDefaultInstance().getStateMessage(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore federation, if available.
+     * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + stateMessage_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * federation.
+     * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Federation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Federation) + private static final com.google.cloud.metastore.v1beta.Federation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Federation(); + } + + public static com.google.cloud.metastore.v1beta.Federation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Federation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Federation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationName.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationName.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationOrBuilder.java new file mode 100644 index 000000000000..6556dfe244f9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/FederationOrBuilder.java @@ -0,0 +1,325 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public interface FederationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Federation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the federation, of the
+   * form:
+   * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metastore federation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metastore federation was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * User-defined labels for the metastore federation.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Immutable. The Apache Hive metastore version of the federation. All backend
+   * metastore versions must be compatible with the federation version.
+   * 
+ * + * string version = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + int getBackendMetastoresCount(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + boolean containsBackendMetastores( + int key); + /** + * Use {@link #getBackendMetastoresMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getBackendMetastores(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + java.util.Map + getBackendMetastoresMap(); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + /* nullable */ +com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrDefault( + int key, + /* nullable */ +com.google.cloud.metastore.v1beta.BackendMetastore defaultValue); + /** + *
+   * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
+   * federation service serves metadata at query time. The map key represents
+   * the order in which `BackendMetastore`s should be evaluated to resolve
+   * database names at query time and should be greater than or equal to zero. A
+   * `BackendMetastore` with a lower number will be evaluated before a
+   * `BackendMetastore` with a higher number.
+   * 
+ * + * map<int32, .google.cloud.metastore.v1beta.BackendMetastore> backend_metastores = 6; + */ + com.google.cloud.metastore.v1beta.BackendMetastore getBackendMetastoresOrThrow( + int key); + + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+   * Output only. The federation endpoint.
+   * 
+ * + * string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the federation.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1beta.Federation.State getState(); + + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore federation, if available.
+   * 
+ * + * string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString + getStateMessageBytes(); + + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + java.lang.String getUid(); + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * federation.
+   * 
+ * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequest.java new file mode 100644 index 000000000000..dc36d92f0d77 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetBackup][google.cloud.metastore.v1beta.DataprocMetastore.GetBackup].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.GetBackupRequest} + */ +public final class GetBackupRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.GetBackupRequest) + GetBackupRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetBackupRequest.newBuilder() to construct. + private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBackupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBackupRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.GetBackupRequest.class, com.google.cloud.metastore.v1beta.GetBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.GetBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.GetBackupRequest other = (com.google.cloud.metastore.v1beta.GetBackupRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.GetBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetBackup][google.cloud.metastore.v1beta.DataprocMetastore.GetBackup].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.GetBackupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.GetBackupRequest) + com.google.cloud.metastore.v1beta.GetBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.GetBackupRequest.class, com.google.cloud.metastore.v1beta.GetBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.GetBackupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetBackupRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.GetBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetBackupRequest build() { + com.google.cloud.metastore.v1beta.GetBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetBackupRequest buildPartial() { + com.google.cloud.metastore.v1beta.GetBackupRequest result = new com.google.cloud.metastore.v1beta.GetBackupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.GetBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.GetBackupRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.GetBackupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.GetBackupRequest other) { + if (other == com.google.cloud.metastore.v1beta.GetBackupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the backup to retrieve, in the
+     * following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.GetBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.GetBackupRequest) + private static final com.google.cloud.metastore.v1beta.GetBackupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.GetBackupRequest(); + } + + public static com.google.cloud.metastore.v1beta.GetBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequestOrBuilder.java new file mode 100644 index 000000000000..cd793cdd0a5c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetBackupRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface GetBackupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.GetBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the backup to retrieve, in the
+   * following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequest.java new file mode 100644 index 000000000000..60bbe15798eb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequest.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for GetFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.GetFederationRequest} + */ +public final class GetFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.GetFederationRequest) + GetFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetFederationRequest.newBuilder() to construct. + private GetFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetFederationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_GetFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.GetFederationRequest.class, com.google.cloud.metastore.v1beta.GetFederationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.GetFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.GetFederationRequest other = (com.google.cloud.metastore.v1beta.GetFederationRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.GetFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.GetFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.GetFederationRequest) + com.google.cloud.metastore.v1beta.GetFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_GetFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.GetFederationRequest.class, com.google.cloud.metastore.v1beta.GetFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.GetFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.GetFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetFederationRequest build() { + com.google.cloud.metastore.v1beta.GetFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetFederationRequest buildPartial() { + com.google.cloud.metastore.v1beta.GetFederationRequest result = new com.google.cloud.metastore.v1beta.GetFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.GetFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.GetFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.GetFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.GetFederationRequest other) { + if (other == com.google.cloud.metastore.v1beta.GetFederationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore federation to
+     * retrieve, in the following form:
+     * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.GetFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.GetFederationRequest) + private static final com.google.cloud.metastore.v1beta.GetFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.GetFederationRequest(); + } + + public static com.google.cloud.metastore.v1beta.GetFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequestOrBuilder.java new file mode 100644 index 000000000000..ede8eb8237e4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetFederationRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public interface GetFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.GetFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore federation to
+   * retrieve, in the following form:
+   * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequest.java new file mode 100644 index 000000000000..98acb2973518 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.GetMetadataImportRequest} + */ +public final class GetMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.GetMetadataImportRequest) + GetMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetMetadataImportRequest.newBuilder() to construct. + private GetMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetMetadataImportRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.GetMetadataImportRequest.class, com.google.cloud.metastore.v1beta.GetMetadataImportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.GetMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.GetMetadataImportRequest other = (com.google.cloud.metastore.v1beta.GetMetadataImportRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.GetMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.GetMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.GetMetadataImportRequest) + com.google.cloud.metastore.v1beta.GetMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.GetMetadataImportRequest.class, com.google.cloud.metastore.v1beta.GetMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.GetMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.GetMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetMetadataImportRequest build() { + com.google.cloud.metastore.v1beta.GetMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1beta.GetMetadataImportRequest result = new com.google.cloud.metastore.v1beta.GetMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.GetMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.GetMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.GetMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.GetMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1beta.GetMetadataImportRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metadata import to retrieve, in
+     * the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.GetMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.GetMetadataImportRequest) + private static final com.google.cloud.metastore.v1beta.GetMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.GetMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1beta.GetMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..547945b4a252 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetMetadataImportRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface GetMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.GetMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metadata import to retrieve, in
+   * the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequest.java new file mode 100644 index 000000000000..2af5bbf60c95 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequest.java @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.GetService][google.cloud.metastore.v1beta.DataprocMetastore.GetService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.GetServiceRequest} + */ +public final class GetServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.GetServiceRequest) + GetServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetServiceRequest.newBuilder() to construct. + private GetServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetServiceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.GetServiceRequest.class, com.google.cloud.metastore.v1beta.GetServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.GetServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.GetServiceRequest other = (com.google.cloud.metastore.v1beta.GetServiceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.GetServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.GetService][google.cloud.metastore.v1beta.DataprocMetastore.GetService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.GetServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.GetServiceRequest) + com.google.cloud.metastore.v1beta.GetServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.GetServiceRequest.class, com.google.cloud.metastore.v1beta.GetServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.GetServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_GetServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.GetServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetServiceRequest build() { + com.google.cloud.metastore.v1beta.GetServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetServiceRequest buildPartial() { + com.google.cloud.metastore.v1beta.GetServiceRequest result = new com.google.cloud.metastore.v1beta.GetServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.GetServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.GetServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.GetServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.GetServiceRequest other) { + if (other == com.google.cloud.metastore.v1beta.GetServiceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object 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}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to retrieve,
+     * in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.GetServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.GetServiceRequest) + private static final com.google.cloud.metastore.v1beta.GetServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.GetServiceRequest(); + } + + public static com.google.cloud.metastore.v1beta.GetServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.GetServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequestOrBuilder.java new file mode 100644 index 000000000000..aae7a491e9f5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/GetServiceRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface GetServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.GetServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The relative resource name of the metastore service to retrieve,
+   * in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfig.java new file mode 100644 index 000000000000..d46b1868a771 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfig.java @@ -0,0 +1,1872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Specifies configuration information specific to running Hive metastore
+ * software as the metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.HiveMetastoreConfig} + */ +public final class HiveMetastoreConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.HiveMetastoreConfig) + HiveMetastoreConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use HiveMetastoreConfig.newBuilder() to construct. + private HiveMetastoreConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HiveMetastoreConfig() { + version_ = ""; + endpointProtocol_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HiveMetastoreConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + case 5: + return internalGetAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.HiveMetastoreConfig.class, com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder.class); + } + + /** + *
+   * Protocols available for serving the metastore service endpoint.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol} + */ + public enum EndpointProtocol + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The protocol is not set.
+     * 
+ * + * ENDPOINT_PROTOCOL_UNSPECIFIED = 0; + */ + ENDPOINT_PROTOCOL_UNSPECIFIED(0), + /** + *
+     * Use the legacy Apache Thrift protocol for the metastore service endpoint.
+     * 
+ * + * THRIFT = 1; + */ + THRIFT(1), + /** + *
+     * Use the modernized gRPC protocol for the metastore service endpoint.
+     * 
+ * + * GRPC = 2; + */ + GRPC(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The protocol is not set.
+     * 
+ * + * ENDPOINT_PROTOCOL_UNSPECIFIED = 0; + */ + public static final int ENDPOINT_PROTOCOL_UNSPECIFIED_VALUE = 0; + /** + *
+     * Use the legacy Apache Thrift protocol for the metastore service endpoint.
+     * 
+ * + * THRIFT = 1; + */ + public static final int THRIFT_VALUE = 1; + /** + *
+     * Use the modernized gRPC protocol for the metastore service endpoint.
+     * 
+ * + * GRPC = 2; + */ + public static final int GRPC_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EndpointProtocol valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EndpointProtocol forNumber(int value) { + switch (value) { + case 0: return ENDPOINT_PROTOCOL_UNSPECIFIED; + case 1: return THRIFT; + case 2: return GRPC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + EndpointProtocol> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EndpointProtocol findValueByNumber(int number) { + return EndpointProtocol.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final EndpointProtocol[] VALUES = values(); + + public static EndpointProtocol valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EndpointProtocol(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol) + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_OVERRIDES_FIELD_NUMBER = 2; + private static final class ConfigOverridesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_ConfigOverridesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int KERBEROS_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.metastore.v1beta.KerberosConfig kerberosConfig_; + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + @java.lang.Override + public boolean hasKerberosConfig() { + return kerberosConfig_ != null; + } + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.KerberosConfig getKerberosConfig() { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + + public static final int ENDPOINT_PROTOCOL_FIELD_NUMBER = 4; + private int endpointProtocol_ = 0; + /** + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The enum numeric value on the wire for endpointProtocol. + */ + @java.lang.Override public int getEndpointProtocolValue() { + return endpointProtocol_; + } + /** + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The endpointProtocol. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol() { + com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol result = com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.forNumber(endpointProtocol_); + return result == null ? com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED : result; + } + + public static final int AUXILIARY_VERSIONS_FIELD_NUMBER = 5; + private static final class AuxiliaryVersionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliaryVersions_; + private com.google.protobuf.MapField + internalGetAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + return auxiliaryVersions_; + } + public int getAuxiliaryVersionsCount() { + return internalGetAuxiliaryVersions().getMap().size(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public boolean containsAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAuxiliaryVersions().getMap().containsKey(key); + } + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAuxiliaryVersions() { + return getAuxiliaryVersionsMap(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public java.util.Map getAuxiliaryVersionsMap() { + return internalGetAuxiliaryVersions().getMap(); + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetConfigOverrides(), + ConfigOverridesDefaultEntryHolder.defaultEntry, + 2); + if (kerberosConfig_ != null) { + output.writeMessage(3, getKerberosConfig()); + } + if (endpointProtocol_ != com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.ENDPOINT_PROTOCOL_UNSPECIFIED.getNumber()) { + output.writeEnum(4, endpointProtocol_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAuxiliaryVersions(), + AuxiliaryVersionsDefaultEntryHolder.defaultEntry, + 5); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + for (java.util.Map.Entry entry + : internalGetConfigOverrides().getMap().entrySet()) { + com.google.protobuf.MapEntry + configOverrides__ = ConfigOverridesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, configOverrides__); + } + if (kerberosConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getKerberosConfig()); + } + if (endpointProtocol_ != com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.ENDPOINT_PROTOCOL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, endpointProtocol_); + } + for (java.util.Map.Entry entry + : internalGetAuxiliaryVersions().getMap().entrySet()) { + com.google.protobuf.MapEntry + auxiliaryVersions__ = AuxiliaryVersionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, auxiliaryVersions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.HiveMetastoreConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.HiveMetastoreConfig other = (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetConfigOverrides().equals( + other.internalGetConfigOverrides())) return false; + if (hasKerberosConfig() != other.hasKerberosConfig()) return false; + if (hasKerberosConfig()) { + if (!getKerberosConfig() + .equals(other.getKerberosConfig())) return false; + } + if (endpointProtocol_ != other.endpointProtocol_) return false; + if (!internalGetAuxiliaryVersions().equals( + other.internalGetAuxiliaryVersions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetConfigOverrides().getMap().isEmpty()) { + hash = (37 * hash) + CONFIG_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + internalGetConfigOverrides().hashCode(); + } + if (hasKerberosConfig()) { + hash = (37 * hash) + KERBEROS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getKerberosConfig().hashCode(); + } + hash = (37 * hash) + ENDPOINT_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + endpointProtocol_; + if (!internalGetAuxiliaryVersions().getMap().isEmpty()) { + hash = (37 * hash) + AUXILIARY_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAuxiliaryVersions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.HiveMetastoreConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.HiveMetastoreConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.HiveMetastoreConfig) + com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConfigOverrides(); + case 5: + return internalGetAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableConfigOverrides(); + case 5: + return internalGetMutableAuxiliaryVersions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.HiveMetastoreConfig.class, com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.HiveMetastoreConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + internalGetMutableConfigOverrides().clear(); + kerberosConfig_ = null; + if (kerberosConfigBuilder_ != null) { + kerberosConfigBuilder_.dispose(); + kerberosConfigBuilder_ = null; + } + endpointProtocol_ = 0; + internalGetMutableAuxiliaryVersions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfig build() { + com.google.cloud.metastore.v1beta.HiveMetastoreConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfig buildPartial() { + com.google.cloud.metastore.v1beta.HiveMetastoreConfig result = new com.google.cloud.metastore.v1beta.HiveMetastoreConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.HiveMetastoreConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configOverrides_ = internalGetConfigOverrides(); + result.configOverrides_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kerberosConfig_ = kerberosConfigBuilder_ == null + ? kerberosConfig_ + : kerberosConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endpointProtocol_ = endpointProtocol_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.auxiliaryVersions_ = internalGetAuxiliaryVersions(); + result.auxiliaryVersions_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.HiveMetastoreConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.HiveMetastoreConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.HiveMetastoreConfig other) { + if (other == com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableConfigOverrides().mergeFrom( + other.internalGetConfigOverrides()); + bitField0_ |= 0x00000002; + if (other.hasKerberosConfig()) { + mergeKerberosConfig(other.getKerberosConfig()); + } + if (other.endpointProtocol_ != 0) { + setEndpointProtocolValue(other.getEndpointProtocolValue()); + } + internalGetMutableAuxiliaryVersions().mergeFrom( + other.internalGetAuxiliaryVersions()); + bitField0_ |= 0x00000010; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + configOverrides__ = input.readMessage( + ConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableConfigOverrides().getMutableMap().put( + configOverrides__.getKey(), configOverrides__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getKerberosConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + endpointProtocol_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + com.google.protobuf.MapEntry + auxiliaryVersions__ = input.readMessage( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableAuxiliaryVersions().getMutableMap().put( + auxiliaryVersions__.getKey(), auxiliaryVersions__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Immutable. The Hive metastore schema version.
+     * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> configOverrides_; + private com.google.protobuf.MapField + internalGetConfigOverrides() { + if (configOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + return configOverrides_; + } + private com.google.protobuf.MapField + internalGetMutableConfigOverrides() { + if (configOverrides_ == null) { + configOverrides_ = com.google.protobuf.MapField.newMapField( + ConfigOverridesDefaultEntryHolder.defaultEntry); + } + if (!configOverrides_.isMutable()) { + configOverrides_ = configOverrides_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return configOverrides_; + } + public int getConfigOverridesCount() { + return internalGetConfigOverrides().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public boolean containsConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfigOverrides().getMap().containsKey(key); + } + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfigOverrides() { + return getConfigOverridesMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getConfigOverridesMap() { + return internalGetConfigOverrides().getMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getConfigOverridesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearConfigOverrides() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableConfigOverrides().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder removeConfigOverrides( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableConfigOverrides().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableConfigOverrides() { + bitField0_ |= 0x00000002; + return internalGetMutableConfigOverrides().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putConfigOverrides( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableConfigOverrides().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * A mapping of Hive metastore configuration key-value pairs to apply to the
+     * Hive metastore (configured in `hive-site.xml`). The mappings
+     * override system defaults (some keys cannot be overridden). These
+     * overrides are also applied to auxiliary versions and can be further
+     * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+     * 
+ * + * map<string, string> config_overrides = 2; + */ + public Builder putAllConfigOverrides( + java.util.Map values) { + internalGetMutableConfigOverrides().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.cloud.metastore.v1beta.KerberosConfig kerberosConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.KerberosConfig, com.google.cloud.metastore.v1beta.KerberosConfig.Builder, com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder> kerberosConfigBuilder_; + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + public boolean hasKerberosConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + public com.google.cloud.metastore.v1beta.KerberosConfig getKerberosConfig() { + if (kerberosConfigBuilder_ == null) { + return kerberosConfig_ == null ? com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } else { + return kerberosConfigBuilder_.getMessage(); + } + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + public Builder setKerberosConfig(com.google.cloud.metastore.v1beta.KerberosConfig value) { + if (kerberosConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kerberosConfig_ = value; + } else { + kerberosConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + public Builder setKerberosConfig( + com.google.cloud.metastore.v1beta.KerberosConfig.Builder builderForValue) { + if (kerberosConfigBuilder_ == null) { + kerberosConfig_ = builderForValue.build(); + } else { + kerberosConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + public Builder mergeKerberosConfig(com.google.cloud.metastore.v1beta.KerberosConfig value) { + if (kerberosConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + kerberosConfig_ != null && + kerberosConfig_ != com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance()) { + getKerberosConfigBuilder().mergeFrom(value); + } else { + kerberosConfig_ = value; + } + } else { + kerberosConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + public Builder clearKerberosConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + kerberosConfig_ = null; + if (kerberosConfigBuilder_ != null) { + kerberosConfigBuilder_.dispose(); + kerberosConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + public com.google.cloud.metastore.v1beta.KerberosConfig.Builder getKerberosConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getKerberosConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + public com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { + if (kerberosConfigBuilder_ != null) { + return kerberosConfigBuilder_.getMessageOrBuilder(); + } else { + return kerberosConfig_ == null ? + com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance() : kerberosConfig_; + } + } + /** + *
+     * Information used to configure the Hive metastore service as a service
+     * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+     * method and specify this field's path
+     * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+     * while omitting this field from the request's `service`.
+     * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.KerberosConfig, com.google.cloud.metastore.v1beta.KerberosConfig.Builder, com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder> + getKerberosConfigFieldBuilder() { + if (kerberosConfigBuilder_ == null) { + kerberosConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.KerberosConfig, com.google.cloud.metastore.v1beta.KerberosConfig.Builder, com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder>( + getKerberosConfig(), + getParentForChildren(), + isClean()); + kerberosConfig_ = null; + } + return kerberosConfigBuilder_; + } + + private int endpointProtocol_ = 0; + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The enum numeric value on the wire for endpointProtocol. + */ + @java.lang.Override public int getEndpointProtocolValue() { + return endpointProtocol_; + } + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @param value The enum numeric value on the wire for endpointProtocol to set. + * @return This builder for chaining. + */ + public Builder setEndpointProtocolValue(int value) { + endpointProtocol_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The endpointProtocol. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol() { + com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol result = com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.forNumber(endpointProtocol_); + return result == null ? com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED : result; + } + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @param value The endpointProtocol to set. + * @return This builder for chaining. + */ + public Builder setEndpointProtocol(com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + endpointProtocol_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return This builder for chaining. + */ + public Builder clearEndpointProtocol() { + bitField0_ = (bitField0_ & ~0x00000008); + endpointProtocol_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliaryVersions_; + private com.google.protobuf.MapField + internalGetAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + return auxiliaryVersions_; + } + private com.google.protobuf.MapField + internalGetMutableAuxiliaryVersions() { + if (auxiliaryVersions_ == null) { + auxiliaryVersions_ = com.google.protobuf.MapField.newMapField( + AuxiliaryVersionsDefaultEntryHolder.defaultEntry); + } + if (!auxiliaryVersions_.isMutable()) { + auxiliaryVersions_ = auxiliaryVersions_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return auxiliaryVersions_; + } + public int getAuxiliaryVersionsCount() { + return internalGetAuxiliaryVersions().getMap().size(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public boolean containsAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAuxiliaryVersions().getMap().containsKey(key); + } + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAuxiliaryVersions() { + return getAuxiliaryVersionsMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public java.util.Map getAuxiliaryVersionsMap() { + return internalGetAuxiliaryVersions().getMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public /* nullable */ +com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAuxiliaryVersions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearAuxiliaryVersions() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAuxiliaryVersions().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder removeAuxiliaryVersions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableAuxiliaryVersions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAuxiliaryVersions() { + bitField0_ |= 0x00000010; + return internalGetMutableAuxiliaryVersions().getMutableMap(); + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder putAuxiliaryVersions( + java.lang.String key, + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableAuxiliaryVersions().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * A mapping of Hive metastore version to the auxiliary version
+     * configuration. When specified, a secondary Hive metastore service is
+     * created along with the primary service. All auxiliary versions must be less
+     * than the service's primary version. The key is the auxiliary service name
+     * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+     * means that the first character must be a lowercase letter, and all the
+     * following characters must be hyphens, lowercase letters, or digits, except
+     * the last character, which cannot be a hyphen.
+     * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + public Builder putAllAuxiliaryVersions( + java.util.Map values) { + internalGetMutableAuxiliaryVersions().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.HiveMetastoreConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.HiveMetastoreConfig) + private static final com.google.cloud.metastore.v1beta.HiveMetastoreConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.HiveMetastoreConfig(); + } + + public static com.google.cloud.metastore.v1beta.HiveMetastoreConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HiveMetastoreConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfigOrBuilder.java new file mode 100644 index 000000000000..efc2b272bf2b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/HiveMetastoreConfigOrBuilder.java @@ -0,0 +1,252 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface HiveMetastoreConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.HiveMetastoreConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Immutable. The Hive metastore schema version.
+   * 
+ * + * string version = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + int getConfigOverridesCount(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + boolean containsConfigOverrides( + java.lang.String key); + /** + * Use {@link #getConfigOverridesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getConfigOverrides(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.util.Map + getConfigOverridesMap(); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + /* nullable */ +java.lang.String getConfigOverridesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * A mapping of Hive metastore configuration key-value pairs to apply to the
+   * Hive metastore (configured in `hive-site.xml`). The mappings
+   * override system defaults (some keys cannot be overridden). These
+   * overrides are also applied to auxiliary versions and can be further
+   * customized in the auxiliary version's `AuxiliaryVersionConfig`.
+   * 
+ * + * map<string, string> config_overrides = 2; + */ + java.lang.String getConfigOverridesOrThrow( + java.lang.String key); + + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + * @return Whether the kerberosConfig field is set. + */ + boolean hasKerberosConfig(); + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + * @return The kerberosConfig. + */ + com.google.cloud.metastore.v1beta.KerberosConfig getKerberosConfig(); + /** + *
+   * Information used to configure the Hive metastore service as a service
+   * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
+   * method and specify this field's path
+   * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
+   * while omitting this field from the request's `service`.
+   * 
+ * + * .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3; + */ + com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); + + /** + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The enum numeric value on the wire for endpointProtocol. + */ + int getEndpointProtocolValue(); + /** + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * @return The endpointProtocol. + */ + com.google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol(); + + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + int getAuxiliaryVersionsCount(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + boolean containsAuxiliaryVersions( + java.lang.String key); + /** + * Use {@link #getAuxiliaryVersionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAuxiliaryVersions(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + java.util.Map + getAuxiliaryVersionsMap(); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + /* nullable */ +com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig defaultValue); + /** + *
+   * A mapping of Hive metastore version to the auxiliary version
+   * configuration. When specified, a secondary Hive metastore service is
+   * created along with the primary service. All auxiliary versions must be less
+   * than the service's primary version. The key is the auxiliary service name
+   * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
+   * means that the first character must be a lowercase letter, and all the
+   * following characters must be hyphens, lowercase letters, or digits, except
+   * the last character, which cannot be a hyphen.
+   * 
+ * + * map<string, .google.cloud.metastore.v1beta.AuxiliaryVersionConfig> auxiliary_versions = 5; + */ + com.google.cloud.metastore.v1beta.AuxiliaryVersionConfig getAuxiliaryVersionsOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfig.java new file mode 100644 index 000000000000..ebd2496791b8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfig.java @@ -0,0 +1,1013 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Configuration information for a Kerberos principal.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.KerberosConfig} + */ +public final class KerberosConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.KerberosConfig) + KerberosConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use KerberosConfig.newBuilder() to construct. + private KerberosConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KerberosConfig() { + principal_ = ""; + krb5ConfigGcsUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KerberosConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_KerberosConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_KerberosConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.KerberosConfig.class, com.google.cloud.metastore.v1beta.KerberosConfig.Builder.class); + } + + public static final int KEYTAB_FIELD_NUMBER = 1; + private com.google.cloud.metastore.v1beta.Secret keytab_; + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + @java.lang.Override + public boolean hasKeytab() { + return keytab_ != null; + } + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + * @return The keytab. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Secret getKeytab() { + return keytab_ == null ? com.google.cloud.metastore.v1beta.Secret.getDefaultInstance() : keytab_; + } + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.SecretOrBuilder getKeytabOrBuilder() { + return keytab_ == null ? com.google.cloud.metastore.v1beta.Secret.getDefaultInstance() : keytab_; + } + + public static final int PRINCIPAL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object principal_ = ""; + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The principal. + */ + @java.lang.Override + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } + } + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KRB5_CONFIG_GCS_URI_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object krb5ConfigGcsUri_ = ""; + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + @java.lang.Override + public java.lang.String getKrb5ConfigGcsUri() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + krb5ConfigGcsUri_ = s; + return s; + } + } + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + krb5ConfigGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (keytab_ != null) { + output.writeMessage(1, getKeytab()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, principal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, krb5ConfigGcsUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (keytab_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getKeytab()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principal_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, principal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(krb5ConfigGcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, krb5ConfigGcsUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.KerberosConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.KerberosConfig other = (com.google.cloud.metastore.v1beta.KerberosConfig) obj; + + if (hasKeytab() != other.hasKeytab()) return false; + if (hasKeytab()) { + if (!getKeytab() + .equals(other.getKeytab())) return false; + } + if (!getPrincipal() + .equals(other.getPrincipal())) return false; + if (!getKrb5ConfigGcsUri() + .equals(other.getKrb5ConfigGcsUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeytab()) { + hash = (37 * hash) + KEYTAB_FIELD_NUMBER; + hash = (53 * hash) + getKeytab().hashCode(); + } + hash = (37 * hash) + PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipal().hashCode(); + hash = (37 * hash) + KRB5_CONFIG_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getKrb5ConfigGcsUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.KerberosConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.KerberosConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration information for a Kerberos principal.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.KerberosConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.KerberosConfig) + com.google.cloud.metastore.v1beta.KerberosConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_KerberosConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_KerberosConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.KerberosConfig.class, com.google.cloud.metastore.v1beta.KerberosConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.KerberosConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keytab_ = null; + if (keytabBuilder_ != null) { + keytabBuilder_.dispose(); + keytabBuilder_ = null; + } + principal_ = ""; + krb5ConfigGcsUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_KerberosConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.KerberosConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.KerberosConfig build() { + com.google.cloud.metastore.v1beta.KerberosConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.KerberosConfig buildPartial() { + com.google.cloud.metastore.v1beta.KerberosConfig result = new com.google.cloud.metastore.v1beta.KerberosConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.KerberosConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keytab_ = keytabBuilder_ == null + ? keytab_ + : keytabBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.principal_ = principal_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.krb5ConfigGcsUri_ = krb5ConfigGcsUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.KerberosConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.KerberosConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.KerberosConfig other) { + if (other == com.google.cloud.metastore.v1beta.KerberosConfig.getDefaultInstance()) return this; + if (other.hasKeytab()) { + mergeKeytab(other.getKeytab()); + } + if (!other.getPrincipal().isEmpty()) { + principal_ = other.principal_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getKrb5ConfigGcsUri().isEmpty()) { + krb5ConfigGcsUri_ = other.krb5ConfigGcsUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getKeytabFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + principal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + krb5ConfigGcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.cloud.metastore.v1beta.Secret keytab_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Secret, com.google.cloud.metastore.v1beta.Secret.Builder, com.google.cloud.metastore.v1beta.SecretOrBuilder> keytabBuilder_; + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + public boolean hasKeytab() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + * @return The keytab. + */ + public com.google.cloud.metastore.v1beta.Secret getKeytab() { + if (keytabBuilder_ == null) { + return keytab_ == null ? com.google.cloud.metastore.v1beta.Secret.getDefaultInstance() : keytab_; + } else { + return keytabBuilder_.getMessage(); + } + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + public Builder setKeytab(com.google.cloud.metastore.v1beta.Secret value) { + if (keytabBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keytab_ = value; + } else { + keytabBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + public Builder setKeytab( + com.google.cloud.metastore.v1beta.Secret.Builder builderForValue) { + if (keytabBuilder_ == null) { + keytab_ = builderForValue.build(); + } else { + keytabBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + public Builder mergeKeytab(com.google.cloud.metastore.v1beta.Secret value) { + if (keytabBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + keytab_ != null && + keytab_ != com.google.cloud.metastore.v1beta.Secret.getDefaultInstance()) { + getKeytabBuilder().mergeFrom(value); + } else { + keytab_ = value; + } + } else { + keytabBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + public Builder clearKeytab() { + bitField0_ = (bitField0_ & ~0x00000001); + keytab_ = null; + if (keytabBuilder_ != null) { + keytabBuilder_.dispose(); + keytabBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + public com.google.cloud.metastore.v1beta.Secret.Builder getKeytabBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeytabFieldBuilder().getBuilder(); + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + public com.google.cloud.metastore.v1beta.SecretOrBuilder getKeytabOrBuilder() { + if (keytabBuilder_ != null) { + return keytabBuilder_.getMessageOrBuilder(); + } else { + return keytab_ == null ? + com.google.cloud.metastore.v1beta.Secret.getDefaultInstance() : keytab_; + } + } + /** + *
+     * A Kerberos keytab file that can be used to authenticate a service principal
+     * with a Kerberos Key Distribution Center (KDC).
+     * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Secret, com.google.cloud.metastore.v1beta.Secret.Builder, com.google.cloud.metastore.v1beta.SecretOrBuilder> + getKeytabFieldBuilder() { + if (keytabBuilder_ == null) { + keytabBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Secret, com.google.cloud.metastore.v1beta.Secret.Builder, com.google.cloud.metastore.v1beta.SecretOrBuilder>( + getKeytab(), + getParentForChildren(), + isClean()); + keytab_ = null; + } + return keytabBuilder_; + } + + private java.lang.Object principal_ = ""; + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return The principal. + */ + public java.lang.String getPrincipal() { + java.lang.Object ref = principal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + public com.google.protobuf.ByteString + getPrincipalBytes() { + java.lang.Object ref = principal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @param value The principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipal( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + principal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @return This builder for chaining. + */ + public Builder clearPrincipal() { + principal_ = getDefaultInstance().getPrincipal(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A Kerberos principal that exists in the both the keytab the KDC
+     * to authenticate as. A typical principal is of the form
+     * `primary/instance@REALM`, but there is no exact format.
+     * 
+ * + * string principal = 2; + * @param value The bytes for principal to set. + * @return This builder for chaining. + */ + public Builder setPrincipalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + principal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object krb5ConfigGcsUri_ = ""; + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + public java.lang.String getKrb5ConfigGcsUri() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + krb5ConfigGcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + public com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes() { + java.lang.Object ref = krb5ConfigGcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + krb5ConfigGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @param value The krb5ConfigGcsUri to set. + * @return This builder for chaining. + */ + public Builder setKrb5ConfigGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + krb5ConfigGcsUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @return This builder for chaining. + */ + public Builder clearKrb5ConfigGcsUri() { + krb5ConfigGcsUri_ = getDefaultInstance().getKrb5ConfigGcsUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A Cloud Storage URI that specifies the path to a
+     * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+     * although the file does not need to be named krb5.conf explicitly.
+     * 
+ * + * string krb5_config_gcs_uri = 3; + * @param value The bytes for krb5ConfigGcsUri to set. + * @return This builder for chaining. + */ + public Builder setKrb5ConfigGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + krb5ConfigGcsUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.KerberosConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.KerberosConfig) + private static final com.google.cloud.metastore.v1beta.KerberosConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.KerberosConfig(); + } + + public static com.google.cloud.metastore.v1beta.KerberosConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KerberosConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.KerberosConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfigOrBuilder.java new file mode 100644 index 000000000000..16a44973e203 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/KerberosConfigOrBuilder.java @@ -0,0 +1,87 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface KerberosConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.KerberosConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + * @return Whether the keytab field is set. + */ + boolean hasKeytab(); + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + * @return The keytab. + */ + com.google.cloud.metastore.v1beta.Secret getKeytab(); + /** + *
+   * A Kerberos keytab file that can be used to authenticate a service principal
+   * with a Kerberos Key Distribution Center (KDC).
+   * 
+ * + * .google.cloud.metastore.v1beta.Secret keytab = 1; + */ + com.google.cloud.metastore.v1beta.SecretOrBuilder getKeytabOrBuilder(); + + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The principal. + */ + java.lang.String getPrincipal(); + /** + *
+   * A Kerberos principal that exists in the both the keytab the KDC
+   * to authenticate as. A typical principal is of the form
+   * `primary/instance@REALM`, but there is no exact format.
+   * 
+ * + * string principal = 2; + * @return The bytes for principal. + */ + com.google.protobuf.ByteString + getPrincipalBytes(); + + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The krb5ConfigGcsUri. + */ + java.lang.String getKrb5ConfigGcsUri(); + /** + *
+   * A Cloud Storage URI that specifies the path to a
+   * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
+   * although the file does not need to be named krb5.conf explicitly.
+   * 
+ * + * string krb5_config_gcs_uri = 3; + * @return The bytes for krb5ConfigGcsUri. + */ + com.google.protobuf.ByteString + getKrb5ConfigGcsUriBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Lake.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Lake.java new file mode 100644 index 000000000000..47caf66997de --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Lake.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Represents a Lake resource
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Lake} + */ +public final class Lake extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Lake) + LakeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Lake.newBuilder() to construct. + private Lake(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Lake() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Lake(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Lake_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Lake_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Lake.class, com.google.cloud.metastore.v1beta.Lake.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The Lake resource name.
+   * Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The Lake resource name.
+   * Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.Lake)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.Lake other = (com.google.cloud.metastore.v1beta.Lake) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.Lake parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Lake parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Lake parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Lake parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.Lake prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a Lake resource
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Lake} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Lake) + com.google.cloud.metastore.v1beta.LakeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Lake_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Lake_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Lake.class, com.google.cloud.metastore.v1beta.Lake.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.Lake.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Lake_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Lake getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.Lake.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Lake build() { + com.google.cloud.metastore.v1beta.Lake result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Lake buildPartial() { + com.google.cloud.metastore.v1beta.Lake result = new com.google.cloud.metastore.v1beta.Lake(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.Lake result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.Lake) { + return mergeFrom((com.google.cloud.metastore.v1beta.Lake)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.Lake other) { + if (other == com.google.cloud.metastore.v1beta.Lake.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The Lake resource name.
+     * Example:
+     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+     * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Lake) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Lake) + private static final com.google.cloud.metastore.v1beta.Lake DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Lake(); + } + + public static com.google.cloud.metastore.v1beta.Lake getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Lake parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Lake getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LakeOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LakeOrBuilder.java new file mode 100644 index 000000000000..22e3554a02a4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LakeOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface LakeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Lake) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Lake resource name.
+   * Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The Lake resource name.
+   * Example:
+   * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+   * 
+ * + * string name = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequest.java new file mode 100644 index 000000000000..9fafa35d5cfe --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequest.java @@ -0,0 +1,1234 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListBackupsRequest} + */ +public final class ListBackupsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListBackupsRequest) + ListBackupsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListBackupsRequest.newBuilder() to construct. + private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListBackupsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListBackupsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListBackupsRequest.class, com.google.cloud.metastore.v1beta.ListBackupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of backups to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 backups are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ListBackupsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ListBackupsRequest other = (com.google.cloud.metastore.v1beta.ListBackupsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListBackupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListBackupsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListBackupsRequest) + com.google.cloud.metastore.v1beta.ListBackupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListBackupsRequest.class, com.google.cloud.metastore.v1beta.ListBackupsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ListBackupsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListBackupsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ListBackupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListBackupsRequest build() { + com.google.cloud.metastore.v1beta.ListBackupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListBackupsRequest buildPartial() { + com.google.cloud.metastore.v1beta.ListBackupsRequest result = new com.google.cloud.metastore.v1beta.ListBackupsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ListBackupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ListBackupsRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.ListBackupsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListBackupsRequest other) { + if (other == com.google.cloud.metastore.v1beta.ListBackupsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose backups to
+     * list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of backups to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 backups are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListBackupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListBackupsRequest) + private static final com.google.cloud.metastore.v1beta.ListBackupsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListBackupsRequest(); + } + + public static com.google.cloud.metastore.v1beta.ListBackupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListBackupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequestOrBuilder.java new file mode 100644 index 000000000000..f786541984d2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsRequestOrBuilder.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ListBackupsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListBackupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service whose backups to
+   * list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of backups to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 backups are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponse.java new file mode 100644 index 000000000000..e5675b40ceb5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListBackupsResponse} + */ +public final class ListBackupsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListBackupsResponse) + ListBackupsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListBackupsResponse.newBuilder() to construct. + private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListBackupsResponse() { + backups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListBackupsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListBackupsResponse.class, com.google.cloud.metastore.v1beta.ListBackupsResponse.Builder.class); + } + + public static final int BACKUPS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List backups_; + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + @java.lang.Override + public java.util.List getBackupsList() { + return backups_; + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + @java.lang.Override + public java.util.List + getBackupsOrBuilderList() { + return backups_; + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + @java.lang.Override + public int getBackupsCount() { + return backups_.size(); + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Backup getBackups(int index) { + return backups_.get(index); + } + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupsOrBuilder( + int index) { + return backups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < backups_.size(); i++) { + output.writeMessage(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < backups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ListBackupsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ListBackupsResponse other = (com.google.cloud.metastore.v1beta.ListBackupsResponse) obj; + + if (!getBackupsList() + .equals(other.getBackupsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBackupsCount() > 0) { + hash = (37 * hash) + BACKUPS_FIELD_NUMBER; + hash = (53 * hash) + getBackupsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListBackupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListBackupsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListBackupsResponse) + com.google.cloud.metastore.v1beta.ListBackupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListBackupsResponse.class, com.google.cloud.metastore.v1beta.ListBackupsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ListBackupsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + } else { + backups_ = null; + backupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListBackupsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ListBackupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListBackupsResponse build() { + com.google.cloud.metastore.v1beta.ListBackupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListBackupsResponse buildPartial() { + com.google.cloud.metastore.v1beta.ListBackupsResponse result = new com.google.cloud.metastore.v1beta.ListBackupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.ListBackupsResponse result) { + if (backupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backups_ = java.util.Collections.unmodifiableList(backups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backups_ = backups_; + } else { + result.backups_ = backupsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ListBackupsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ListBackupsResponse) { + return mergeFrom((com.google.cloud.metastore.v1beta.ListBackupsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListBackupsResponse other) { + if (other == com.google.cloud.metastore.v1beta.ListBackupsResponse.getDefaultInstance()) return this; + if (backupsBuilder_ == null) { + if (!other.backups_.isEmpty()) { + if (backups_.isEmpty()) { + backups_ = other.backups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupsIsMutable(); + backups_.addAll(other.backups_); + } + onChanged(); + } + } else { + if (!other.backups_.isEmpty()) { + if (backupsBuilder_.isEmpty()) { + backupsBuilder_.dispose(); + backupsBuilder_ = null; + backups_ = other.backups_; + bitField0_ = (bitField0_ & ~0x00000001); + backupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBackupsFieldBuilder() : null; + } else { + backupsBuilder_.addAllMessages(other.backups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1beta.Backup m = + input.readMessage( + com.google.cloud.metastore.v1beta.Backup.parser(), + extensionRegistry); + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(m); + } else { + backupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List backups_ = + java.util.Collections.emptyList(); + private void ensureBackupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backups_ = new java.util.ArrayList(backups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Backup, com.google.cloud.metastore.v1beta.Backup.Builder, com.google.cloud.metastore.v1beta.BackupOrBuilder> backupsBuilder_; + + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public java.util.List getBackupsList() { + if (backupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backups_); + } else { + return backupsBuilder_.getMessageList(); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public int getBackupsCount() { + if (backupsBuilder_ == null) { + return backups_.size(); + } else { + return backupsBuilder_.getCount(); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public com.google.cloud.metastore.v1beta.Backup getBackups(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessage(index); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.metastore.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.set(index, value); + onChanged(); + } else { + backupsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.metastore.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.set(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.metastore.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(value); + onChanged(); + } else { + backupsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.metastore.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(index, value); + onChanged(); + } else { + backupsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder addBackups( + com.google.cloud.metastore.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.metastore.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder addAllBackups( + java.lang.Iterable values) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, backups_); + onChanged(); + } else { + backupsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder clearBackups() { + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupsBuilder_.clear(); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public Builder removeBackups(int index) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.remove(index); + onChanged(); + } else { + backupsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public com.google.cloud.metastore.v1beta.Backup.Builder getBackupsBuilder( + int index) { + return getBackupsFieldBuilder().getBuilder(index); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupsOrBuilder( + int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); } else { + return backupsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public java.util.List + getBackupsOrBuilderList() { + if (backupsBuilder_ != null) { + return backupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backups_); + } + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public com.google.cloud.metastore.v1beta.Backup.Builder addBackupsBuilder() { + return getBackupsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1beta.Backup.getDefaultInstance()); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public com.google.cloud.metastore.v1beta.Backup.Builder addBackupsBuilder( + int index) { + return getBackupsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1beta.Backup.getDefaultInstance()); + } + /** + *
+     * The backups of the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + public java.util.List + getBackupsBuilderList() { + return getBackupsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Backup, com.google.cloud.metastore.v1beta.Backup.Builder, com.google.cloud.metastore.v1beta.BackupOrBuilder> + getBackupsFieldBuilder() { + if (backupsBuilder_ == null) { + backupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Backup, com.google.cloud.metastore.v1beta.Backup.Builder, com.google.cloud.metastore.v1beta.BackupOrBuilder>( + backups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + backups_ = null; + } + return backupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListBackupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListBackupsResponse) + private static final com.google.cloud.metastore.v1beta.ListBackupsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListBackupsResponse(); + } + + public static com.google.cloud.metastore.v1beta.ListBackupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListBackupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponseOrBuilder.java new file mode 100644 index 000000000000..7ab45c9be4c9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListBackupsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ListBackupsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListBackupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + java.util.List + getBackupsList(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + com.google.cloud.metastore.v1beta.Backup getBackups(int index); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + int getBackupsCount(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + java.util.List + getBackupsOrBuilderList(); + /** + *
+   * The backups of the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Backup backups = 1; + */ + com.google.cloud.metastore.v1beta.BackupOrBuilder getBackupsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequest.java new file mode 100644 index 000000000000..dffd018d24d9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequest.java @@ -0,0 +1,1229 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for ListFederations.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListFederationsRequest} + */ +public final class ListFederationsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListFederationsRequest) + ListFederationsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFederationsRequest.newBuilder() to construct. + private ListFederationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFederationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFederationsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListFederationsRequest.class, com.google.cloud.metastore.v1beta.ListFederationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of federations to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ListFederationsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ListFederationsRequest other = (com.google.cloud.metastore.v1beta.ListFederationsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListFederationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListFederationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListFederations.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListFederationsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListFederationsRequest) + com.google.cloud.metastore.v1beta.ListFederationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListFederationsRequest.class, com.google.cloud.metastore.v1beta.ListFederationsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ListFederationsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListFederationsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ListFederationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListFederationsRequest build() { + com.google.cloud.metastore.v1beta.ListFederationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListFederationsRequest buildPartial() { + com.google.cloud.metastore.v1beta.ListFederationsRequest result = new com.google.cloud.metastore.v1beta.ListFederationsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ListFederationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ListFederationsRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.ListFederationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListFederationsRequest other) { + if (other == com.google.cloud.metastore.v1beta.ListFederationsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore
+     * federations to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of federations to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous ListFederationServices
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * ListFederationServices must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListFederationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListFederationsRequest) + private static final com.google.cloud.metastore.v1beta.ListFederationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListFederationsRequest(); + } + + public static com.google.cloud.metastore.v1beta.ListFederationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFederationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListFederationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequestOrBuilder.java new file mode 100644 index 000000000000..6983e2495abf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsRequestOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public interface ListFederationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListFederationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location of metastore
+   * federations to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of federations to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous ListFederationServices
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * ListFederationServices must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponse.java new file mode 100644 index 000000000000..04666249e870 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponse.java @@ -0,0 +1,1266 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Response message for ListFederations
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListFederationsResponse} + */ +public final class ListFederationsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListFederationsResponse) + ListFederationsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFederationsResponse.newBuilder() to construct. + private ListFederationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFederationsResponse() { + federations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFederationsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListFederationsResponse.class, com.google.cloud.metastore.v1beta.ListFederationsResponse.Builder.class); + } + + public static final int FEDERATIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List federations_; + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + @java.lang.Override + public java.util.List getFederationsList() { + return federations_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + @java.lang.Override + public java.util.List + getFederationsOrBuilderList() { + return federations_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + @java.lang.Override + public int getFederationsCount() { + return federations_.size(); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Federation getFederations(int index) { + return federations_.get(index); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationsOrBuilder( + int index) { + return federations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < federations_.size(); i++) { + output.writeMessage(1, federations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < federations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, federations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ListFederationsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ListFederationsResponse other = (com.google.cloud.metastore.v1beta.ListFederationsResponse) obj; + + if (!getFederationsList() + .equals(other.getFederationsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFederationsCount() > 0) { + hash = (37 * hash) + FEDERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFederationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListFederationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListFederationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListFederations
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListFederationsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListFederationsResponse) + com.google.cloud.metastore.v1beta.ListFederationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListFederationsResponse.class, com.google.cloud.metastore.v1beta.ListFederationsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ListFederationsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (federationsBuilder_ == null) { + federations_ = java.util.Collections.emptyList(); + } else { + federations_ = null; + federationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListFederationsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ListFederationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListFederationsResponse build() { + com.google.cloud.metastore.v1beta.ListFederationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListFederationsResponse buildPartial() { + com.google.cloud.metastore.v1beta.ListFederationsResponse result = new com.google.cloud.metastore.v1beta.ListFederationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.ListFederationsResponse result) { + if (federationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + federations_ = java.util.Collections.unmodifiableList(federations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.federations_ = federations_; + } else { + result.federations_ = federationsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ListFederationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ListFederationsResponse) { + return mergeFrom((com.google.cloud.metastore.v1beta.ListFederationsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListFederationsResponse other) { + if (other == com.google.cloud.metastore.v1beta.ListFederationsResponse.getDefaultInstance()) return this; + if (federationsBuilder_ == null) { + if (!other.federations_.isEmpty()) { + if (federations_.isEmpty()) { + federations_ = other.federations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFederationsIsMutable(); + federations_.addAll(other.federations_); + } + onChanged(); + } + } else { + if (!other.federations_.isEmpty()) { + if (federationsBuilder_.isEmpty()) { + federationsBuilder_.dispose(); + federationsBuilder_ = null; + federations_ = other.federations_; + bitField0_ = (bitField0_ & ~0x00000001); + federationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFederationsFieldBuilder() : null; + } else { + federationsBuilder_.addAllMessages(other.federations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1beta.Federation m = + input.readMessage( + com.google.cloud.metastore.v1beta.Federation.parser(), + extensionRegistry); + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(m); + } else { + federationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List federations_ = + java.util.Collections.emptyList(); + private void ensureFederationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + federations_ = new java.util.ArrayList(federations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder> federationsBuilder_; + + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public java.util.List getFederationsList() { + if (federationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(federations_); + } else { + return federationsBuilder_.getMessageList(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public int getFederationsCount() { + if (federationsBuilder_ == null) { + return federations_.size(); + } else { + return federationsBuilder_.getCount(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public com.google.cloud.metastore.v1beta.Federation getFederations(int index) { + if (federationsBuilder_ == null) { + return federations_.get(index); + } else { + return federationsBuilder_.getMessage(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder setFederations( + int index, com.google.cloud.metastore.v1beta.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.set(index, value); + onChanged(); + } else { + federationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder setFederations( + int index, com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.set(index, builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder addFederations(com.google.cloud.metastore.v1beta.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.add(value); + onChanged(); + } else { + federationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder addFederations( + int index, com.google.cloud.metastore.v1beta.Federation value) { + if (federationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFederationsIsMutable(); + federations_.add(index, value); + onChanged(); + } else { + federationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder addFederations( + com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder addFederations( + int index, com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.add(index, builderForValue.build()); + onChanged(); + } else { + federationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder addAllFederations( + java.lang.Iterable values) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, federations_); + onChanged(); + } else { + federationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder clearFederations() { + if (federationsBuilder_ == null) { + federations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + federationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public Builder removeFederations(int index) { + if (federationsBuilder_ == null) { + ensureFederationsIsMutable(); + federations_.remove(index); + onChanged(); + } else { + federationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public com.google.cloud.metastore.v1beta.Federation.Builder getFederationsBuilder( + int index) { + return getFederationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationsOrBuilder( + int index) { + if (federationsBuilder_ == null) { + return federations_.get(index); } else { + return federationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public java.util.List + getFederationsOrBuilderList() { + if (federationsBuilder_ != null) { + return federationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(federations_); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public com.google.cloud.metastore.v1beta.Federation.Builder addFederationsBuilder() { + return getFederationsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public com.google.cloud.metastore.v1beta.Federation.Builder addFederationsBuilder( + int index) { + return getFederationsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + public java.util.List + getFederationsBuilderList() { + return getFederationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder> + getFederationsFieldBuilder() { + if (federationsBuilder_ == null) { + federationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder>( + federations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + federations_ = null; + } + return federationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListFederationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListFederationsResponse) + private static final com.google.cloud.metastore.v1beta.ListFederationsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListFederationsResponse(); + } + + public static com.google.cloud.metastore.v1beta.ListFederationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFederationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListFederationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponseOrBuilder.java new file mode 100644 index 000000000000..75070e955acb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListFederationsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public interface ListFederationsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListFederationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + java.util.List + getFederationsList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + com.google.cloud.metastore.v1beta.Federation getFederations(int index); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + int getFederationsCount(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + java.util.List + getFederationsOrBuilderList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Federation federations = 1; + */ + com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequest.java new file mode 100644 index 000000000000..fb5cbbc8ef4c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequest.java @@ -0,0 +1,1234 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListMetadataImportsRequest} + */ +public final class ListMetadataImportsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListMetadataImportsRequest) + ListMetadataImportsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListMetadataImportsRequest.newBuilder() to construct. + private ListMetadataImportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListMetadataImportsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListMetadataImportsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.class, com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of imports to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 imports are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ListMetadataImportsRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ListMetadataImportsRequest other = (com.google.cloud.metastore.v1beta.ListMetadataImportsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListMetadataImportsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListMetadataImportsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListMetadataImportsRequest) + com.google.cloud.metastore.v1beta.ListMetadataImportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.class, com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListMetadataImportsRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListMetadataImportsRequest build() { + com.google.cloud.metastore.v1beta.ListMetadataImportsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListMetadataImportsRequest buildPartial() { + com.google.cloud.metastore.v1beta.ListMetadataImportsRequest result = new com.google.cloud.metastore.v1beta.ListMetadataImportsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ListMetadataImportsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ListMetadataImportsRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.ListMetadataImportsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListMetadataImportsRequest other) { + if (other == com.google.cloud.metastore.v1beta.ListMetadataImportsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the service whose metadata imports
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of imports to return. The response may contain
+     * less than the maximum number. If unspecified, no more than 500 imports are
+     * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListMetadataImportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListMetadataImportsRequest) + private static final com.google.cloud.metastore.v1beta.ListMetadataImportsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListMetadataImportsRequest(); + } + + public static com.google.cloud.metastore.v1beta.ListMetadataImportsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMetadataImportsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListMetadataImportsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequestOrBuilder.java new file mode 100644 index 000000000000..8cca32b36115 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsRequestOrBuilder.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ListMetadataImportsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListMetadataImportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the service whose metadata imports
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of imports to return. The response may contain
+   * less than the maximum number. If unspecified, no more than 500 imports are
+   * returned. The maximum value is 1000; values above 1000 are changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponse.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponse.java new file mode 100644 index 000000000000..5a96f36a7a66 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListMetadataImportsResponse} + */ +public final class ListMetadataImportsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListMetadataImportsResponse) + ListMetadataImportsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListMetadataImportsResponse.newBuilder() to construct. + private ListMetadataImportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListMetadataImportsResponse() { + metadataImports_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListMetadataImportsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.class, com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.Builder.class); + } + + public static final int METADATA_IMPORTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List metadataImports_; + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public java.util.List getMetadataImportsList() { + return metadataImports_; + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public java.util.List + getMetadataImportsOrBuilderList() { + return metadataImports_; + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public int getMetadataImportsCount() { + return metadataImports_.size(); + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImports(int index) { + return metadataImports_.get(index); + } + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index) { + return metadataImports_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < metadataImports_.size(); i++) { + output.writeMessage(1, metadataImports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < metadataImports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metadataImports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ListMetadataImportsResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ListMetadataImportsResponse other = (com.google.cloud.metastore.v1beta.ListMetadataImportsResponse) obj; + + if (!getMetadataImportsList() + .equals(other.getMetadataImportsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMetadataImportsCount() > 0) { + hash = (37 * hash) + METADATA_IMPORTS_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImportsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListMetadataImportsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListMetadataImportsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListMetadataImportsResponse) + com.google.cloud.metastore.v1beta.ListMetadataImportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.class, com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (metadataImportsBuilder_ == null) { + metadataImports_ = java.util.Collections.emptyList(); + } else { + metadataImports_ = null; + metadataImportsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse build() { + com.google.cloud.metastore.v1beta.ListMetadataImportsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse buildPartial() { + com.google.cloud.metastore.v1beta.ListMetadataImportsResponse result = new com.google.cloud.metastore.v1beta.ListMetadataImportsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.ListMetadataImportsResponse result) { + if (metadataImportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metadataImports_ = java.util.Collections.unmodifiableList(metadataImports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metadataImports_ = metadataImports_; + } else { + result.metadataImports_ = metadataImportsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ListMetadataImportsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ListMetadataImportsResponse) { + return mergeFrom((com.google.cloud.metastore.v1beta.ListMetadataImportsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListMetadataImportsResponse other) { + if (other == com.google.cloud.metastore.v1beta.ListMetadataImportsResponse.getDefaultInstance()) return this; + if (metadataImportsBuilder_ == null) { + if (!other.metadataImports_.isEmpty()) { + if (metadataImports_.isEmpty()) { + metadataImports_ = other.metadataImports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetadataImportsIsMutable(); + metadataImports_.addAll(other.metadataImports_); + } + onChanged(); + } + } else { + if (!other.metadataImports_.isEmpty()) { + if (metadataImportsBuilder_.isEmpty()) { + metadataImportsBuilder_.dispose(); + metadataImportsBuilder_ = null; + metadataImports_ = other.metadataImports_; + bitField0_ = (bitField0_ & ~0x00000001); + metadataImportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMetadataImportsFieldBuilder() : null; + } else { + metadataImportsBuilder_.addAllMessages(other.metadataImports_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1beta.MetadataImport m = + input.readMessage( + com.google.cloud.metastore.v1beta.MetadataImport.parser(), + extensionRegistry); + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(m); + } else { + metadataImportsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List metadataImports_ = + java.util.Collections.emptyList(); + private void ensureMetadataImportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metadataImports_ = new java.util.ArrayList(metadataImports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> metadataImportsBuilder_; + + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public java.util.List getMetadataImportsList() { + if (metadataImportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metadataImports_); + } else { + return metadataImportsBuilder_.getMessageList(); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public int getMetadataImportsCount() { + if (metadataImportsBuilder_ == null) { + return metadataImports_.size(); + } else { + return metadataImportsBuilder_.getCount(); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImports(int index) { + if (metadataImportsBuilder_ == null) { + return metadataImports_.get(index); + } else { + return metadataImportsBuilder_.getMessage(index); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder setMetadataImports( + int index, com.google.cloud.metastore.v1beta.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.set(index, value); + onChanged(); + } else { + metadataImportsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder setMetadataImports( + int index, com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.set(index, builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports(com.google.cloud.metastore.v1beta.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.add(value); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + int index, com.google.cloud.metastore.v1beta.MetadataImport value) { + if (metadataImportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataImportsIsMutable(); + metadataImports_.add(index, value); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder addMetadataImports( + int index, com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.add(index, builderForValue.build()); + onChanged(); + } else { + metadataImportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder addAllMetadataImports( + java.lang.Iterable values) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metadataImports_); + onChanged(); + } else { + metadataImportsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder clearMetadataImports() { + if (metadataImportsBuilder_ == null) { + metadataImports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metadataImportsBuilder_.clear(); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public Builder removeMetadataImports(int index) { + if (metadataImportsBuilder_ == null) { + ensureMetadataImportsIsMutable(); + metadataImports_.remove(index); + onChanged(); + } else { + metadataImportsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1beta.MetadataImport.Builder getMetadataImportsBuilder( + int index) { + return getMetadataImportsFieldBuilder().getBuilder(index); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index) { + if (metadataImportsBuilder_ == null) { + return metadataImports_.get(index); } else { + return metadataImportsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public java.util.List + getMetadataImportsOrBuilderList() { + if (metadataImportsBuilder_ != null) { + return metadataImportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metadataImports_); + } + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1beta.MetadataImport.Builder addMetadataImportsBuilder() { + return getMetadataImportsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public com.google.cloud.metastore.v1beta.MetadataImport.Builder addMetadataImportsBuilder( + int index) { + return getMetadataImportsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()); + } + /** + *
+     * The imports in the specified service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + public java.util.List + getMetadataImportsBuilderList() { + return getMetadataImportsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> + getMetadataImportsFieldBuilder() { + if (metadataImportsBuilder_ == null) { + metadataImportsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder>( + metadataImports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + metadataImports_ = null; + } + return metadataImportsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListMetadataImportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListMetadataImportsResponse) + private static final com.google.cloud.metastore.v1beta.ListMetadataImportsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListMetadataImportsResponse(); + } + + public static com.google.cloud.metastore.v1beta.ListMetadataImportsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMetadataImportsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListMetadataImportsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponseOrBuilder.java new file mode 100644 index 000000000000..fdfb3237ec9d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListMetadataImportsResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ListMetadataImportsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListMetadataImportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + java.util.List + getMetadataImportsList(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + com.google.cloud.metastore.v1beta.MetadataImport getMetadataImports(int index); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + int getMetadataImportsCount(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + java.util.List + getMetadataImportsOrBuilderList(); + /** + *
+   * The imports in the specified service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1; + */ + com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportsOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequest.java new file mode 100644 index 000000000000..7dd0b2324f8e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequest.java @@ -0,0 +1,1238 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListServicesRequest} + */ +public final class ListServicesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListServicesRequest) + ListServicesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListServicesRequest.newBuilder() to construct. + private ListServicesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListServicesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListServicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListServicesRequest.class, com.google.cloud.metastore.v1beta.ListServicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + *
+   * Optional. The maximum number of services to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ListServicesRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ListServicesRequest other = (com.google.cloud.metastore.v1beta.ListServicesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListServicesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListServicesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListServicesRequest) + com.google.cloud.metastore.v1beta.ListServicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListServicesRequest.class, com.google.cloud.metastore.v1beta.ListServicesRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ListServicesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListServicesRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ListServicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListServicesRequest build() { + com.google.cloud.metastore.v1beta.ListServicesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListServicesRequest buildPartial() { + com.google.cloud.metastore.v1beta.ListServicesRequest result = new com.google.cloud.metastore.v1beta.ListServicesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ListServicesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ListServicesRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.ListServicesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListServicesRequest other) { + if (other == com.google.cloud.metastore.v1beta.ListServicesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the location of metastore services
+     * to list, in the following form:
+     * `projects/{project_number}/locations/{location_id}`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of services to return. The response may
+     * contain less than the maximum number. If unspecified, no more than 500
+     * services are returned. The maximum value is 1000; values above 1000 are
+     * changed to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * call. Provide this token to retrieve the subsequent page.
+     * To retrieve the first page, supply an empty page token.
+     * When paginating, other parameters provided to
+     * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. The filter to apply to list results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Optional. Specify the ordering of results as described in [Sorting
+     * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+     * If not specified, the results will be sorted in the default order.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListServicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListServicesRequest) + private static final com.google.cloud.metastore.v1beta.ListServicesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListServicesRequest(); + } + + public static com.google.cloud.metastore.v1beta.ListServicesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListServicesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequestOrBuilder.java new file mode 100644 index 000000000000..051ab81c9a4f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesRequestOrBuilder.java @@ -0,0 +1,122 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ListServicesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListServicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative resource name of the location of metastore services
+   * to list, in the following form:
+   * `projects/{project_number}/locations/{location_id}`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The maximum number of services to return. The response may
+   * contain less than the maximum number. If unspecified, no more than 500
+   * services are returned. The maximum value is 1000; values above 1000 are
+   * changed to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * call. Provide this token to retrieve the subsequent page.
+   * To retrieve the first page, supply an empty page token.
+   * When paginating, other parameters provided to
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The filter to apply to list results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. Specify the ordering of results as described in [Sorting
+   * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
+   * If not specified, the results will be sorted in the default order.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponse.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponse.java new file mode 100644 index 000000000000..bf146ca1a06b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponse.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Response message for
+ * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListServicesResponse} + */ +public final class ListServicesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ListServicesResponse) + ListServicesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListServicesResponse.newBuilder() to construct. + private ListServicesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListServicesResponse() { + services_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListServicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListServicesResponse.class, com.google.cloud.metastore.v1beta.ListServicesResponse.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List services_; + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesList() { + return services_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + @java.lang.Override + public java.util.List + getServicesOrBuilderList() { + return services_; + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + @java.lang.Override + public int getServicesCount() { + return services_.size(); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service getServices(int index) { + return services_.get(index); + } + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServicesOrBuilder( + int index) { + return services_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList unreachable_; + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_; + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < services_.size(); i++) { + output.writeMessage(1, services_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < services_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, services_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ListServicesResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ListServicesResponse other = (com.google.cloud.metastore.v1beta.ListServicesResponse) obj; + + if (!getServicesList() + .equals(other.getServicesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!getUnreachableList() + .equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServicesCount() > 0) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServicesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ListServicesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ListServicesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ListServicesResponse) + com.google.cloud.metastore.v1beta.ListServicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ListServicesResponse.class, com.google.cloud.metastore.v1beta.ListServicesResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ListServicesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + } else { + services_ = null; + servicesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ListServicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListServicesResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ListServicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListServicesResponse build() { + com.google.cloud.metastore.v1beta.ListServicesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListServicesResponse buildPartial() { + com.google.cloud.metastore.v1beta.ListServicesResponse result = new com.google.cloud.metastore.v1beta.ListServicesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.ListServicesResponse result) { + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.services_ = services_; + } else { + result.services_ = servicesBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unreachable_ = unreachable_; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ListServicesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ListServicesResponse) { + return mergeFrom((com.google.cloud.metastore.v1beta.ListServicesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ListServicesResponse other) { + if (other == com.google.cloud.metastore.v1beta.ListServicesResponse.getDefaultInstance()) return this; + if (servicesBuilder_ == null) { + if (!other.services_.isEmpty()) { + if (services_.isEmpty()) { + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServicesIsMutable(); + services_.addAll(other.services_); + } + onChanged(); + } + } else { + if (!other.services_.isEmpty()) { + if (servicesBuilder_.isEmpty()) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + servicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getServicesFieldBuilder() : null; + } else { + servicesBuilder_.addAllMessages(other.services_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1beta.Service m = + input.readMessage( + com.google.cloud.metastore.v1beta.Service.parser(), + extensionRegistry); + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(m); + } else { + servicesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List services_ = + java.util.Collections.emptyList(); + private void ensureServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + services_ = new java.util.ArrayList(services_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder> servicesBuilder_; + + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public java.util.List getServicesList() { + if (servicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(services_); + } else { + return servicesBuilder_.getMessageList(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public int getServicesCount() { + if (servicesBuilder_ == null) { + return services_.size(); + } else { + return servicesBuilder_.getCount(); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public com.google.cloud.metastore.v1beta.Service getServices(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessage(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder setServices( + int index, com.google.cloud.metastore.v1beta.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.set(index, value); + onChanged(); + } else { + servicesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder setServices( + int index, com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.set(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder addServices(com.google.cloud.metastore.v1beta.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(value); + onChanged(); + } else { + servicesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder addServices( + int index, com.google.cloud.metastore.v1beta.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(index, value); + onChanged(); + } else { + servicesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder addServices( + com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder addServices( + int index, com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder addAllServices( + java.lang.Iterable values) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, services_); + onChanged(); + } else { + servicesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder clearServices() { + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servicesBuilder_.clear(); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public Builder removeServices(int index) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.remove(index); + onChanged(); + } else { + servicesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public com.google.cloud.metastore.v1beta.Service.Builder getServicesBuilder( + int index) { + return getServicesFieldBuilder().getBuilder(index); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServicesOrBuilder( + int index) { + if (servicesBuilder_ == null) { + return services_.get(index); } else { + return servicesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public java.util.List + getServicesOrBuilderList() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(services_); + } + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public com.google.cloud.metastore.v1beta.Service.Builder addServicesBuilder() { + return getServicesFieldBuilder().addBuilder( + com.google.cloud.metastore.v1beta.Service.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public com.google.cloud.metastore.v1beta.Service.Builder addServicesBuilder( + int index) { + return getServicesFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1beta.Service.getDefaultInstance()); + } + /** + *
+     * The services in the specified location.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + public java.util.List + getServicesBuilderList() { + return getServicesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder> + getServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder>( + services_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + services_ = null; + } + return servicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A token that can be sent as `page_token` to retrieve the next page. If this
+     * field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList + getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString + getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable( + java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, unreachable_); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ListServicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ListServicesResponse) + private static final com.google.cloud.metastore.v1beta.ListServicesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ListServicesResponse(); + } + + public static com.google.cloud.metastore.v1beta.ListServicesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ListServicesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponseOrBuilder.java new file mode 100644 index 000000000000..943e520be2d0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ListServicesResponseOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ListServicesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ListServicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + java.util.List + getServicesList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + com.google.cloud.metastore.v1beta.Service getServices(int index); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + int getServicesCount(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + java.util.List + getServicesOrBuilderList(); + /** + *
+   * The services in the specified location.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Service services = 1; + */ + com.google.cloud.metastore.v1beta.ServiceOrBuilder getServicesOrBuilder( + int index); + + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token that can be sent as `page_token` to retrieve the next page. If this
+   * field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return A list containing the unreachable. + */ + java.util.List + getUnreachableList(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString + getUnreachableBytes(int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadata.java new file mode 100644 index 000000000000..c09d405eb04b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadata.java @@ -0,0 +1,1605 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Metadata about the service in a location.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.LocationMetadata} + */ +public final class LocationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.LocationMetadata) + LocationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocationMetadata.newBuilder() to construct. + private LocationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocationMetadata() { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.LocationMetadata.class, com.google.cloud.metastore.v1beta.LocationMetadata.Builder.class); + } + + public interface HiveMetastoreVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+     * Whether `version` will be chosen by the server if a metastore service is
+     * created with a `HiveMetastoreConfig` that omits the `version`.
+     * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + boolean getIsDefault(); + } + /** + *
+   * A specification of a supported version of the Hive Metastore software.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} + */ + public static final class HiveMetastoreVersion extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) + HiveMetastoreVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use HiveMetastoreVersion.newBuilder() to construct. + private HiveMetastoreVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HiveMetastoreVersion() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HiveMetastoreVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.class, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+     * The semantic version of the Hive Metastore software.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 2; + private boolean isDefault_ = false; + /** + *
+     * Whether `version` will be chosen by the server if a metastore service is
+     * created with a `HiveMetastoreConfig` that omits the `version`.
+     * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (isDefault_ != false) { + output.writeBool(2, isDefault_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isDefault_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion other = (com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (getIsDefault() + != other.getIsDefault()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsDefault()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A specification of a supported version of the Hive Metastore software.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.class, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + isDefault_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion build() { + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion buildPartial() { + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion result = new com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isDefault_ = isDefault_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) { + return mergeFrom((com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion other) { + if (other == com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + isDefault_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The semantic version of the Hive Metastore software.
+       * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean isDefault_ ; + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Whether `version` will be chosen by the server if a metastore service is
+       * created with a `HiveMetastoreConfig` that omits the `version`.
+       * 
+ * + * bool is_default = 2; + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000002); + isDefault_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion) + private static final com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion(); + } + + public static com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HiveMetastoreVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List supportedHiveMetastoreVersions_; + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public java.util.List getSupportedHiveMetastoreVersionsList() { + return supportedHiveMetastoreVersions_; + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList() { + return supportedHiveMetastoreVersions_; + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public int getSupportedHiveMetastoreVersionsCount() { + return supportedHiveMetastoreVersions_.size(); + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index) { + return supportedHiveMetastoreVersions_.get(index); + } + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index) { + return supportedHiveMetastoreVersions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { + output.writeMessage(1, supportedHiveMetastoreVersions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < supportedHiveMetastoreVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, supportedHiveMetastoreVersions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.LocationMetadata)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.LocationMetadata other = (com.google.cloud.metastore.v1beta.LocationMetadata) obj; + + if (!getSupportedHiveMetastoreVersionsList() + .equals(other.getSupportedHiveMetastoreVersionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSupportedHiveMetastoreVersionsCount() > 0) { + hash = (37 * hash) + SUPPORTED_HIVE_METASTORE_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedHiveMetastoreVersionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.LocationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata about the service in a location.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.LocationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.LocationMetadata) + com.google.cloud.metastore.v1beta.LocationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.LocationMetadata.class, com.google.cloud.metastore.v1beta.LocationMetadata.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.LocationMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + } else { + supportedHiveMetastoreVersions_ = null; + supportedHiveMetastoreVersionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_LocationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.LocationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata build() { + com.google.cloud.metastore.v1beta.LocationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata buildPartial() { + com.google.cloud.metastore.v1beta.LocationMetadata result = new com.google.cloud.metastore.v1beta.LocationMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.LocationMetadata result) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + supportedHiveMetastoreVersions_ = java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersions_; + } else { + result.supportedHiveMetastoreVersions_ = supportedHiveMetastoreVersionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.LocationMetadata result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.LocationMetadata) { + return mergeFrom((com.google.cloud.metastore.v1beta.LocationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.LocationMetadata other) { + if (other == com.google.cloud.metastore.v1beta.LocationMetadata.getDefaultInstance()) return this; + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (!other.supportedHiveMetastoreVersions_.isEmpty()) { + if (supportedHiveMetastoreVersions_.isEmpty()) { + supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.addAll(other.supportedHiveMetastoreVersions_); + } + onChanged(); + } + } else { + if (!other.supportedHiveMetastoreVersions_.isEmpty()) { + if (supportedHiveMetastoreVersionsBuilder_.isEmpty()) { + supportedHiveMetastoreVersionsBuilder_.dispose(); + supportedHiveMetastoreVersionsBuilder_ = null; + supportedHiveMetastoreVersions_ = other.supportedHiveMetastoreVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + supportedHiveMetastoreVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSupportedHiveMetastoreVersionsFieldBuilder() : null; + } else { + supportedHiveMetastoreVersionsBuilder_.addAllMessages(other.supportedHiveMetastoreVersions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion m = + input.readMessage( + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.parser(), + extensionRegistry); + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(m); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List supportedHiveMetastoreVersions_ = + java.util.Collections.emptyList(); + private void ensureSupportedHiveMetastoreVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + supportedHiveMetastoreVersions_ = new java.util.ArrayList(supportedHiveMetastoreVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder> supportedHiveMetastoreVersionsBuilder_; + + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List getSupportedHiveMetastoreVersionsList() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + } else { + return supportedHiveMetastoreVersionsBuilder_.getMessageList(); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public int getSupportedHiveMetastoreVersionsCount() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.size(); + } else { + return supportedHiveMetastoreVersionsBuilder_.getCount(); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.get(index); + } else { + return supportedHiveMetastoreVersionsBuilder_.getMessage(index); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder setSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.set(index, value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder setSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions(com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion value) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(index, value); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addSupportedHiveMetastoreVersions( + int index, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder builderForValue) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder addAllSupportedHiveMetastoreVersions( + java.lang.Iterable values) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, supportedHiveMetastoreVersions_); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder clearSupportedHiveMetastoreVersions() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.clear(); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public Builder removeSupportedHiveMetastoreVersions(int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + ensureSupportedHiveMetastoreVersionsIsMutable(); + supportedHiveMetastoreVersions_.remove(index); + onChanged(); + } else { + supportedHiveMetastoreVersionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder getSupportedHiveMetastoreVersionsBuilder( + int index) { + return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilder(index); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index) { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + return supportedHiveMetastoreVersions_.get(index); } else { + return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList() { + if (supportedHiveMetastoreVersionsBuilder_ != null) { + return supportedHiveMetastoreVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(supportedHiveMetastoreVersions_); + } + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder addSupportedHiveMetastoreVersionsBuilder() { + return getSupportedHiveMetastoreVersionsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder addSupportedHiveMetastoreVersionsBuilder( + int index) { + return getSupportedHiveMetastoreVersionsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.getDefaultInstance()); + } + /** + *
+     * The versions of Hive Metastore that can be used when creating a new
+     * metastore service in this location. The server guarantees that exactly one
+     * `HiveMetastoreVersion` in the list will set `is_default`.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + public java.util.List + getSupportedHiveMetastoreVersionsBuilderList() { + return getSupportedHiveMetastoreVersionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder> + getSupportedHiveMetastoreVersionsFieldBuilder() { + if (supportedHiveMetastoreVersionsBuilder_ == null) { + supportedHiveMetastoreVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion.Builder, com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder>( + supportedHiveMetastoreVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + supportedHiveMetastoreVersions_ = null; + } + return supportedHiveMetastoreVersionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.LocationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.LocationMetadata) + private static final com.google.cloud.metastore.v1beta.LocationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.LocationMetadata(); + } + + public static com.google.cloud.metastore.v1beta.LocationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.LocationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadataOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadataOrBuilder.java new file mode 100644 index 000000000000..0161ad925ac1 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationMetadataOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface LocationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.LocationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + java.util.List + getSupportedHiveMetastoreVersionsList(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion getSupportedHiveMetastoreVersions(int index); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + int getSupportedHiveMetastoreVersionsCount(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + java.util.List + getSupportedHiveMetastoreVersionsOrBuilderList(); + /** + *
+   * The versions of Hive Metastore that can be used when creating a new
+   * metastore service in this location. The server guarantees that exactly one
+   * `HiveMetastoreVersion` in the list will set `is_default`.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1; + */ + com.google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersionOrBuilder getSupportedHiveMetastoreVersionsOrBuilder( + int index); +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationName.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationName.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/LocationName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindow.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindow.java new file mode 100644 index 000000000000..1729f7a30ce0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindow.java @@ -0,0 +1,769 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Maintenance window. This specifies when Dataproc Metastore
+ * may perform system maintenance operation to the service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MaintenanceWindow} + */ +public final class MaintenanceWindow extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MaintenanceWindow) + MaintenanceWindowOrBuilder { +private static final long serialVersionUID = 0L; + // Use MaintenanceWindow.newBuilder() to construct. + private MaintenanceWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MaintenanceWindow() { + dayOfWeek_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MaintenanceWindow(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MaintenanceWindow.class, com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder.class); + } + + public static final int HOUR_OF_DAY_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value hourOfDay_; + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + @java.lang.Override + public boolean hasHourOfDay() { + return hourOfDay_ != null; + } + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getHourOfDay() { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + + public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; + private int dayOfWeek_ = 0; + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + @java.lang.Override public com.google.type.DayOfWeek getDayOfWeek() { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hourOfDay_ != null) { + output.writeMessage(1, getHourOfDay()); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + output.writeEnum(2, dayOfWeek_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hourOfDay_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHourOfDay()); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, dayOfWeek_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.MaintenanceWindow)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.MaintenanceWindow other = (com.google.cloud.metastore.v1beta.MaintenanceWindow) obj; + + if (hasHourOfDay() != other.hasHourOfDay()) return false; + if (hasHourOfDay()) { + if (!getHourOfDay() + .equals(other.getHourOfDay())) return false; + } + if (dayOfWeek_ != other.dayOfWeek_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHourOfDay()) { + hash = (37 * hash) + HOUR_OF_DAY_FIELD_NUMBER; + hash = (53 * hash) + getHourOfDay().hashCode(); + } + hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; + hash = (53 * hash) + dayOfWeek_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MaintenanceWindow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.MaintenanceWindow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Maintenance window. This specifies when Dataproc Metastore
+   * may perform system maintenance operation to the service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MaintenanceWindow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MaintenanceWindow) + com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MaintenanceWindow.class, com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.MaintenanceWindow.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hourOfDay_ = null; + if (hourOfDayBuilder_ != null) { + hourOfDayBuilder_.dispose(); + hourOfDayBuilder_ = null; + } + dayOfWeek_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MaintenanceWindow getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MaintenanceWindow build() { + com.google.cloud.metastore.v1beta.MaintenanceWindow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MaintenanceWindow buildPartial() { + com.google.cloud.metastore.v1beta.MaintenanceWindow result = new com.google.cloud.metastore.v1beta.MaintenanceWindow(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.MaintenanceWindow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hourOfDay_ = hourOfDayBuilder_ == null + ? hourOfDay_ + : hourOfDayBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dayOfWeek_ = dayOfWeek_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.MaintenanceWindow) { + return mergeFrom((com.google.cloud.metastore.v1beta.MaintenanceWindow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.MaintenanceWindow other) { + if (other == com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance()) return this; + if (other.hasHourOfDay()) { + mergeHourOfDay(other.getHourOfDay()); + } + if (other.dayOfWeek_ != 0) { + setDayOfWeekValue(other.getDayOfWeekValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getHourOfDayFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + dayOfWeek_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value hourOfDay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> hourOfDayBuilder_; + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + public boolean hasHourOfDay() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + public com.google.protobuf.Int32Value getHourOfDay() { + if (hourOfDayBuilder_ == null) { + return hourOfDay_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } else { + return hourOfDayBuilder_.getMessage(); + } + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder setHourOfDay(com.google.protobuf.Int32Value value) { + if (hourOfDayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hourOfDay_ = value; + } else { + hourOfDayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder setHourOfDay( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (hourOfDayBuilder_ == null) { + hourOfDay_ = builderForValue.build(); + } else { + hourOfDayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder mergeHourOfDay(com.google.protobuf.Int32Value value) { + if (hourOfDayBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + hourOfDay_ != null && + hourOfDay_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getHourOfDayBuilder().mergeFrom(value); + } else { + hourOfDay_ = value; + } + } else { + hourOfDayBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public Builder clearHourOfDay() { + bitField0_ = (bitField0_ & ~0x00000001); + hourOfDay_ = null; + if (hourOfDayBuilder_ != null) { + hourOfDayBuilder_.dispose(); + hourOfDayBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public com.google.protobuf.Int32Value.Builder getHourOfDayBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHourOfDayFieldBuilder().getBuilder(); + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + public com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder() { + if (hourOfDayBuilder_ != null) { + return hourOfDayBuilder_.getMessageOrBuilder(); + } else { + return hourOfDay_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : hourOfDay_; + } + } + /** + *
+     * The hour of day (0-23) when the window starts.
+     * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getHourOfDayFieldBuilder() { + if (hourOfDayBuilder_ == null) { + hourOfDayBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getHourOfDay(), + getParentForChildren(), + isClean()); + hourOfDay_ = null; + } + return hourOfDayBuilder_; + } + + private int dayOfWeek_ = 0; + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @param value The enum numeric value on the wire for dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValue(int value) { + dayOfWeek_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDayOfWeek() { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @param value The dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeek(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dayOfWeek_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The day of week, when the window starts.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return This builder for chaining. + */ + public Builder clearDayOfWeek() { + bitField0_ = (bitField0_ & ~0x00000002); + dayOfWeek_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MaintenanceWindow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MaintenanceWindow) + private static final com.google.cloud.metastore.v1beta.MaintenanceWindow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MaintenanceWindow(); + } + + public static com.google.cloud.metastore.v1beta.MaintenanceWindow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaintenanceWindow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MaintenanceWindow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindowOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindowOrBuilder.java new file mode 100644 index 000000000000..0c77a0a64791 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MaintenanceWindowOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface MaintenanceWindowOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MaintenanceWindow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return Whether the hourOfDay field is set. + */ + boolean hasHourOfDay(); + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + * @return The hourOfDay. + */ + com.google.protobuf.Int32Value getHourOfDay(); + /** + *
+   * The hour of day (0-23) when the window starts.
+   * 
+ * + * .google.protobuf.Int32Value hour_of_day = 1; + */ + com.google.protobuf.Int32ValueOrBuilder getHourOfDayOrBuilder(); + + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + int getDayOfWeekValue(); + /** + *
+   * The day of week, when the window starts.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + com.google.type.DayOfWeek getDayOfWeek(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExport.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExport.java new file mode 100644 index 000000000000..aad8971d762d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExport.java @@ -0,0 +1,1607 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * The details of a metadata export operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataExport} + */ +public final class MetadataExport extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataExport) + MetadataExportOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataExport.newBuilder() to construct. + private MetadataExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataExport() { + state_ = 0; + databaseDumpType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataExport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataExport.class, com.google.cloud.metastore.v1beta.MetadataExport.Builder.class); + } + + /** + *
+   * The current state of the metadata export.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.MetadataExport.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata export is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata export is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata export completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata export failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The metadata export is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata export is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata export is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata export completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata export failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The metadata export is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetadataExport.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.MetadataExport.State) + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DESTINATION_GCS_URI(4), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 4: return DESTINATION_GCS_URI; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int DESTINATION_GCS_URI_FIELD_NUMBER = 4; + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + public boolean hasDestinationGcsUri() { + return destinationCase_ == 4; + } + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + public java.lang.String getDestinationGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 4) { + destination_ = s; + } + return s; + } + } + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + public com.google.protobuf.ByteString + getDestinationGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 4) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.MetadataExport.State getState() { + com.google.cloud.metastore.v1beta.MetadataExport.State result = com.google.cloud.metastore.v1beta.MetadataExport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.MetadataExport.State.UNRECOGNIZED : result; + } + + public static final int DATABASE_DUMP_TYPE_FIELD_NUMBER = 5; + private int databaseDumpType_ = 0; + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1beta.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (destinationCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destination_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, databaseDumpType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1beta.MetadataExport.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, state_); + } + if (destinationCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destination_); + } + if (databaseDumpType_ != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, databaseDumpType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataExport)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.MetadataExport other = (com.google.cloud.metastore.v1beta.MetadataExport) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (databaseDumpType_ != other.databaseDumpType_) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 4: + if (!getDestinationGcsUri() + .equals(other.getDestinationGcsUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + DATABASE_DUMP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseDumpType_; + switch (destinationCase_) { + case 4: + hash = (37 * hash) + DESTINATION_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationGcsUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataExport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.MetadataExport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a metadata export operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataExport} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataExport) + com.google.cloud.metastore.v1beta.MetadataExportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataExport.class, com.google.cloud.metastore.v1beta.MetadataExport.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.MetadataExport.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + databaseDumpType_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataExport_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataExport getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.MetadataExport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataExport build() { + com.google.cloud.metastore.v1beta.MetadataExport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataExport buildPartial() { + com.google.cloud.metastore.v1beta.MetadataExport result = new com.google.cloud.metastore.v1beta.MetadataExport(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.MetadataExport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.databaseDumpType_ = databaseDumpType_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1beta.MetadataExport result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.MetadataExport) { + return mergeFrom((com.google.cloud.metastore.v1beta.MetadataExport)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataExport other) { + if (other == com.google.cloud.metastore.v1beta.MetadataExport.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.databaseDumpType_ != 0) { + setDatabaseDumpTypeValue(other.getDatabaseDumpTypeValue()); + } + switch (other.getDestinationCase()) { + case DESTINATION_GCS_URI: { + destinationCase_ = 4; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 24: { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 4; + destination_ = s; + break; + } // case 34 + case 40: { + databaseDumpType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + @java.lang.Override + public boolean hasDestinationGcsUri() { + return destinationCase_ == 4; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + @java.lang.Override + public java.lang.String getDestinationGcsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 4) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationGcsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 4) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (destinationCase_ == 4) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The destinationGcsUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDestinationGcsUri() { + if (destinationCase_ == 4) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Output only. A Cloud Storage URI of a folder that metadata are exported
+     * to, in the form of
+     * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+     * `<export_folder>` is automatically generated.
+     * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for destinationGcsUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Output only. The time when the export started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the export ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataExport.State getState() { + com.google.cloud.metastore.v1beta.MetadataExport.State result = com.google.cloud.metastore.v1beta.MetadataExport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.MetadataExport.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1beta.MetadataExport.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the export.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private int databaseDumpType_ = 0; + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + @java.lang.Override public int getDatabaseDumpTypeValue() { + return databaseDumpType_; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpTypeValue(int value) { + databaseDumpType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType() { + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(databaseDumpType_); + return result == null ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The databaseDumpType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseDumpType(com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + databaseDumpType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The type of the database dump.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDatabaseDumpType() { + bitField0_ = (bitField0_ & ~0x00000010); + databaseDumpType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataExport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataExport) + private static final com.google.cloud.metastore.v1beta.MetadataExport DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataExport(); + } + + public static com.google.cloud.metastore.v1beta.MetadataExport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataExport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataExport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExportOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExportOrBuilder.java new file mode 100644 index 000000000000..3f51a88cf394 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataExportOrBuilder.java @@ -0,0 +1,141 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface MetadataExportOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataExport) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the destinationGcsUri field is set. + */ + boolean hasDestinationGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The destinationGcsUri. + */ + java.lang.String getDestinationGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI of a folder that metadata are exported
+   * to, in the form of
+   * `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
+   * `<export_folder>` is automatically generated.
+   * 
+ * + * string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for destinationGcsUri. + */ + com.google.protobuf.ByteString + getDestinationGcsUriBytes(); + + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Output only. The time when the export started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the export ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the export.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1beta.MetadataExport.State getState(); + + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for databaseDumpType. + */ + int getDatabaseDumpTypeValue(); + /** + *
+   * Output only. The type of the database dump.
+   * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The databaseDumpType. + */ + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getDatabaseDumpType(); + + public com.google.cloud.metastore.v1beta.MetadataExport.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImport.java new file mode 100644 index 000000000000..74646bbdb7a5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImport.java @@ -0,0 +1,3320 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * A metastore resource that imports metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataImport} + */ +public final class MetadataImport extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataImport) + MetadataImportOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataImport.newBuilder() to construct. + private MetadataImport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataImport() { + name_ = ""; + description_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataImport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataImport.class, com.google.cloud.metastore.v1beta.MetadataImport.Builder.class); + } + + /** + *
+   * The current state of the metadata import.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.MetadataImport.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata import is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata import is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata import completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata import is being updated.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + *
+     * The metadata import failed, and attempted metadata changes were rolled
+     * back.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata import is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata import is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata import completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata import is being updated.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + *
+     * The metadata import failed, and attempted metadata changes were rolled
+     * back.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return UPDATING; + case 4: return FAILED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetadataImport.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.MetadataImport.State) + } + + public interface DatabaseDumpOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Deprecated int getDatabaseTypeValue(); + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @return The databaseType. + */ + @java.lang.Deprecated com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType getDatabaseType(); + + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString + getGcsUriBytes(); + + /** + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @return The sourceDatabase. + */ + @java.lang.Deprecated java.lang.String getSourceDatabase(); + /** + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @return The bytes for sourceDatabase. + */ + @java.lang.Deprecated com.google.protobuf.ByteString + getSourceDatabaseBytes(); + + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getType(); + } + /** + *
+   * A specification of the location of and metadata about a database dump from
+   * a relational database management system.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} + */ + public static final class DatabaseDump extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) + DatabaseDumpOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseDump.newBuilder() to construct. + private DatabaseDump(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DatabaseDump() { + databaseType_ = 0; + gcsUri_ = ""; + sourceDatabase_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DatabaseDump(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.class, com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder.class); + } + + /** + *
+     * The type of the database.
+     * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType} + */ + public enum DatabaseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * The type of the source database is unknown.
+       * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + DATABASE_TYPE_UNSPECIFIED(0), + /** + *
+       * The type of the source database is MySQL.
+       * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + UNRECOGNIZED(-1), + ; + + /** + *
+       * The type of the source database is unknown.
+       * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+       * The type of the source database is MySQL.
+       * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DatabaseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DatabaseType forNumber(int value) { + switch (value) { + case 0: return DATABASE_TYPE_UNSPECIFIED; + case 1: return MYSQL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DatabaseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseType findValueByNumber(int number) { + return DatabaseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDescriptor().getEnumTypes().get(0); + } + + private static final DatabaseType[] VALUES = values(); + + public static DatabaseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DatabaseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType) + } + + public static final int DATABASE_TYPE_FIELD_NUMBER = 1; + private int databaseType_ = 0; + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override @java.lang.Deprecated public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+     * The type of the database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @return The databaseType. + */ + @java.lang.Override @java.lang.Deprecated public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType result = com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED : result; + } + + public static final int GCS_URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object gcsUri_ = ""; + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } + } + /** + *
+     * A Cloud Storage object or folder URI that specifies the source from which
+     * to import metadata. It must begin with `gs://`.
+     * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_DATABASE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object sourceDatabase_ = ""; + /** + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @return The sourceDatabase. + */ + @java.lang.Override + @java.lang.Deprecated public java.lang.String getSourceDatabase() { + java.lang.Object ref = sourceDatabase_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceDatabase_ = s; + return s; + } + } + /** + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @return The bytes for sourceDatabase. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString + getSourceDatabaseBytes() { + java.lang.Object ref = sourceDatabase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceDatabase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 4; + private int type_ = 0; + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Optional. The type of the database dump. If unspecified, defaults to
+     * `MYSQL`.
+     * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getType() { + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (databaseType_ != com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, databaseType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceDatabase_); + } + if (type_ != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (databaseType_ != com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, databaseType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceDatabase_); + } + if (type_ != com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump other = (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) obj; + + if (databaseType_ != other.databaseType_) return false; + if (!getGcsUri() + .equals(other.getGcsUri())) return false; + if (!getSourceDatabase() + .equals(other.getSourceDatabase())) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseType_; + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + hash = (37 * hash) + SOURCE_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getSourceDatabase().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A specification of the location of and metadata about a database dump from
+     * a relational database management system.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataImport.DatabaseDump} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.class, com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + databaseType_ = 0; + gcsUri_ = ""; + sourceDatabase_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump build() { + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump buildPartial() { + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump result = new com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.databaseType_ = databaseType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gcsUri_ = gcsUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sourceDatabase_ = sourceDatabase_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) { + return mergeFrom((com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump other) { + if (other == com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance()) return this; + if (other.databaseType_ != 0) { + setDatabaseTypeValue(other.getDatabaseTypeValue()); + } + if (!other.getGcsUri().isEmpty()) { + gcsUri_ = other.gcsUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSourceDatabase().isEmpty()) { + sourceDatabase_ = other.sourceDatabase_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + databaseType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + gcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + sourceDatabase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + type_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int databaseType_ = 0; + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override @java.lang.Deprecated public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @param value The enum numeric value on the wire for databaseType to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setDatabaseTypeValue(int value) { + databaseType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @return The databaseType. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType result = com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType.UNRECOGNIZED : result; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @param value The databaseType to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setDatabaseType(com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + databaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of the database.
+       * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.database_type is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=699 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearDatabaseType() { + bitField0_ = (bitField0_ & ~0x00000001); + databaseType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object gcsUri_ = ""; + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString + getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gcsUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + gcsUri_ = getDefaultInstance().getGcsUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * A Cloud Storage object or folder URI that specifies the source from which
+       * to import metadata. It must begin with `gs://`.
+       * 
+ * + * string gcs_uri = 2; + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gcsUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object sourceDatabase_ = ""; + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @return The sourceDatabase. + */ + @java.lang.Deprecated public java.lang.String getSourceDatabase() { + java.lang.Object ref = sourceDatabase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceDatabase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @return The bytes for sourceDatabase. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getSourceDatabaseBytes() { + java.lang.Object ref = sourceDatabase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceDatabase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @param value The sourceDatabase to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setSourceDatabase( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sourceDatabase_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearSourceDatabase() { + sourceDatabase_ = getDefaultInstance().getSourceDatabase(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * @deprecated google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.source_database is deprecated. + * See google/cloud/metastore/v1beta/metastore.proto;l=706 + * @param value The bytes for sourceDatabase to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setSourceDatabaseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sourceDatabase_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type getType() { + com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type result = com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type.UNRECOGNIZED : result; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.metastore.v1beta.DatabaseDumpSpec.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Optional. The type of the database dump. If unspecified, defaults to
+       * `MYSQL`.
+       * 
+ * + * .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) + private static final com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump(); + } + + public static com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseDump parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int metadataCase_ = 0; + private java.lang.Object metadata_; + public enum MetadataCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATABASE_DUMP(6), + METADATA_NOT_SET(0); + private final int value; + private MetadataCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetadataCase valueOf(int value) { + return forNumber(value); + } + + public static MetadataCase forNumber(int value) { + switch (value) { + case 6: return DATABASE_DUMP; + case 0: return METADATA_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public MetadataCase + getMetadataCase() { + return MetadataCase.forNumber( + metadataCase_); + } + + public static final int DATABASE_DUMP_FIELD_NUMBER = 6; + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + @java.lang.Override + public boolean hasDatabaseDump() { + return metadataCase_ == 6; + } + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDatabaseDump() { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); + } + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder() { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.MetadataImport.State getState() { + com.google.cloud.metastore.v1beta.MetadataImport.State result = com.google.cloud.metastore.v1beta.MetadataImport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.MetadataImport.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (state_ != com.google.cloud.metastore.v1beta.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (metadataCase_ == 6) { + output.writeMessage(6, (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_); + } + if (endTime_ != null) { + output.writeMessage(7, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getUpdateTime()); + } + if (state_ != com.google.cloud.metastore.v1beta.MetadataImport.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, state_); + } + if (metadataCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataImport)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.MetadataImport other = (com.google.cloud.metastore.v1beta.MetadataImport) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (!getMetadataCase().equals(other.getMetadataCase())) return false; + switch (metadataCase_) { + case 6: + if (!getDatabaseDump() + .equals(other.getDatabaseDump())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (metadataCase_) { + case 6: + hash = (37 * hash) + DATABASE_DUMP_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseDump().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataImport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.MetadataImport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A metastore resource that imports metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataImport} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataImport) + com.google.cloud.metastore.v1beta.MetadataImportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataImport.class, com.google.cloud.metastore.v1beta.MetadataImport.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.MetadataImport.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (databaseDumpBuilder_ != null) { + databaseDumpBuilder_.clear(); + } + name_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + metadataCase_ = 0; + metadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataImport_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport build() { + com.google.cloud.metastore.v1beta.MetadataImport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport buildPartial() { + com.google.cloud.metastore.v1beta.MetadataImport result = new com.google.cloud.metastore.v1beta.MetadataImport(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.MetadataImport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1beta.MetadataImport result) { + result.metadataCase_ = metadataCase_; + result.metadata_ = this.metadata_; + if (metadataCase_ == 6 && + databaseDumpBuilder_ != null) { + result.metadata_ = databaseDumpBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.MetadataImport) { + return mergeFrom((com.google.cloud.metastore.v1beta.MetadataImport)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataImport other) { + if (other == com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getMetadataCase()) { + case DATABASE_DUMP: { + mergeDatabaseDump(other.getDatabaseDump()); + break; + } + case METADATA_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 40 + case 50: { + input.readMessage( + getDatabaseDumpFieldBuilder().getBuilder(), + extensionRegistry); + metadataCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int metadataCase_ = 0; + private java.lang.Object metadata_; + public MetadataCase + getMetadataCase() { + return MetadataCase.forNumber( + metadataCase_); + } + + public Builder clearMetadata() { + metadataCase_ = 0; + metadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder> databaseDumpBuilder_; + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + @java.lang.Override + public boolean hasDatabaseDump() { + return metadataCase_ == 6; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDatabaseDump() { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); + } else { + if (metadataCase_ == 6) { + return databaseDumpBuilder_.getMessage(); + } + return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); + } + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setDatabaseDump(com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump value) { + if (databaseDumpBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + databaseDumpBuilder_.setMessage(value); + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setDatabaseDump( + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder builderForValue) { + if (databaseDumpBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + databaseDumpBuilder_.setMessage(builderForValue.build()); + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder mergeDatabaseDump(com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump value) { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6 && + metadata_ != com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance()) { + metadata_ = com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.newBuilder((com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_) + .mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + if (metadataCase_ == 6) { + databaseDumpBuilder_.mergeFrom(value); + } else { + databaseDumpBuilder_.setMessage(value); + } + } + metadataCase_ = 6; + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearDatabaseDump() { + if (databaseDumpBuilder_ == null) { + if (metadataCase_ == 6) { + metadataCase_ = 0; + metadata_ = null; + onChanged(); + } + } else { + if (metadataCase_ == 6) { + metadataCase_ = 0; + metadata_ = null; + } + databaseDumpBuilder_.clear(); + } + return this; + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder getDatabaseDumpBuilder() { + return getDatabaseDumpFieldBuilder().getBuilder(); + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder() { + if ((metadataCase_ == 6) && (databaseDumpBuilder_ != null)) { + return databaseDumpBuilder_.getMessageOrBuilder(); + } else { + if (metadataCase_ == 6) { + return (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_; + } + return com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); + } + } + /** + *
+     * Immutable. A database dump from a pre-existing metastore's database.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder> + getDatabaseDumpFieldBuilder() { + if (databaseDumpBuilder_ == null) { + if (!(metadataCase_ == 6)) { + metadata_ = com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.getDefaultInstance(); + } + databaseDumpBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump, com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.Builder, com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder>( + (com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump) metadata_, + getParentForChildren(), + isClean()); + metadata_ = null; + } + metadataCase_ = 6; + onChanged(); + return databaseDumpBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metadata import, of the form:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The description of the metadata import.
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metadata import was started.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metadata import was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000020); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the metadata import finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport.State getState() { + com.google.cloud.metastore.v1beta.MetadataImport.State result = com.google.cloud.metastore.v1beta.MetadataImport.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.MetadataImport.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1beta.MetadataImport.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metadata import.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataImport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataImport) + private static final com.google.cloud.metastore.v1beta.MetadataImport DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataImport(); + } + + public static com.google.cloud.metastore.v1beta.MetadataImport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataImport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportName.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportName.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportOrBuilder.java new file mode 100644 index 000000000000..878f0eae4b4c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataImportOrBuilder.java @@ -0,0 +1,180 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface MetadataImportOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataImport) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the databaseDump field is set. + */ + boolean hasDatabaseDump(); + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseDump. + */ + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDump getDatabaseDump(); + /** + *
+   * Immutable. A database dump from a pre-existing metastore's database.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1beta.MetadataImport.DatabaseDumpOrBuilder getDatabaseDumpOrBuilder(); + + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the metadata import, of the form:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of the metadata import.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metadata import was started.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metadata import was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the metadata import finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the metadata import.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1beta.MetadataImport.State getState(); + + public com.google.cloud.metastore.v1beta.MetadataImport.MetadataCase getMetadataCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegration.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegration.java new file mode 100644 index 000000000000..a72098dc023d --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegration.java @@ -0,0 +1,874 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Specifies how metastore metadata should be integrated with external services.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataIntegration} + */ +public final class MetadataIntegration extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataIntegration) + MetadataIntegrationOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataIntegration.newBuilder() to construct. + private MetadataIntegration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataIntegration() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataIntegration(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataIntegration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataIntegration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataIntegration.class, com.google.cloud.metastore.v1beta.MetadataIntegration.Builder.class); + } + + public static final int DATA_CATALOG_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.metastore.v1beta.DataCatalogConfig dataCatalogConfig_; + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + * @return Whether the dataCatalogConfig field is set. + */ + @java.lang.Override + public boolean hasDataCatalogConfig() { + return dataCatalogConfig_ != null; + } + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + * @return The dataCatalogConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataCatalogConfig getDataCatalogConfig() { + return dataCatalogConfig_ == null ? com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance() : dataCatalogConfig_; + } + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder getDataCatalogConfigOrBuilder() { + return dataCatalogConfig_ == null ? com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance() : dataCatalogConfig_; + } + + public static final int DATAPLEX_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1beta.DataplexConfig dataplexConfig_; + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + * @return Whether the dataplexConfig field is set. + */ + @java.lang.Override + public boolean hasDataplexConfig() { + return dataplexConfig_ != null; + } + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + * @return The dataplexConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataplexConfig getDataplexConfig() { + return dataplexConfig_ == null ? com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance() : dataplexConfig_; + } + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder getDataplexConfigOrBuilder() { + return dataplexConfig_ == null ? com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance() : dataplexConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dataCatalogConfig_ != null) { + output.writeMessage(1, getDataCatalogConfig()); + } + if (dataplexConfig_ != null) { + output.writeMessage(2, getDataplexConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataCatalogConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDataCatalogConfig()); + } + if (dataplexConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDataplexConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataIntegration)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.MetadataIntegration other = (com.google.cloud.metastore.v1beta.MetadataIntegration) obj; + + if (hasDataCatalogConfig() != other.hasDataCatalogConfig()) return false; + if (hasDataCatalogConfig()) { + if (!getDataCatalogConfig() + .equals(other.getDataCatalogConfig())) return false; + } + if (hasDataplexConfig() != other.hasDataplexConfig()) return false; + if (hasDataplexConfig()) { + if (!getDataplexConfig() + .equals(other.getDataplexConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataCatalogConfig()) { + hash = (37 * hash) + DATA_CATALOG_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDataCatalogConfig().hashCode(); + } + if (hasDataplexConfig()) { + hash = (37 * hash) + DATAPLEX_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDataplexConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataIntegration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.MetadataIntegration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies how metastore metadata should be integrated with external services.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataIntegration} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataIntegration) + com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataIntegration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataIntegration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataIntegration.class, com.google.cloud.metastore.v1beta.MetadataIntegration.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.MetadataIntegration.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataCatalogConfig_ = null; + if (dataCatalogConfigBuilder_ != null) { + dataCatalogConfigBuilder_.dispose(); + dataCatalogConfigBuilder_ = null; + } + dataplexConfig_ = null; + if (dataplexConfigBuilder_ != null) { + dataplexConfigBuilder_.dispose(); + dataplexConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataIntegration_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataIntegration getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataIntegration build() { + com.google.cloud.metastore.v1beta.MetadataIntegration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataIntegration buildPartial() { + com.google.cloud.metastore.v1beta.MetadataIntegration result = new com.google.cloud.metastore.v1beta.MetadataIntegration(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.MetadataIntegration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataCatalogConfig_ = dataCatalogConfigBuilder_ == null + ? dataCatalogConfig_ + : dataCatalogConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataplexConfig_ = dataplexConfigBuilder_ == null + ? dataplexConfig_ + : dataplexConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.MetadataIntegration) { + return mergeFrom((com.google.cloud.metastore.v1beta.MetadataIntegration)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataIntegration other) { + if (other == com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance()) return this; + if (other.hasDataCatalogConfig()) { + mergeDataCatalogConfig(other.getDataCatalogConfig()); + } + if (other.hasDataplexConfig()) { + mergeDataplexConfig(other.getDataplexConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getDataCatalogConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getDataplexConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.cloud.metastore.v1beta.DataCatalogConfig dataCatalogConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.DataCatalogConfig, com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder, com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder> dataCatalogConfigBuilder_; + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + * @return Whether the dataCatalogConfig field is set. + */ + public boolean hasDataCatalogConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + * @return The dataCatalogConfig. + */ + public com.google.cloud.metastore.v1beta.DataCatalogConfig getDataCatalogConfig() { + if (dataCatalogConfigBuilder_ == null) { + return dataCatalogConfig_ == null ? com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance() : dataCatalogConfig_; + } else { + return dataCatalogConfigBuilder_.getMessage(); + } + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + public Builder setDataCatalogConfig(com.google.cloud.metastore.v1beta.DataCatalogConfig value) { + if (dataCatalogConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataCatalogConfig_ = value; + } else { + dataCatalogConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + public Builder setDataCatalogConfig( + com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder builderForValue) { + if (dataCatalogConfigBuilder_ == null) { + dataCatalogConfig_ = builderForValue.build(); + } else { + dataCatalogConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + public Builder mergeDataCatalogConfig(com.google.cloud.metastore.v1beta.DataCatalogConfig value) { + if (dataCatalogConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + dataCatalogConfig_ != null && + dataCatalogConfig_ != com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance()) { + getDataCatalogConfigBuilder().mergeFrom(value); + } else { + dataCatalogConfig_ = value; + } + } else { + dataCatalogConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + public Builder clearDataCatalogConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + dataCatalogConfig_ = null; + if (dataCatalogConfigBuilder_ != null) { + dataCatalogConfigBuilder_.dispose(); + dataCatalogConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + public com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder getDataCatalogConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDataCatalogConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + public com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder getDataCatalogConfigOrBuilder() { + if (dataCatalogConfigBuilder_ != null) { + return dataCatalogConfigBuilder_.getMessageOrBuilder(); + } else { + return dataCatalogConfig_ == null ? + com.google.cloud.metastore.v1beta.DataCatalogConfig.getDefaultInstance() : dataCatalogConfig_; + } + } + /** + *
+     * The integration config for the Data Catalog service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.DataCatalogConfig, com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder, com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder> + getDataCatalogConfigFieldBuilder() { + if (dataCatalogConfigBuilder_ == null) { + dataCatalogConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.DataCatalogConfig, com.google.cloud.metastore.v1beta.DataCatalogConfig.Builder, com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder>( + getDataCatalogConfig(), + getParentForChildren(), + isClean()); + dataCatalogConfig_ = null; + } + return dataCatalogConfigBuilder_; + } + + private com.google.cloud.metastore.v1beta.DataplexConfig dataplexConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.DataplexConfig, com.google.cloud.metastore.v1beta.DataplexConfig.Builder, com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder> dataplexConfigBuilder_; + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + * @return Whether the dataplexConfig field is set. + */ + public boolean hasDataplexConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + * @return The dataplexConfig. + */ + public com.google.cloud.metastore.v1beta.DataplexConfig getDataplexConfig() { + if (dataplexConfigBuilder_ == null) { + return dataplexConfig_ == null ? com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance() : dataplexConfig_; + } else { + return dataplexConfigBuilder_.getMessage(); + } + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + public Builder setDataplexConfig(com.google.cloud.metastore.v1beta.DataplexConfig value) { + if (dataplexConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataplexConfig_ = value; + } else { + dataplexConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + public Builder setDataplexConfig( + com.google.cloud.metastore.v1beta.DataplexConfig.Builder builderForValue) { + if (dataplexConfigBuilder_ == null) { + dataplexConfig_ = builderForValue.build(); + } else { + dataplexConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + public Builder mergeDataplexConfig(com.google.cloud.metastore.v1beta.DataplexConfig value) { + if (dataplexConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + dataplexConfig_ != null && + dataplexConfig_ != com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance()) { + getDataplexConfigBuilder().mergeFrom(value); + } else { + dataplexConfig_ = value; + } + } else { + dataplexConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + public Builder clearDataplexConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + dataplexConfig_ = null; + if (dataplexConfigBuilder_ != null) { + dataplexConfigBuilder_.dispose(); + dataplexConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + public com.google.cloud.metastore.v1beta.DataplexConfig.Builder getDataplexConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDataplexConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + public com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder getDataplexConfigOrBuilder() { + if (dataplexConfigBuilder_ != null) { + return dataplexConfigBuilder_.getMessageOrBuilder(); + } else { + return dataplexConfig_ == null ? + com.google.cloud.metastore.v1beta.DataplexConfig.getDefaultInstance() : dataplexConfig_; + } + } + /** + *
+     * The integration config for the Dataplex service.
+     * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.DataplexConfig, com.google.cloud.metastore.v1beta.DataplexConfig.Builder, com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder> + getDataplexConfigFieldBuilder() { + if (dataplexConfigBuilder_ == null) { + dataplexConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.DataplexConfig, com.google.cloud.metastore.v1beta.DataplexConfig.Builder, com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder>( + getDataplexConfig(), + getParentForChildren(), + isClean()); + dataplexConfig_ = null; + } + return dataplexConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataIntegration) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataIntegration) + private static final com.google.cloud.metastore.v1beta.MetadataIntegration DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataIntegration(); + } + + public static com.google.cloud.metastore.v1beta.MetadataIntegration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataIntegration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataIntegration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegrationOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegrationOrBuilder.java new file mode 100644 index 000000000000..4871547ed936 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataIntegrationOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface MetadataIntegrationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataIntegration) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + * @return Whether the dataCatalogConfig field is set. + */ + boolean hasDataCatalogConfig(); + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + * @return The dataCatalogConfig. + */ + com.google.cloud.metastore.v1beta.DataCatalogConfig getDataCatalogConfig(); + /** + *
+   * The integration config for the Data Catalog service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1; + */ + com.google.cloud.metastore.v1beta.DataCatalogConfigOrBuilder getDataCatalogConfigOrBuilder(); + + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + * @return Whether the dataplexConfig field is set. + */ + boolean hasDataplexConfig(); + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + * @return The dataplexConfig. + */ + com.google.cloud.metastore.v1beta.DataplexConfig getDataplexConfig(); + /** + *
+   * The integration config for the Dataplex service.
+   * 
+ * + * .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2; + */ + com.google.cloud.metastore.v1beta.DataplexConfigOrBuilder getDataplexConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivity.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivity.java new file mode 100644 index 000000000000..06ef5cd696e6 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivity.java @@ -0,0 +1,1304 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * The metadata management activities of the metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataManagementActivity} + */ +public final class MetadataManagementActivity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MetadataManagementActivity) + MetadataManagementActivityOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataManagementActivity.newBuilder() to construct. + private MetadataManagementActivity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataManagementActivity() { + metadataExports_ = java.util.Collections.emptyList(); + restores_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataManagementActivity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataManagementActivity.class, com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder.class); + } + + public static final int METADATA_EXPORTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List metadataExports_; + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getMetadataExportsList() { + return metadataExports_; + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getMetadataExportsOrBuilderList() { + return metadataExports_; + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getMetadataExportsCount() { + return metadataExports_.size(); + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataExport getMetadataExports(int index) { + return metadataExports_.get(index); + } + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index) { + return metadataExports_.get(index); + } + + public static final int RESTORES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List restores_; + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getRestoresList() { + return restores_; + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getRestoresOrBuilderList() { + return restores_; + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getRestoresCount() { + return restores_.size(); + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Restore getRestores(int index) { + return restores_.get(index); + } + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.RestoreOrBuilder getRestoresOrBuilder( + int index) { + return restores_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < metadataExports_.size(); i++) { + output.writeMessage(1, metadataExports_.get(i)); + } + for (int i = 0; i < restores_.size(); i++) { + output.writeMessage(2, restores_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < metadataExports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metadataExports_.get(i)); + } + for (int i = 0; i < restores_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, restores_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.MetadataManagementActivity)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.MetadataManagementActivity other = (com.google.cloud.metastore.v1beta.MetadataManagementActivity) obj; + + if (!getMetadataExportsList() + .equals(other.getMetadataExportsList())) return false; + if (!getRestoresList() + .equals(other.getRestoresList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMetadataExportsCount() > 0) { + hash = (37 * hash) + METADATA_EXPORTS_FIELD_NUMBER; + hash = (53 * hash) + getMetadataExportsList().hashCode(); + } + if (getRestoresCount() > 0) { + hash = (37 * hash) + RESTORES_FIELD_NUMBER; + hash = (53 * hash) + getRestoresList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.MetadataManagementActivity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The metadata management activities of the metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MetadataManagementActivity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MetadataManagementActivity) + com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MetadataManagementActivity.class, com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.MetadataManagementActivity.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (metadataExportsBuilder_ == null) { + metadataExports_ = java.util.Collections.emptyList(); + } else { + metadataExports_ = null; + metadataExportsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (restoresBuilder_ == null) { + restores_ = java.util.Collections.emptyList(); + } else { + restores_ = null; + restoresBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataManagementActivity getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataManagementActivity build() { + com.google.cloud.metastore.v1beta.MetadataManagementActivity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataManagementActivity buildPartial() { + com.google.cloud.metastore.v1beta.MetadataManagementActivity result = new com.google.cloud.metastore.v1beta.MetadataManagementActivity(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.MetadataManagementActivity result) { + if (metadataExportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metadataExports_ = java.util.Collections.unmodifiableList(metadataExports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metadataExports_ = metadataExports_; + } else { + result.metadataExports_ = metadataExportsBuilder_.build(); + } + if (restoresBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + restores_ = java.util.Collections.unmodifiableList(restores_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.restores_ = restores_; + } else { + result.restores_ = restoresBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.MetadataManagementActivity result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.MetadataManagementActivity) { + return mergeFrom((com.google.cloud.metastore.v1beta.MetadataManagementActivity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.MetadataManagementActivity other) { + if (other == com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance()) return this; + if (metadataExportsBuilder_ == null) { + if (!other.metadataExports_.isEmpty()) { + if (metadataExports_.isEmpty()) { + metadataExports_ = other.metadataExports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetadataExportsIsMutable(); + metadataExports_.addAll(other.metadataExports_); + } + onChanged(); + } + } else { + if (!other.metadataExports_.isEmpty()) { + if (metadataExportsBuilder_.isEmpty()) { + metadataExportsBuilder_.dispose(); + metadataExportsBuilder_ = null; + metadataExports_ = other.metadataExports_; + bitField0_ = (bitField0_ & ~0x00000001); + metadataExportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMetadataExportsFieldBuilder() : null; + } else { + metadataExportsBuilder_.addAllMessages(other.metadataExports_); + } + } + } + if (restoresBuilder_ == null) { + if (!other.restores_.isEmpty()) { + if (restores_.isEmpty()) { + restores_ = other.restores_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRestoresIsMutable(); + restores_.addAll(other.restores_); + } + onChanged(); + } + } else { + if (!other.restores_.isEmpty()) { + if (restoresBuilder_.isEmpty()) { + restoresBuilder_.dispose(); + restoresBuilder_ = null; + restores_ = other.restores_; + bitField0_ = (bitField0_ & ~0x00000002); + restoresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRestoresFieldBuilder() : null; + } else { + restoresBuilder_.addAllMessages(other.restores_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1beta.MetadataExport m = + input.readMessage( + com.google.cloud.metastore.v1beta.MetadataExport.parser(), + extensionRegistry); + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(m); + } else { + metadataExportsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.google.cloud.metastore.v1beta.Restore m = + input.readMessage( + com.google.cloud.metastore.v1beta.Restore.parser(), + extensionRegistry); + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(m); + } else { + restoresBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List metadataExports_ = + java.util.Collections.emptyList(); + private void ensureMetadataExportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metadataExports_ = new java.util.ArrayList(metadataExports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataExport, com.google.cloud.metastore.v1beta.MetadataExport.Builder, com.google.cloud.metastore.v1beta.MetadataExportOrBuilder> metadataExportsBuilder_; + + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getMetadataExportsList() { + if (metadataExportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metadataExports_); + } else { + return metadataExportsBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getMetadataExportsCount() { + if (metadataExportsBuilder_ == null) { + return metadataExports_.size(); + } else { + return metadataExportsBuilder_.getCount(); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.MetadataExport getMetadataExports(int index) { + if (metadataExportsBuilder_ == null) { + return metadataExports_.get(index); + } else { + return metadataExportsBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataExports( + int index, com.google.cloud.metastore.v1beta.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.set(index, value); + onChanged(); + } else { + metadataExportsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataExports( + int index, com.google.cloud.metastore.v1beta.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.set(index, builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports(com.google.cloud.metastore.v1beta.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.add(value); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + int index, com.google.cloud.metastore.v1beta.MetadataExport value) { + if (metadataExportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataExportsIsMutable(); + metadataExports_.add(index, value); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + com.google.cloud.metastore.v1beta.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addMetadataExports( + int index, com.google.cloud.metastore.v1beta.MetadataExport.Builder builderForValue) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.add(index, builderForValue.build()); + onChanged(); + } else { + metadataExportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllMetadataExports( + java.lang.Iterable values) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metadataExports_); + onChanged(); + } else { + metadataExportsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearMetadataExports() { + if (metadataExportsBuilder_ == null) { + metadataExports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metadataExportsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeMetadataExports(int index) { + if (metadataExportsBuilder_ == null) { + ensureMetadataExportsIsMutable(); + metadataExports_.remove(index); + onChanged(); + } else { + metadataExportsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.MetadataExport.Builder getMetadataExportsBuilder( + int index) { + return getMetadataExportsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index) { + if (metadataExportsBuilder_ == null) { + return metadataExports_.get(index); } else { + return metadataExportsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getMetadataExportsOrBuilderList() { + if (metadataExportsBuilder_ != null) { + return metadataExportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metadataExports_); + } + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.MetadataExport.Builder addMetadataExportsBuilder() { + return getMetadataExportsFieldBuilder().addBuilder( + com.google.cloud.metastore.v1beta.MetadataExport.getDefaultInstance()); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.MetadataExport.Builder addMetadataExportsBuilder( + int index) { + return getMetadataExportsFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1beta.MetadataExport.getDefaultInstance()); + } + /** + *
+     * Output only. The latest metadata exports of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getMetadataExportsBuilderList() { + return getMetadataExportsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataExport, com.google.cloud.metastore.v1beta.MetadataExport.Builder, com.google.cloud.metastore.v1beta.MetadataExportOrBuilder> + getMetadataExportsFieldBuilder() { + if (metadataExportsBuilder_ == null) { + metadataExportsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataExport, com.google.cloud.metastore.v1beta.MetadataExport.Builder, com.google.cloud.metastore.v1beta.MetadataExportOrBuilder>( + metadataExports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + metadataExports_ = null; + } + return metadataExportsBuilder_; + } + + private java.util.List restores_ = + java.util.Collections.emptyList(); + private void ensureRestoresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + restores_ = new java.util.ArrayList(restores_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Restore, com.google.cloud.metastore.v1beta.Restore.Builder, com.google.cloud.metastore.v1beta.RestoreOrBuilder> restoresBuilder_; + + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getRestoresList() { + if (restoresBuilder_ == null) { + return java.util.Collections.unmodifiableList(restores_); + } else { + return restoresBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getRestoresCount() { + if (restoresBuilder_ == null) { + return restores_.size(); + } else { + return restoresBuilder_.getCount(); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.Restore getRestores(int index) { + if (restoresBuilder_ == null) { + return restores_.get(index); + } else { + return restoresBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRestores( + int index, com.google.cloud.metastore.v1beta.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.set(index, value); + onChanged(); + } else { + restoresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setRestores( + int index, com.google.cloud.metastore.v1beta.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.set(index, builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores(com.google.cloud.metastore.v1beta.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.add(value); + onChanged(); + } else { + restoresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + int index, com.google.cloud.metastore.v1beta.Restore value) { + if (restoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestoresIsMutable(); + restores_.add(index, value); + onChanged(); + } else { + restoresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + com.google.cloud.metastore.v1beta.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addRestores( + int index, com.google.cloud.metastore.v1beta.Restore.Builder builderForValue) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.add(index, builderForValue.build()); + onChanged(); + } else { + restoresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllRestores( + java.lang.Iterable values) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, restores_); + onChanged(); + } else { + restoresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearRestores() { + if (restoresBuilder_ == null) { + restores_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + restoresBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeRestores(int index) { + if (restoresBuilder_ == null) { + ensureRestoresIsMutable(); + restores_.remove(index); + onChanged(); + } else { + restoresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.Restore.Builder getRestoresBuilder( + int index) { + return getRestoresFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.RestoreOrBuilder getRestoresOrBuilder( + int index) { + if (restoresBuilder_ == null) { + return restores_.get(index); } else { + return restoresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getRestoresOrBuilderList() { + if (restoresBuilder_ != null) { + return restoresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(restores_); + } + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.Restore.Builder addRestoresBuilder() { + return getRestoresFieldBuilder().addBuilder( + com.google.cloud.metastore.v1beta.Restore.getDefaultInstance()); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.Restore.Builder addRestoresBuilder( + int index) { + return getRestoresFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1beta.Restore.getDefaultInstance()); + } + /** + *
+     * Output only. The latest restores of the metastore service.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getRestoresBuilderList() { + return getRestoresFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Restore, com.google.cloud.metastore.v1beta.Restore.Builder, com.google.cloud.metastore.v1beta.RestoreOrBuilder> + getRestoresFieldBuilder() { + if (restoresBuilder_ == null) { + restoresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.Restore, com.google.cloud.metastore.v1beta.Restore.Builder, com.google.cloud.metastore.v1beta.RestoreOrBuilder>( + restores_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + restores_ = null; + } + return restoresBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MetadataManagementActivity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MetadataManagementActivity) + private static final com.google.cloud.metastore.v1beta.MetadataManagementActivity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MetadataManagementActivity(); + } + + public static com.google.cloud.metastore.v1beta.MetadataManagementActivity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataManagementActivity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataManagementActivity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivityOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivityOrBuilder.java new file mode 100644 index 000000000000..63a71520ea90 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetadataManagementActivityOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface MetadataManagementActivityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MetadataManagementActivity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getMetadataExportsList(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1beta.MetadataExport getMetadataExports(int index); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getMetadataExportsCount(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getMetadataExportsOrBuilderList(); + /** + *
+   * Output only. The latest metadata exports of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1beta.MetadataExportOrBuilder getMetadataExportsOrBuilder( + int index); + + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getRestoresList(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1beta.Restore getRestores(int index); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getRestoresCount(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getRestoresOrBuilderList(); + /** + *
+   * Output only. The latest restores of the metastore service.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1beta.RestoreOrBuilder getRestoresOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreFederationProto.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreFederationProto.java new file mode 100644 index 000000000000..16791bf15cd8 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreFederationProto.java @@ -0,0 +1,269 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public final class MetastoreFederationProto { + private MetastoreFederationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Federation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Federation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_BackendMetastore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_GetFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/metastore/v1beta/metastor" + + "e_federation.proto\022\035google.cloud.metasto" + + "re.v1beta\032\034google/api/annotations.proto\032" + + "\027google/api/client.proto\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\032-google/cloud/metastore/v1beta/meta" + + "store.proto\032#google/longrunning/operatio" + + "ns.proto\032\033google/protobuf/empty.proto\032 g" + + "oogle/protobuf/field_mask.proto\032\037google/" + + "protobuf/timestamp.proto\"\273\006\n\nFederation\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030\002 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upda" + + "te_time\030\003 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\022E\n\006labels\030\004 \003(\01325.google.cloud.me" + + "tastore.v1beta.Federation.LabelsEntry\022\024\n" + + "\007version\030\005 \001(\tB\003\340A\005\022\\\n\022backend_metastore" + + "s\030\006 \003(\0132@.google.cloud.metastore.v1beta." + + "Federation.BackendMetastoresEntry\022\031\n\014end" + + "point_uri\030\007 \001(\tB\003\340A\003\022C\n\005state\030\010 \001(\0162/.go" + + "ogle.cloud.metastore.v1beta.Federation.S" + + "tateB\003\340A\003\022\032\n\rstate_message\030\t \001(\tB\003\340A\003\022\020\n" + + "\003uid\030\n \001(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032i\n\026BackendMetasto" + + "resEntry\022\013\n\003key\030\001 \001(\005\022>\n\005value\030\002 \001(\0132/.g" + + "oogle.cloud.metastore.v1beta.BackendMeta" + + "store:\0028\001\"_\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UPDATING\020" + + "\003\022\014\n\010DELETING\020\004\022\t\n\005ERROR\020\005:j\352Ag\n#metasto" + + "re.googleapis.com/Federation\022@projects/{" + + "project}/locations/{location}/federation" + + "s/{federation}\"\334\001\n\020BackendMetastore\022\014\n\004n" + + "ame\030\001 \001(\t\022U\n\016metastore_type\030\002 \001(\0162=.goog" + + "le.cloud.metastore.v1beta.BackendMetasto" + + "re.MetastoreType\"c\n\rMetastoreType\022\036\n\032MET" + + "ASTORE_TYPE_UNSPECIFIED\020\000\022\014\n\010DATAPLEX\020\001\022" + + "\014\n\010BIGQUERY\020\002\022\026\n\022DATAPROC_METASTORE\020\003\"\262\001" + + "\n\026ListFederationsRequest\022;\n\006parent\030\001 \001(\t" + + "B+\340A\002\372A%\022#metastore.googleapis.com/Feder" + + "ation\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_to" + + "ken\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010o" + + "rder_by\030\005 \001(\tB\003\340A\001\"\207\001\n\027ListFederationsRe" + + "sponse\022>\n\013federations\030\001 \003(\0132).google.clo" + + "ud.metastore.v1beta.Federation\022\027\n\017next_p" + + "age_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Q\n\024" + + "GetFederationRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372" + + "A%\n#metastore.googleapis.com/Federation\"" + + "\317\001\n\027CreateFederationRequest\022;\n\006parent\030\001 " + + "\001(\tB+\340A\002\372A%\022#metastore.googleapis.com/Fe" + + "deration\022\032\n\rfederation_id\030\002 \001(\tB\003\340A\002\022B\n\n" + + "federation\030\003 \001(\0132).google.cloud.metastor" + + "e.v1beta.FederationB\003\340A\002\022\027\n\nrequest_id\030\004" + + " \001(\tB\003\340A\001\"\254\001\n\027UpdateFederationRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.Fie" + + "ldMaskB\003\340A\002\022B\n\nfederation\030\002 \001(\0132).google" + + ".cloud.metastore.v1beta.FederationB\003\340A\002\022" + + "\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"m\n\027DeleteFedera" + + "tionRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#metas" + + "tore.googleapis.com/Federation\022\027\n\nreques" + + "t_id\030\002 \001(\tB\003\340A\0012\230\n\n\033DataprocMetastoreFed" + + "eration\022\306\001\n\017ListFederations\0225.google.clo" + + "ud.metastore.v1beta.ListFederationsReque" + + "st\0326.google.cloud.metastore.v1beta.ListF" + + "ederationsResponse\"D\202\323\344\223\0025\0223/v1beta/{par" + + "ent=projects/*/locations/*}/federations\332" + + "A\006parent\022\263\001\n\rGetFederation\0223.google.clou" + + "d.metastore.v1beta.GetFederationRequest\032" + + ").google.cloud.metastore.v1beta.Federati" + + "on\"B\202\323\344\223\0025\0223/v1beta/{name=projects/*/loc" + + "ations/*/federations/*}\332A\004name\022\225\002\n\020Creat" + + "eFederation\0226.google.cloud.metastore.v1b" + + "eta.CreateFederationRequest\032\035.google.lon" + + "grunning.Operation\"\251\001\202\323\344\223\002A\"3/v1beta/{pa" + + "rent=projects/*/locations/*}/federations" + + ":\nfederation\332A\037parent,federation,federat" + + "ion_id\312A=\n\nFederation\022/google.cloud.meta" + + "store.v1beta.OperationMetadata\022\227\002\n\020Updat" + + "eFederation\0226.google.cloud.metastore.v1b" + + "eta.UpdateFederationRequest\032\035.google.lon" + + "grunning.Operation\"\253\001\202\323\344\223\002L2>/v1beta/{fe" + + "deration.name=projects/*/locations/*/fed" + + "erations/*}:\nfederation\332A\026federation,upd" + + "ate_mask\312A=\n\nFederation\022/google.cloud.me" + + "tastore.v1beta.OperationMetadata\022\371\001\n\020Del" + + "eteFederation\0226.google.cloud.metastore.v" + + "1beta.DeleteFederationRequest\032\035.google.l" + + "ongrunning.Operation\"\215\001\202\323\344\223\0025*3/v1beta/{" + + "name=projects/*/locations/*/federations/" + + "*}\332A\004name\312AH\n\025google.protobuf.Empty\022/goo" + + "gle.cloud.metastore.v1beta.OperationMeta" + + "data\032L\312A\030metastore.googleapis.com\322A.http" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rmB\200\001\n!com.google.cloud.metastore.v1beta" + + "B\030MetastoreFederationProtoP\001Z?cloud.goog" + + "le.com/go/metastore/apiv1beta/metastorep" + + "b;metastorepbb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.metastore.v1beta.MetastoreProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_metastore_v1beta_Federation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_metastore_v1beta_Federation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_Federation_descriptor, + new java.lang.String[] { "Name", "CreateTime", "UpdateTime", "Labels", "Version", "BackendMetastores", "EndpointUri", "State", "StateMessage", "Uid", }); + internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_descriptor = + internal_static_google_cloud_metastore_v1beta_Federation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_Federation_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_descriptor = + internal_static_google_cloud_metastore_v1beta_Federation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_Federation_BackendMetastoresEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_metastore_v1beta_BackendMetastore_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_BackendMetastore_descriptor, + new java.lang.String[] { "Name", "MetastoreType", }); + internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_ListFederationsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); + internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_ListFederationsResponse_descriptor, + new java.lang.String[] { "Federations", "NextPageToken", "Unreachable", }); + internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_metastore_v1beta_GetFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_GetFederationRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_CreateFederationRequest_descriptor, + new java.lang.String[] { "Parent", "FederationId", "Federation", "RequestId", }); + internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor, + new java.lang.String[] { "UpdateMask", "Federation", "RequestId", }); + internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_metastore_v1beta_DeleteFederationRequest_descriptor, + new java.lang.String[] { "Name", "RequestId", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.metastore.v1beta.MetastoreProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreProto.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreProto.java new file mode 100644 index 000000000000..8c159cb7b921 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MetastoreProto.java @@ -0,0 +1,1093 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public final class MetastoreProto { + private MetastoreProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Service_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Service_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Service_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Service_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_MetadataIntegration_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_MetadataIntegration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_DataCatalogConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_DataplexConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_DataplexConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_DataplexConfig_LakeResourcesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_DataplexConfig_LakeResourcesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Lake_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Lake_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_MaintenanceWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_ConfigOverridesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_ConfigOverridesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_AuxiliaryVersionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_HiveMetastoreConfig_AuxiliaryVersionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_KerberosConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_KerberosConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Secret_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Secret_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_EncryptionConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_ConfigOverridesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_AuxiliaryVersionConfig_ConfigOverridesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_NetworkConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_TelemetryConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_TelemetryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_MetadataManagementActivity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_MetadataImport_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_MetadataImport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_MetadataImport_DatabaseDump_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_MetadataExport_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_MetadataExport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Backup_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Backup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_Restore_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_Restore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ScalingConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ScalingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ListServicesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ListServicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ListServicesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ListServicesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_GetServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_GetServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_CreateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_DeleteServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ListMetadataImportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ListMetadataImportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_GetMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_CreateMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ListBackupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ListBackupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_GetBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_GetBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_CreateBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_DeleteBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ExportMetadataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_LocationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_LocationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_LocationMetadata_HiveMetastoreVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_DatabaseDumpSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_AlterMetadataResourceLocationResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/metastore/v1beta/metastor" + + "e.proto\022\035google.cloud.metastore.v1beta\032\034" + + "google/api/annotations.proto\032\027google/api" + + "/client.proto\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032#googl" + + "e/longrunning/operations.proto\032\033google/p" + + "rotobuf/empty.proto\032 google/protobuf/fie" + + "ld_mask.proto\032\037google/protobuf/timestamp" + + ".proto\032\036google/protobuf/wrappers.proto\032\033" + + "google/type/dayofweek.proto\"\225\016\n\007Service\022" + + "S\n\025hive_metastore_config\030\005 \001(\01322.google." + + "cloud.metastore.v1beta.HiveMetastoreConf" + + "igH\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013create_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\022B\n\006labels\030\004 \003(\01322.google.clo" + + "ud.metastore.v1beta.Service.LabelsEntry\022" + + "7\n\007network\030\007 \001(\tB&\340A\005\372A \n\036compute.google" + + "apis.com/Network\022\031\n\014endpoint_uri\030\010 \001(\tB\003" + + "\340A\003\022\014\n\004port\030\t \001(\005\022@\n\005state\030\n \001(\0162,.googl" + + "e.cloud.metastore.v1beta.Service.StateB\003" + + "\340A\003\022\032\n\rstate_message\030\013 \001(\tB\003\340A\003\022\035\n\020artif" + + "act_gcs_uri\030\014 \001(\tB\003\340A\003\0229\n\004tier\030\r \001(\0162+.g" + + "oogle.cloud.metastore.v1beta.Service.Tie" + + "r\022P\n\024metadata_integration\030\016 \001(\01322.google" + + ".cloud.metastore.v1beta.MetadataIntegrat" + + "ion\022L\n\022maintenance_window\030\017 \001(\01320.google" + + ".cloud.metastore.v1beta.MaintenanceWindo" + + "w\022\020\n\003uid\030\020 \001(\tB\003\340A\003\022d\n\034metadata_manageme" + + "nt_activity\030\021 \001(\01329.google.cloud.metasto" + + "re.v1beta.MetadataManagementActivityB\003\340A" + + "\003\022S\n\017release_channel\030\023 \001(\01625.google.clou" + + "d.metastore.v1beta.Service.ReleaseChanne" + + "lB\003\340A\005\022O\n\021encryption_config\030\024 \001(\0132/.goog" + + "le.cloud.metastore.v1beta.EncryptionConf" + + "igB\003\340A\005\022D\n\016network_config\030\025 \001(\0132,.google" + + ".cloud.metastore.v1beta.NetworkConfig\022O\n" + + "\rdatabase_type\030\026 \001(\01623.google.cloud.meta" + + "store.v1beta.Service.DatabaseTypeB\003\340A\005\022H" + + "\n\020telemetry_config\030\027 \001(\0132..google.cloud." + + "metastore.v1beta.TelemetryConfig\022D\n\016scal" + + "ing_config\030\030 \001(\0132,.google.cloud.metastor" + + "e.v1beta.ScalingConfig\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"~\n\005State\022\025" + + "\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006A" + + "CTIVE\020\002\022\016\n\nSUSPENDING\020\003\022\r\n\tSUSPENDED\020\004\022\014" + + "\n\010UPDATING\020\005\022\014\n\010DELETING\020\006\022\t\n\005ERROR\020\007\";\n" + + "\004Tier\022\024\n\020TIER_UNSPECIFIED\020\000\022\r\n\tDEVELOPER" + + "\020\001\022\016\n\nENTERPRISE\020\003\"I\n\016ReleaseChannel\022\037\n\033" + + "RELEASE_CHANNEL_UNSPECIFIED\020\000\022\n\n\006CANARY\020" + + "\001\022\n\n\006STABLE\020\002\"E\n\014DatabaseType\022\035\n\031DATABAS" + + "E_TYPE_UNSPECIFIED\020\000\022\t\n\005MYSQL\020\001\022\013\n\007SPANN" + + "ER\020\002:a\352A^\n metastore.googleapis.com/Serv" + + "ice\022:projects/{project}/locations/{locat" + + "ion}/services/{service}B\022\n\020metastore_con" + + "fig\"\254\001\n\023MetadataIntegration\022M\n\023data_cata" + + "log_config\030\001 \001(\01320.google.cloud.metastor" + + "e.v1beta.DataCatalogConfig\022F\n\017dataplex_c" + + "onfig\030\002 \001(\0132-.google.cloud.metastore.v1b" + + "eta.DataplexConfig\"$\n\021DataCatalogConfig\022" + + "\017\n\007enabled\030\002 \001(\010\"\305\001\n\016DataplexConfig\022X\n\016l" + + "ake_resources\030\001 \003(\0132@.google.cloud.metas" + + "tore.v1beta.DataplexConfig.LakeResources" + + "Entry\032Y\n\022LakeResourcesEntry\022\013\n\003key\030\001 \001(\t" + + "\0222\n\005value\030\002 \001(\0132#.google.cloud.metastore" + + ".v1beta.Lake:\0028\001\"7\n\004Lake\022/\n\004name\030\001 \001(\tB!" + + "\372A\036\n\034dataplex.googleapis.com/Lake\"r\n\021Mai" + + "ntenanceWindow\0220\n\013hour_of_day\030\001 \001(\0132\033.go" + + "ogle.protobuf.Int32Value\022+\n\013day_of_week\030" + + "\002 \001(\0162\026.google.type.DayOfWeek\"\223\005\n\023HiveMe" + + "tastoreConfig\022\024\n\007version\030\001 \001(\tB\003\340A\005\022a\n\020c" + + "onfig_overrides\030\002 \003(\0132G.google.cloud.met" + + "astore.v1beta.HiveMetastoreConfig.Config" + + "OverridesEntry\022F\n\017kerberos_config\030\003 \001(\0132" + + "-.google.cloud.metastore.v1beta.Kerberos" + + "Config\022^\n\021endpoint_protocol\030\004 \001(\0162C.goog" + + "le.cloud.metastore.v1beta.HiveMetastoreC" + + "onfig.EndpointProtocol\022e\n\022auxiliary_vers" + + "ions\030\005 \003(\0132I.google.cloud.metastore.v1be" + + "ta.HiveMetastoreConfig.AuxiliaryVersions" + + "Entry\0326\n\024ConfigOverridesEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032o\n\026AuxiliaryVersio" + + "nsEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 \001(\01325.go" + + "ogle.cloud.metastore.v1beta.AuxiliaryVer" + + "sionConfig:\0028\001\"K\n\020EndpointProtocol\022!\n\035EN" + + "DPOINT_PROTOCOL_UNSPECIFIED\020\000\022\n\n\006THRIFT\020" + + "\001\022\010\n\004GRPC\020\002\"w\n\016KerberosConfig\0225\n\006keytab\030" + + "\001 \001(\0132%.google.cloud.metastore.v1beta.Se" + + "cret\022\021\n\tprincipal\030\002 \001(\t\022\033\n\023krb5_config_g" + + "cs_uri\030\003 \001(\t\")\n\006Secret\022\026\n\014cloud_secret\030\002" + + " \001(\tH\000B\007\n\005value\"#\n\020EncryptionConfig\022\017\n\007k" + + "ms_key\030\001 \001(\t\"\222\002\n\026AuxiliaryVersionConfig\022" + + "\017\n\007version\030\001 \001(\t\022d\n\020config_overrides\030\002 \003" + + "(\0132J.google.cloud.metastore.v1beta.Auxil" + + "iaryVersionConfig.ConfigOverridesEntry\022I" + + "\n\016network_config\030\003 \001(\0132,.google.cloud.me" + + "tastore.v1beta.NetworkConfigB\003\340A\003\0326\n\024Con" + + "figOverridesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"\365\001\n\rNetworkConfig\022M\n\tconsumers" + + "\030\001 \003(\01325.google.cloud.metastore.v1beta.N" + + "etworkConfig.ConsumerB\003\340A\005\022\035\n\025custom_rou" + + "tes_enabled\030\002 \001(\010\032v\n\010Consumer\022?\n\nsubnetw" + + "ork\030\001 \001(\tB)\340A\005\372A#\n!compute.googleapis.co" + + "m/SubnetworkH\000\022\031\n\014endpoint_uri\030\003 \001(\tB\003\340A" + + "\003B\016\n\014vpc_resource\"\236\001\n\017TelemetryConfig\022L\n" + + "\nlog_format\030\001 \001(\01628.google.cloud.metasto" + + "re.v1beta.TelemetryConfig.LogFormat\"=\n\tL" + + "ogFormat\022\032\n\026LOG_FORMAT_UNSPECIFIED\020\000\022\n\n\006" + + "LEGACY\020\001\022\010\n\004JSON\020\002\"\251\001\n\032MetadataManagemen" + + "tActivity\022L\n\020metadata_exports\030\001 \003(\0132-.go" + + "ogle.cloud.metastore.v1beta.MetadataExpo" + + "rtB\003\340A\003\022=\n\010restores\030\002 \003(\0132&.google.cloud" + + ".metastore.v1beta.RestoreB\003\340A\003\"\220\007\n\016Metad" + + "ataImport\022X\n\rdatabase_dump\030\006 \001(\0132:.googl" + + "e.cloud.metastore.v1beta.MetadataImport." + + "DatabaseDumpB\003\340A\005H\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\023" + + "\n\013description\030\002 \001(\t\0224\n\013create_time\030\003 \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upd" + + "ate_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\0221\n\010end_time\030\007 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022G\n\005state\030\005 \001(\01623.goog" + + "le.cloud.metastore.v1beta.MetadataImport" + + ".StateB\003\340A\003\032\243\002\n\014DatabaseDump\022b\n\rdatabase" + + "_type\030\001 \001(\0162G.google.cloud.metastore.v1b" + + "eta.MetadataImport.DatabaseDump.Database" + + "TypeB\002\030\001\022\017\n\007gcs_uri\030\002 \001(\t\022\033\n\017source_data" + + "base\030\003 \001(\tB\002\030\001\022G\n\004type\030\004 \001(\01624.google.cl" + + "oud.metastore.v1beta.DatabaseDumpSpec.Ty" + + "peB\003\340A\001\"8\n\014DatabaseType\022\035\n\031DATABASE_TYPE" + + "_UNSPECIFIED\020\000\022\t\n\005MYSQL\020\001\"T\n\005State\022\025\n\021ST" + + "ATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEE" + + "DED\020\002\022\014\n\010UPDATING\020\003\022\n\n\006FAILED\020\004:\213\001\352A\207\001\n\'" + + "metastore.googleapis.com/MetadataImport\022" + + "\\projects/{project}/locations/{location}" + + "/services/{service}/metadataImports/{met" + + "adata_import}B\n\n\010metadata\"\242\003\n\016MetadataEx" + + "port\022\"\n\023destination_gcs_uri\030\004 \001(\tB\003\340A\003H\000" + + "\0223\n\nstart_time\030\001 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\003\022G\n\005state\030\003 \001(\0162" + + "3.google.cloud.metastore.v1beta.Metadata" + + "Export.StateB\003\340A\003\022U\n\022database_dump_type\030" + + "\005 \001(\01624.google.cloud.metastore.v1beta.Da" + + "tabaseDumpSpec.TypeB\003\340A\003\"U\n\005State\022\025\n\021STA" + + "TE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEED" + + "ED\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED\020\004B\r\n\013desti" + + "nation\"\230\004\n\006Backup\022\021\n\004name\030\001 \001(\tB\003\340A\005\0224\n\013" + + "create_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\0221\n\010end_time\030\003 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022?\n\005state\030\004 \001(\0162+.g" + + "oogle.cloud.metastore.v1beta.Backup.Stat" + + "eB\003\340A\003\022E\n\020service_revision\030\005 \001(\0132&.googl" + + "e.cloud.metastore.v1beta.ServiceB\003\340A\003\022\023\n" + + "\013description\030\006 \001(\t\022\037\n\022restoring_services" + + "\030\007 \003(\tB\003\340A\003\"a\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\014\n\010CREATING\020\001\022\014\n\010DELETING\020\002\022\n\n\006ACTIV" + + "E\020\003\022\n\n\006FAILED\020\004\022\r\n\tRESTORING\020\005:q\352An\n\037met" + + "astore.googleapis.com/Backup\022Kprojects/{" + + "project}/locations/{location}/services/{" + + "service}/backups/{backup}\"\352\003\n\007Restore\0223\n" + + "\nstart_time\030\001 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022@\n\005state\030\003 \001(\0162,.g" + + "oogle.cloud.metastore.v1beta.Restore.Sta" + + "teB\003\340A\003\0227\n\006backup\030\004 \001(\tB\'\340A\003\372A!\n\037metasto" + + "re.googleapis.com/Backup\022E\n\004type\030\005 \001(\01622" + + ".google.cloud.metastore.v1beta.Restore.R" + + "estoreTypeB\003\340A\003\022\024\n\007details\030\006 \001(\tB\003\340A\003\"U\n" + + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING" + + "\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELL" + + "ED\020\004\"H\n\013RestoreType\022\034\n\030RESTORE_TYPE_UNSP" + + "ECIFIED\020\000\022\010\n\004FULL\020\001\022\021\n\rMETADATA_ONLY\020\002\"\201" + + "\002\n\rScalingConfig\022R\n\rinstance_size\030\001 \001(\0162" + + "9.google.cloud.metastore.v1beta.ScalingC" + + "onfig.InstanceSizeH\000\022\030\n\016scaling_factor\030\002" + + " \001(\002H\000\"q\n\014InstanceSize\022\035\n\031INSTANCE_SIZE_" + + "UNSPECIFIED\020\000\022\017\n\013EXTRA_SMALL\020\001\022\t\n\005SMALL\020" + + "\002\022\n\n\006MEDIUM\020\003\022\t\n\005LARGE\020\004\022\017\n\013EXTRA_LARGE\020" + + "\005B\017\n\rscaling_model\"\254\001\n\023ListServicesReque" + + "st\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 metastore.go" + + "ogleapis.com/Service\022\026\n\tpage_size\030\002 \001(\005B" + + "\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030" + + "\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"~\n\024Lis" + + "tServicesResponse\0228\n\010services\030\001 \003(\0132&.go" + + "ogle.cloud.metastore.v1beta.Service\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(" + + "\t\"K\n\021GetServiceRequest\0226\n\004name\030\001 \001(\tB(\340A" + + "\002\372A\"\n metastore.googleapis.com/Service\"\300" + + "\001\n\024CreateServiceRequest\0228\n\006parent\030\001 \001(\tB" + + "(\340A\002\372A\"\022 metastore.googleapis.com/Servic" + + "e\022\027\n\nservice_id\030\002 \001(\tB\003\340A\002\022<\n\007service\030\003 " + + "\001(\0132&.google.cloud.metastore.v1beta.Serv" + + "iceB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\243\001\n\024Up" + + "dateServiceRequest\0224\n\013update_mask\030\001 \001(\0132" + + "\032.google.protobuf.FieldMaskB\003\340A\002\022<\n\007serv" + + "ice\030\002 \001(\0132&.google.cloud.metastore.v1bet" + + "a.ServiceB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"" + + "g\n\024DeleteServiceRequest\0226\n\004name\030\001 \001(\tB(\340" + + "A\002\372A\"\n metastore.googleapis.com/Service\022" + + "\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\272\001\n\032ListMetadat" + + "aImportsRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\022" + + "\'metastore.googleapis.com/MetadataImport" + + "\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003" + + " \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_" + + "by\030\005 \001(\tB\003\340A\001\"\224\001\n\033ListMetadataImportsRes" + + "ponse\022G\n\020metadata_imports\030\001 \003(\0132-.google" + + ".cloud.metastore.v1beta.MetadataImport\022\027" + + "\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003" + + " \003(\t\"Y\n\030GetMetadataImportRequest\022=\n\004name" + + "\030\001 \001(\tB/\340A\002\372A)\n\'metastore.googleapis.com" + + "/MetadataImport\"\345\001\n\033CreateMetadataImport" + + "Request\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\022\'metasto" + + "re.googleapis.com/MetadataImport\022\037\n\022meta" + + "data_import_id\030\002 \001(\tB\003\340A\002\022K\n\017metadata_im" + + "port\030\003 \001(\0132-.google.cloud.metastore.v1be" + + "ta.MetadataImportB\003\340A\002\022\027\n\nrequest_id\030\004 \001" + + "(\tB\003\340A\001\"\271\001\n\033UpdateMetadataImportRequest\022" + + "4\n\013update_mask\030\001 \001(\0132\032.google.protobuf.F" + + "ieldMaskB\003\340A\002\022K\n\017metadata_import\030\002 \001(\0132-" + + ".google.cloud.metastore.v1beta.MetadataI" + + "mportB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"\252\001\n\022" + + "ListBackupsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372" + + "A!\022\037metastore.googleapis.com/Backup\022\026\n\tp" + + "age_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB" + + "\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 " + + "\001(\tB\003\340A\001\"{\n\023ListBackupsResponse\0226\n\007backu" + + "ps\030\001 \003(\0132%.google.cloud.metastore.v1beta" + + ".Backup\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" + + "achable\030\003 \003(\t\"I\n\020GetBackupRequest\0225\n\004nam" + + "e\030\001 \001(\tB\'\340A\002\372A!\n\037metastore.googleapis.co" + + "m/Backup\"\273\001\n\023CreateBackupRequest\0227\n\006pare" + + "nt\030\001 \001(\tB\'\340A\002\372A!\022\037metastore.googleapis.c" + + "om/Backup\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\022:\n\006bac" + + "kup\030\003 \001(\0132%.google.cloud.metastore.v1bet" + + "a.BackupB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"e" + + "\n\023DeleteBackupRequest\0225\n\004name\030\001 \001(\tB\'\340A\002" + + "\372A!\n\037metastore.googleapis.com/Backup\022\027\n\n" + + "request_id\030\002 \001(\tB\003\340A\001\"\363\001\n\025ExportMetadata" + + "Request\022 \n\026destination_gcs_folder\030\002 \001(\tH" + + "\000\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n metastore.go" + + "ogleapis.com/Service\022\027\n\nrequest_id\030\003 \001(\t" + + "B\003\340A\001\022U\n\022database_dump_type\030\004 \001(\01624.goog" + + "le.cloud.metastore.v1beta.DatabaseDumpSp" + + "ec.TypeB\003\340A\001B\r\n\013destination\"\363\001\n\025RestoreS" + + "erviceRequest\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n " + + "metastore.googleapis.com/Service\0227\n\006back" + + "up\030\002 \001(\tB\'\340A\002\372A!\n\037metastore.googleapis.c" + + "om/Backup\022M\n\014restore_type\030\003 \001(\01622.google" + + ".cloud.metastore.v1beta.Restore.RestoreT" + + "ypeB\003\340A\001\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\200\002\n\021Op" + + "erationMetadata\0224\n\013create_time\030\001 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\003\0221\n\010end_tim" + + "e\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003" + + "\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022#\n\026request" + + "ed_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013api_versio" + + "n\030\007 \001(\tB\003\340A\003\"\300\001\n\020LocationMetadata\022o\n!sup" + + "ported_hive_metastore_versions\030\001 \003(\0132D.g" + + "oogle.cloud.metastore.v1beta.LocationMet" + + "adata.HiveMetastoreVersion\032;\n\024HiveMetast" + + "oreVersion\022\017\n\007version\030\001 \001(\t\022\022\n\nis_defaul" + + "t\030\002 \001(\010\"E\n\020DatabaseDumpSpec\"1\n\004Type\022\024\n\020T" + + "YPE_UNSPECIFIED\020\000\022\t\n\005MYSQL\020\001\022\010\n\004AVRO\020\002\"P" + + "\n\026RemoveIamPolicyRequest\022\033\n\010resource\030\001 \001" + + "(\tB\t\340A\002\372A\003\n\001*\022\031\n\014asynchronous\030\002 \001(\010B\003\340A\001" + + "\"*\n\027RemoveIamPolicyResponse\022\017\n\007success\030\001" + + " \001(\010\"e\n\024QueryMetadataRequest\0229\n\007service\030" + + "\001 \001(\tB(\340A\002\372A\"\n metastore.googleapis.com/" + + "Service\022\022\n\005query\030\002 \001(\tB\003\340A\002\"4\n\025QueryMeta" + + "dataResponse\022\033\n\023result_manifest_uri\030\001 \001(" + + "\t\"\250\001\n\032MoveTableToDatabaseRequest\0229\n\007serv" + + "ice\030\001 \001(\tB(\340A\002\372A\"\n metastore.googleapis." + + "com/Service\022\027\n\ntable_name\030\002 \001(\tB\003\340A\002\022\024\n\007" + + "db_name\030\003 \001(\tB\003\340A\002\022 \n\023destination_db_nam" + + "e\030\004 \001(\tB\003\340A\002\"\035\n\033MoveTableToDatabaseRespo" + + "nse\"\230\001\n$AlterMetadataResourceLocationReq" + + "uest\0229\n\007service\030\001 \001(\tB(\340A\002\372A\"\n metastore" + + ".googleapis.com/Service\022\032\n\rresource_name" + + "\030\002 \001(\tB\003\340A\002\022\031\n\014location_uri\030\003 \001(\tB\003\340A\002\"\'" + + "\n%AlterMetadataResourceLocationResponse2" + + "\217%\n\021DataprocMetastore\022\272\001\n\014ListServices\0222" + + ".google.cloud.metastore.v1beta.ListServi" + + "cesRequest\0323.google.cloud.metastore.v1be" + + "ta.ListServicesResponse\"A\202\323\344\223\0022\0220/v1beta" + + "/{parent=projects/*/locations/*}/service" + + "s\332A\006parent\022\247\001\n\nGetService\0220.google.cloud" + + ".metastore.v1beta.GetServiceRequest\032&.go" + + "ogle.cloud.metastore.v1beta.Service\"?\202\323\344" + + "\223\0022\0220/v1beta/{name=projects/*/locations/" + + "*/services/*}\332A\004name\022\200\002\n\rCreateService\0223" + + ".google.cloud.metastore.v1beta.CreateSer" + + "viceRequest\032\035.google.longrunning.Operati" + + "on\"\232\001\202\323\344\223\002;\"0/v1beta/{parent=projects/*/" + + "locations/*}/services:\007service\332A\031parent," + + "service,service_id\312A:\n\007Service\022/google.c" + + "loud.metastore.v1beta.OperationMetadata\022" + + "\202\002\n\rUpdateService\0223.google.cloud.metasto" + + "re.v1beta.UpdateServiceRequest\032\035.google." + + "longrunning.Operation\"\234\001\202\323\344\223\002C28/v1beta/" + + "{service.name=projects/*/locations/*/ser" + + "vices/*}:\007service\332A\023service,update_mask\312" + + "A:\n\007Service\022/google.cloud.metastore.v1be" + + "ta.OperationMetadata\022\360\001\n\rDeleteService\0223" + + ".google.cloud.metastore.v1beta.DeleteSer" + + "viceRequest\032\035.google.longrunning.Operati" + + "on\"\212\001\202\323\344\223\0022*0/v1beta/{name=projects/*/lo" + + "cations/*/services/*}\332A\004name\312AH\n\025google." + + "protobuf.Empty\022/google.cloud.metastore.v" + + "1beta.OperationMetadata\022\341\001\n\023ListMetadata" + + "Imports\0229.google.cloud.metastore.v1beta." + + "ListMetadataImportsRequest\032:.google.clou" + + "d.metastore.v1beta.ListMetadataImportsRe" + + "sponse\"S\202\323\344\223\002D\022B/v1beta/{parent=projects" + + "/*/locations/*/services/*}/metadataImpor" + + "ts\332A\006parent\022\316\001\n\021GetMetadataImport\0227.goog" + + "le.cloud.metastore.v1beta.GetMetadataImp" + + "ortRequest\032-.google.cloud.metastore.v1be" + + "ta.MetadataImport\"Q\202\323\344\223\002D\022B/v1beta/{name" + + "=projects/*/locations/*/services/*/metad" + + "ataImports/*}\332A\004name\022\277\002\n\024CreateMetadataI" + + "mport\022:.google.cloud.metastore.v1beta.Cr" + + "eateMetadataImportRequest\032\035.google.longr" + + "unning.Operation\"\313\001\202\323\344\223\002U\"B/v1beta/{pare" + + "nt=projects/*/locations/*/services/*}/me" + + "tadataImports:\017metadata_import\332A)parent," + + "metadata_import,metadata_import_id\312AA\n\016M" + + "etadataImport\022/google.cloud.metastore.v1" + + "beta.OperationMetadata\022\301\002\n\024UpdateMetadat" + + "aImport\022:.google.cloud.metastore.v1beta." + + "UpdateMetadataImportRequest\032\035.google.lon" + + "grunning.Operation\"\315\001\202\323\344\223\002e2R/v1beta/{me" + + "tadata_import.name=projects/*/locations/" + + "*/services/*/metadataImports/*}:\017metadat" + + "a_import\332A\033metadata_import,update_mask\312A" + + "A\n\016MetadataImport\022/google.cloud.metastor" + + "e.v1beta.OperationMetadata\022\371\001\n\016ExportMet" + + "adata\0224.google.cloud.metastore.v1beta.Ex" + + "portMetadataRequest\032\035.google.longrunning" + + ".Operation\"\221\001\202\323\344\223\002G\"B/v1beta/{service=pr" + + "ojects/*/locations/*/services/*}:exportM" + + "etadata:\001*\312AA\n\016MetadataExport\022/google.cl" + + "oud.metastore.v1beta.OperationMetadata\022\374" + + "\001\n\016RestoreService\0224.google.cloud.metasto" + + "re.v1beta.RestoreServiceRequest\032\035.google" + + ".longrunning.Operation\"\224\001\202\323\344\223\002@\";/v1beta" + + "/{service=projects/*/locations/*/service" + + "s/*}:restore:\001*\332A\016service,backup\312A:\n\007Res" + + "tore\022/google.cloud.metastore.v1beta.Oper" + + "ationMetadata\022\301\001\n\013ListBackups\0221.google.c" + + "loud.metastore.v1beta.ListBackupsRequest" + + "\0322.google.cloud.metastore.v1beta.ListBac" + + "kupsResponse\"K\202\323\344\223\002<\022:/v1beta/{parent=pr" + + "ojects/*/locations/*/services/*}/backups" + + "\332A\006parent\022\256\001\n\tGetBackup\022/.google.cloud.m" + + "etastore.v1beta.GetBackupRequest\032%.googl" + + "e.cloud.metastore.v1beta.Backup\"I\202\323\344\223\002<\022" + + ":/v1beta/{name=projects/*/locations/*/se" + + "rvices/*/backups/*}\332A\004name\022\204\002\n\014CreateBac" + + "kup\0222.google.cloud.metastore.v1beta.Crea" + + "teBackupRequest\032\035.google.longrunning.Ope" + + "ration\"\240\001\202\323\344\223\002D\":/v1beta/{parent=project" + + "s/*/locations/*/services/*}/backups:\006bac" + + "kup\332A\027parent,backup,backup_id\312A9\n\006Backup" + + "\022/google.cloud.metastore.v1beta.Operatio" + + "nMetadata\022\370\001\n\014DeleteBackup\0222.google.clou" + + "d.metastore.v1beta.DeleteBackupRequest\032\035" + + ".google.longrunning.Operation\"\224\001\202\323\344\223\002<*:" + + "/v1beta/{name=projects/*/locations/*/ser" + + "vices/*/backups/*}\332A\004name\312AH\n\025google.pro" + + "tobuf.Empty\022/google.cloud.metastore.v1be" + + "ta.OperationMetadata\022\324\001\n\017RemoveIamPolicy" + + "\0225.google.cloud.metastore.v1beta.RemoveI" + + "amPolicyRequest\0326.google.cloud.metastore" + + ".v1beta.RemoveIamPolicyResponse\"R\202\323\344\223\002L\"" + + "G/v1beta/{resource=projects/*/locations/" + + "*/services/*/**}:removeIamPolicy:\001*\022\375\001\n\r" + + "QueryMetadata\0223.google.cloud.metastore.v" + + "1beta.QueryMetadataRequest\032\035.google.long" + + "running.Operation\"\227\001\202\323\344\223\002F\"A/v1beta/{ser" + + "vice=projects/*/locations/*/services/*}:" + + "queryMetadata:\001*\312AH\n\025QueryMetadataRespon" + + "se\022/google.cloud.metastore.v1beta.Operat" + + "ionMetadata\022\225\002\n\023MoveTableToDatabase\0229.go" + + "ogle.cloud.metastore.v1beta.MoveTableToD" + + "atabaseRequest\032\035.google.longrunning.Oper" + + "ation\"\243\001\202\323\344\223\002L\"G/v1beta/{service=project" + + "s/*/locations/*/services/*}:moveTableToD" + + "atabase:\001*\312AN\n\033MoveTableToDatabaseRespon" + + "se\022/google.cloud.metastore.v1beta.Operat" + + "ionMetadata\022\255\002\n\035AlterMetadataResourceLoc" + + "ation\022C.google.cloud.metastore.v1beta.Al" + + "terMetadataResourceLocationRequest\032\035.goo" + + "gle.longrunning.Operation\"\247\001\202\323\344\223\002F\"A/v1b" + + "eta/{service=projects/*/locations/*/serv" + + "ices/*}:alterLocation:\001*\312AX\n%AlterMetada" + + "taResourceLocationResponse\022/google.cloud" + + ".metastore.v1beta.OperationMetadata\032L\312A\030" + + "metastore.googleapis.com\322A.https://www.g" + + "oogleapis.com/auth/cloud-platformB\242\003\n!co" + + "m.google.cloud.metastore.v1betaB\016Metasto", + "reProtoP\001Z?cloud.google.com/go/metastore" + + "/apiv1beta/metastorepb;metastorepb\312\002\035Goo" + + "gle\\Cloud\\Metastore\\V1beta\352AN\n\036compute.g" + + "oogleapis.com/Network\022,projects/{project" + + "}/global/networks/{network}\352Aa\n!compute." + + "googleapis.com/Subnetwork\022 + * Request message for + * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase]. + * + * + * Protobuf type {@code google.cloud.metastore.v1beta.MoveTableToDatabaseRequest} + */ +public final class MoveTableToDatabaseRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) + MoveTableToDatabaseRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use MoveTableToDatabaseRequest.newBuilder() to construct. + private MoveTableToDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MoveTableToDatabaseRequest() { + service_ = ""; + tableName_ = ""; + dbName_ = ""; + destinationDbName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MoveTableToDatabaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.class, com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object tableName_ = ""; + /** + *
+   * Required. The name of the table to be moved.
+   * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tableName. + */ + @java.lang.Override + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } + } + /** + *
+   * Required. The name of the table to be moved.
+   * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tableName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DB_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object dbName_ = ""; + /** + *
+   * Required. The name of the database where the table resides.
+   * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The dbName. + */ + @java.lang.Override + public java.lang.String getDbName() { + java.lang.Object ref = dbName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dbName_ = s; + return s; + } + } + /** + *
+   * Required. The name of the database where the table resides.
+   * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dbName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDbNameBytes() { + java.lang.Object ref = dbName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dbName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_DB_NAME_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object destinationDbName_ = ""; + /** + *
+   * Required. The name of the database where the table should be moved.
+   * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationDbName. + */ + @java.lang.Override + public java.lang.String getDestinationDbName() { + java.lang.Object ref = destinationDbName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationDbName_ = s; + return s; + } + } + /** + *
+   * Required. The name of the database where the table should be moved.
+   * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationDbName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationDbNameBytes() { + java.lang.Object ref = destinationDbName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationDbName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dbName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationDbName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destinationDbName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dbName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationDbName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destinationDbName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest other = (com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getTableName() + .equals(other.getTableName())) return false; + if (!getDbName() + .equals(other.getDbName())) return false; + if (!getDestinationDbName() + .equals(other.getDestinationDbName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + hash = (37 * hash) + DB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDbName().hashCode(); + hash = (37 * hash) + DESTINATION_DB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDestinationDbName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MoveTableToDatabaseRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.class, com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + tableName_ = ""; + dbName_ = ""; + destinationDbName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest build() { + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest buildPartial() { + com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest result = new com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tableName_ = tableName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dbName_ = dbName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.destinationDbName_ = destinationDbName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest other) { + if (other == com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTableName().isEmpty()) { + tableName_ = other.tableName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDbName().isEmpty()) { + dbName_ = other.dbName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDestinationDbName().isEmpty()) { + destinationDbName_ = other.destinationDbName_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + tableName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + dbName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + destinationDbName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to mutate
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object tableName_ = ""; + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tableName. + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tableName. + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The tableName to set. + * @return This builder for chaining. + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tableName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTableName() { + tableName_ = getDefaultInstance().getTableName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the table to be moved.
+     * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for tableName to set. + * @return This builder for chaining. + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tableName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object dbName_ = ""; + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The dbName. + */ + public java.lang.String getDbName() { + java.lang.Object ref = dbName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dbName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dbName. + */ + public com.google.protobuf.ByteString + getDbNameBytes() { + java.lang.Object ref = dbName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dbName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The dbName to set. + * @return This builder for chaining. + */ + public Builder setDbName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + dbName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDbName() { + dbName_ = getDefaultInstance().getDbName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the database where the table resides.
+     * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for dbName to set. + * @return This builder for chaining. + */ + public Builder setDbNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + dbName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object destinationDbName_ = ""; + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationDbName. + */ + public java.lang.String getDestinationDbName() { + java.lang.Object ref = destinationDbName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationDbName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationDbName. + */ + public com.google.protobuf.ByteString + getDestinationDbNameBytes() { + java.lang.Object ref = destinationDbName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationDbName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param value The destinationDbName to set. + * @return This builder for chaining. + */ + public Builder setDestinationDbName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + destinationDbName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDestinationDbName() { + destinationDbName_ = getDefaultInstance().getDestinationDbName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the database where the table should be moved.
+     * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for destinationDbName to set. + * @return This builder for chaining. + */ + public Builder setDestinationDbNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + destinationDbName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) + private static final com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest(); + } + + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveTableToDatabaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseRequestOrBuilder.java new file mode 100644 index 000000000000..df5560c3eeaa --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseRequestOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface MoveTableToDatabaseRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MoveTableToDatabaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to mutate
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Required. The name of the table to be moved.
+   * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tableName. + */ + java.lang.String getTableName(); + /** + *
+   * Required. The name of the table to be moved.
+   * 
+ * + * string table_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tableName. + */ + com.google.protobuf.ByteString + getTableNameBytes(); + + /** + *
+   * Required. The name of the database where the table resides.
+   * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The dbName. + */ + java.lang.String getDbName(); + /** + *
+   * Required. The name of the database where the table resides.
+   * 
+ * + * string db_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dbName. + */ + com.google.protobuf.ByteString + getDbNameBytes(); + + /** + *
+   * Required. The name of the database where the table should be moved.
+   * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationDbName. + */ + java.lang.String getDestinationDbName(); + /** + *
+   * Required. The name of the database where the table should be moved.
+   * 
+ * + * string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationDbName. + */ + com.google.protobuf.ByteString + getDestinationDbNameBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponse.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponse.java new file mode 100644 index 000000000000..38d439598b9e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponse.java @@ -0,0 +1,411 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Response message for
+ * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MoveTableToDatabaseResponse} + */ +public final class MoveTableToDatabaseResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) + MoveTableToDatabaseResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use MoveTableToDatabaseResponse.newBuilder() to construct. + private MoveTableToDatabaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MoveTableToDatabaseResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MoveTableToDatabaseResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.class, com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse other = (com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.MoveTableToDatabaseResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) + com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.class, com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse build() { + com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse buildPartial() { + com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse result = new com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) { + return mergeFrom((com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse other) { + if (other == com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) + private static final com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse(); + } + + public static com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveTableToDatabaseResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.MoveTableToDatabaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponseOrBuilder.java new file mode 100644 index 000000000000..d6efc375e647 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/MoveTableToDatabaseResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface MoveTableToDatabaseResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.MoveTableToDatabaseResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfig.java new file mode 100644 index 000000000000..74bec4437933 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfig.java @@ -0,0 +1,1966 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Network configuration for the Dataproc Metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.NetworkConfig} + */ +public final class NetworkConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.NetworkConfig) + NetworkConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use NetworkConfig.newBuilder() to construct. + private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NetworkConfig() { + consumers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NetworkConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.NetworkConfig.class, com.google.cloud.metastore.v1beta.NetworkConfig.Builder.class); + } + + public interface ConsumerOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.NetworkConfig.Consumer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + boolean hasSubnetwork(); + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString + getSubnetworkBytes(); + + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.VpcResourceCase getVpcResourceCase(); + } + /** + *
+   * Contains information of the customer's network configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.NetworkConfig.Consumer} + */ + public static final class Consumer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.NetworkConfig.Consumer) + ConsumerOrBuilder { + private static final long serialVersionUID = 0L; + // Use Consumer.newBuilder() to construct. + private Consumer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Consumer() { + endpointUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Consumer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.class, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder.class); + } + + private int vpcResourceCase_ = 0; + private java.lang.Object vpcResource_; + public enum VpcResourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUBNETWORK(1), + VPCRESOURCE_NOT_SET(0); + private final int value; + private VpcResourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VpcResourceCase valueOf(int value) { + return forNumber(value); + } + + public static VpcResourceCase forNumber(int value) { + switch (value) { + case 1: return SUBNETWORK; + case 0: return VPCRESOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public VpcResourceCase + getVpcResourceCase() { + return VpcResourceCase.forNumber( + vpcResourceCase_); + } + + public static final int SUBNETWORK_FIELD_NUMBER = 1; + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + public boolean hasSubnetwork() { + return vpcResourceCase_ == 1; + } + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (vpcResourceCase_ == 1) { + vpcResource_ = s; + } + return s; + } + } + /** + *
+     * Immutable. The subnetwork of the customer project from which an IP
+     * address is reserved and used as the Dataproc Metastore service's
+     * endpoint. It is accessible to hosts in the subnet and to all
+     * hosts in a subnet in the same region and same network. There must
+     * be at least one IP address available in the subnet's primary range. The
+     * subnet is specified in the following form:
+     * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString + getSubnetworkBytes() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (vpcResourceCase_ == 1) { + vpcResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore
+     * service.
+     * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (vpcResourceCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vpcResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (vpcResourceCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vpcResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.NetworkConfig.Consumer)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer other = (com.google.cloud.metastore.v1beta.NetworkConfig.Consumer) obj; + + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (!getVpcResourceCase().equals(other.getVpcResourceCase())) return false; + switch (vpcResourceCase_) { + case 1: + if (!getSubnetwork() + .equals(other.getSubnetwork())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + switch (vpcResourceCase_) { + case 1: + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.NetworkConfig.Consumer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Contains information of the customer's network configurations.
+     * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.NetworkConfig.Consumer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.NetworkConfig.Consumer) + com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.class, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointUri_ = ""; + vpcResourceCase_ = 0; + vpcResource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_Consumer_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer build() { + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer buildPartial() { + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer result = new com.google.cloud.metastore.v1beta.NetworkConfig.Consumer(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.NetworkConfig.Consumer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endpointUri_ = endpointUri_; + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1beta.NetworkConfig.Consumer result) { + result.vpcResourceCase_ = vpcResourceCase_; + result.vpcResource_ = this.vpcResource_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.NetworkConfig.Consumer) { + return mergeFrom((com.google.cloud.metastore.v1beta.NetworkConfig.Consumer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.NetworkConfig.Consumer other) { + if (other == com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.getDefaultInstance()) return this; + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getVpcResourceCase()) { + case SUBNETWORK: { + vpcResourceCase_ = 1; + vpcResource_ = other.vpcResource_; + onChanged(); + break; + } + case VPCRESOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + vpcResourceCase_ = 1; + vpcResource_ = s; + break; + } // case 10 + case 26: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int vpcResourceCase_ = 0; + private java.lang.Object vpcResource_; + public VpcResourceCase + getVpcResourceCase() { + return VpcResourceCase.forNumber( + vpcResourceCase_); + } + + public Builder clearVpcResource() { + vpcResourceCase_ = 0; + vpcResource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return Whether the subnetwork field is set. + */ + @java.lang.Override + public boolean hasSubnetwork() { + return vpcResourceCase_ == 1; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (vpcResourceCase_ == 1) { + vpcResource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubnetworkBytes() { + java.lang.Object ref = ""; + if (vpcResourceCase_ == 1) { + ref = vpcResource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (vpcResourceCase_ == 1) { + vpcResource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + vpcResourceCase_ = 1; + vpcResource_ = value; + onChanged(); + return this; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + if (vpcResourceCase_ == 1) { + vpcResourceCase_ = 0; + vpcResource_ = null; + onChanged(); + } + return this; + } + /** + *
+       * Immutable. The subnetwork of the customer project from which an IP
+       * address is reserved and used as the Dataproc Metastore service's
+       * endpoint. It is accessible to hosts in the subnet and to all
+       * hosts in a subnet in the same region and same network. There must
+       * be at least one IP address available in the subnet's primary range. The
+       * subnet is specified in the following form:
+       * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
+       * 
+ * + * string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + vpcResourceCase_ = 1; + vpcResource_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Output only. The URI of the endpoint used to access the metastore
+       * service.
+       * 
+ * + * string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.NetworkConfig.Consumer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.NetworkConfig.Consumer) + private static final com.google.cloud.metastore.v1beta.NetworkConfig.Consumer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.NetworkConfig.Consumer(); + } + + public static com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Consumer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CONSUMERS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List consumers_; + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public java.util.List getConsumersList() { + return consumers_; + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public java.util.List + getConsumersOrBuilderList() { + return consumers_; + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public int getConsumersCount() { + return consumers_.size(); + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getConsumers(int index) { + return consumers_.get(index); + } + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index) { + return consumers_.get(index); + } + + public static final int CUSTOM_ROUTES_ENABLED_FIELD_NUMBER = 2; + private boolean customRoutesEnabled_ = false; + /** + *
+   * Enables custom routes to be imported and exported for the Dataproc
+   * Metastore service's peered VPC network.
+   * 
+ * + * bool custom_routes_enabled = 2; + * @return The customRoutesEnabled. + */ + @java.lang.Override + public boolean getCustomRoutesEnabled() { + return customRoutesEnabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < consumers_.size(); i++) { + output.writeMessage(1, consumers_.get(i)); + } + if (customRoutesEnabled_ != false) { + output.writeBool(2, customRoutesEnabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < consumers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, consumers_.get(i)); + } + if (customRoutesEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, customRoutesEnabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.NetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.NetworkConfig other = (com.google.cloud.metastore.v1beta.NetworkConfig) obj; + + if (!getConsumersList() + .equals(other.getConsumersList())) return false; + if (getCustomRoutesEnabled() + != other.getCustomRoutesEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConsumersCount() > 0) { + hash = (37 * hash) + CONSUMERS_FIELD_NUMBER; + hash = (53 * hash) + getConsumersList().hashCode(); + } + hash = (37 * hash) + CUSTOM_ROUTES_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCustomRoutesEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.NetworkConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Network configuration for the Dataproc Metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.NetworkConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.NetworkConfig) + com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.NetworkConfig.class, com.google.cloud.metastore.v1beta.NetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.NetworkConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (consumersBuilder_ == null) { + consumers_ = java.util.Collections.emptyList(); + } else { + consumers_ = null; + consumersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + customRoutesEnabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_NetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig build() { + com.google.cloud.metastore.v1beta.NetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig buildPartial() { + com.google.cloud.metastore.v1beta.NetworkConfig result = new com.google.cloud.metastore.v1beta.NetworkConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.metastore.v1beta.NetworkConfig result) { + if (consumersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + consumers_ = java.util.Collections.unmodifiableList(consumers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.consumers_ = consumers_; + } else { + result.consumers_ = consumersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.NetworkConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.customRoutesEnabled_ = customRoutesEnabled_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.NetworkConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.NetworkConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.NetworkConfig other) { + if (other == com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance()) return this; + if (consumersBuilder_ == null) { + if (!other.consumers_.isEmpty()) { + if (consumers_.isEmpty()) { + consumers_ = other.consumers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConsumersIsMutable(); + consumers_.addAll(other.consumers_); + } + onChanged(); + } + } else { + if (!other.consumers_.isEmpty()) { + if (consumersBuilder_.isEmpty()) { + consumersBuilder_.dispose(); + consumersBuilder_ = null; + consumers_ = other.consumers_; + bitField0_ = (bitField0_ & ~0x00000001); + consumersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConsumersFieldBuilder() : null; + } else { + consumersBuilder_.addAllMessages(other.consumers_); + } + } + } + if (other.getCustomRoutesEnabled() != false) { + setCustomRoutesEnabled(other.getCustomRoutesEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer m = + input.readMessage( + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.parser(), + extensionRegistry); + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(m); + } else { + consumersBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: { + customRoutesEnabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List consumers_ = + java.util.Collections.emptyList(); + private void ensureConsumersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + consumers_ = new java.util.ArrayList(consumers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder> consumersBuilder_; + + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List getConsumersList() { + if (consumersBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumers_); + } else { + return consumersBuilder_.getMessageList(); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public int getConsumersCount() { + if (consumersBuilder_ == null) { + return consumers_.size(); + } else { + return consumersBuilder_.getCount(); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getConsumers(int index) { + if (consumersBuilder_ == null) { + return consumers_.get(index); + } else { + return consumersBuilder_.getMessage(index); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setConsumers( + int index, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.set(index, value); + onChanged(); + } else { + consumersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setConsumers( + int index, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.set(index, builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers(com.google.cloud.metastore.v1beta.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.add(value); + onChanged(); + } else { + consumersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + int index, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer value) { + if (consumersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumersIsMutable(); + consumers_.add(index, value); + onChanged(); + } else { + consumersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addConsumers( + int index, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder builderForValue) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.add(index, builderForValue.build()); + onChanged(); + } else { + consumersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder addAllConsumers( + java.lang.Iterable values) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumers_); + onChanged(); + } else { + consumersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearConsumers() { + if (consumersBuilder_ == null) { + consumers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + consumersBuilder_.clear(); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder removeConsumers(int index) { + if (consumersBuilder_ == null) { + ensureConsumersIsMutable(); + consumers_.remove(index); + onChanged(); + } else { + consumersBuilder_.remove(index); + } + return this; + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder getConsumersBuilder( + int index) { + return getConsumersFieldBuilder().getBuilder(index); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index) { + if (consumersBuilder_ == null) { + return consumers_.get(index); } else { + return consumersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List + getConsumersOrBuilderList() { + if (consumersBuilder_ != null) { + return consumersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumers_); + } + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder addConsumersBuilder() { + return getConsumersFieldBuilder().addBuilder( + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.getDefaultInstance()); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder addConsumersBuilder( + int index) { + return getConsumersFieldBuilder().addBuilder( + index, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.getDefaultInstance()); + } + /** + *
+     * Immutable. The consumer-side network configuration for the Dataproc
+     * Metastore instance.
+     * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public java.util.List + getConsumersBuilderList() { + return getConsumersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder> + getConsumersFieldBuilder() { + if (consumersBuilder_ == null) { + consumersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer, com.google.cloud.metastore.v1beta.NetworkConfig.Consumer.Builder, com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder>( + consumers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + consumers_ = null; + } + return consumersBuilder_; + } + + private boolean customRoutesEnabled_ ; + /** + *
+     * Enables custom routes to be imported and exported for the Dataproc
+     * Metastore service's peered VPC network.
+     * 
+ * + * bool custom_routes_enabled = 2; + * @return The customRoutesEnabled. + */ + @java.lang.Override + public boolean getCustomRoutesEnabled() { + return customRoutesEnabled_; + } + /** + *
+     * Enables custom routes to be imported and exported for the Dataproc
+     * Metastore service's peered VPC network.
+     * 
+ * + * bool custom_routes_enabled = 2; + * @param value The customRoutesEnabled to set. + * @return This builder for chaining. + */ + public Builder setCustomRoutesEnabled(boolean value) { + + customRoutesEnabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Enables custom routes to be imported and exported for the Dataproc
+     * Metastore service's peered VPC network.
+     * 
+ * + * bool custom_routes_enabled = 2; + * @return This builder for chaining. + */ + public Builder clearCustomRoutesEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + customRoutesEnabled_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.NetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.NetworkConfig) + private static final com.google.cloud.metastore.v1beta.NetworkConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.NetworkConfig(); + } + + public static com.google.cloud.metastore.v1beta.NetworkConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfigOrBuilder.java new file mode 100644 index 000000000000..91cee8737301 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkConfigOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface NetworkConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.NetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + java.util.List + getConsumersList(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1beta.NetworkConfig.Consumer getConsumers(int index); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + int getConsumersCount(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + java.util.List + getConsumersOrBuilderList(); + /** + *
+   * Immutable. The consumer-side network configuration for the Dataproc
+   * Metastore instance.
+   * 
+ * + * repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1beta.NetworkConfig.ConsumerOrBuilder getConsumersOrBuilder( + int index); + + /** + *
+   * Enables custom routes to be imported and exported for the Dataproc
+   * Metastore service's peered VPC network.
+   * 
+ * + * bool custom_routes_enabled = 2; + * @return The customRoutesEnabled. + */ + boolean getCustomRoutesEnabled(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadata.java new file mode 100644 index 000000000000..75cace21801e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadata.java @@ -0,0 +1,1629 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Represents the metadata of a long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.OperationMetadata.class, com.google.cloud.metastore.v1beta.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + *
+   * Output only. Identifies whether the caller has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.OperationMetadata other = (com.google.cloud.metastore.v1beta.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getTarget() + .equals(other.getTarget())) return false; + if (!getVerb() + .equals(other.getVerb())) return false; + if (!getStatusMessage() + .equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() + != other.getRequestedCancellation()) return false; + if (!getApiVersion() + .equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the metadata of a long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.OperationMetadata) + com.google.cloud.metastore.v1beta.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.OperationMetadata.class, com.google.cloud.metastore.v1beta.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.OperationMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.OperationMetadata build() { + com.google.cloud.metastore.v1beta.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.OperationMetadata buildPartial() { + com.google.cloud.metastore.v1beta.OperationMetadata result = new com.google.cloud.metastore.v1beta.OperationMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.OperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.OperationMetadata) { + return mergeFrom((com.google.cloud.metastore.v1beta.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.OperationMetadata other) { + if (other == com.google.cloud.metastore.v1beta.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString + getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_ ; + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. Identifies whether the caller has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString + getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.OperationMetadata) + private static final com.google.cloud.metastore.v1beta.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.OperationMetadata(); + } + + public static com.google.cloud.metastore.v1beta.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadataOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..73eed01aacb9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/OperationMetadataOrBuilder.java @@ -0,0 +1,157 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The target. + */ + java.lang.String getTarget(); + /** + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The verb. + */ + java.lang.String getVerb(); + /** + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for verb. + */ + com.google.protobuf.ByteString + getVerbBytes(); + + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString + getStatusMessageBytes(); + + /** + *
+   * Output only. Identifies whether the caller has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString + getApiVersionBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequest.java new file mode 100644 index 000000000000..11c7de8365d2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequest.java @@ -0,0 +1,767 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.QueryMetadataRequest} + */ +public final class QueryMetadataRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.QueryMetadataRequest) + QueryMetadataRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryMetadataRequest.newBuilder() to construct. + private QueryMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryMetadataRequest() { + service_ = ""; + query_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryMetadataRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.QueryMetadataRequest.class, com.google.cloud.metastore.v1beta.QueryMetadataRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to query
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to query
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + /** + *
+   * Required. A read-only SQL query to execute against the metadata database.
+   * The query cannot change or mutate the data.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + *
+   * Required. A read-only SQL query to execute against the metadata database.
+   * The query cannot change or mutate the data.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.QueryMetadataRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.QueryMetadataRequest other = (com.google.cloud.metastore.v1beta.QueryMetadataRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.QueryMetadataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.QueryMetadataRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.QueryMetadataRequest) + com.google.cloud.metastore.v1beta.QueryMetadataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.QueryMetadataRequest.class, com.google.cloud.metastore.v1beta.QueryMetadataRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.QueryMetadataRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + query_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.QueryMetadataRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.QueryMetadataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.QueryMetadataRequest build() { + com.google.cloud.metastore.v1beta.QueryMetadataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.QueryMetadataRequest buildPartial() { + com.google.cloud.metastore.v1beta.QueryMetadataRequest result = new com.google.cloud.metastore.v1beta.QueryMetadataRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.QueryMetadataRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = query_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.QueryMetadataRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.QueryMetadataRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.QueryMetadataRequest other) { + if (other == com.google.cloud.metastore.v1beta.QueryMetadataRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to query
+     * metadata, in the following format:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Required. A read-only SQL query to execute against the metadata database.
+     * The query cannot change or mutate the data.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.QueryMetadataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.QueryMetadataRequest) + private static final com.google.cloud.metastore.v1beta.QueryMetadataRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.QueryMetadataRequest(); + } + + public static com.google.cloud.metastore.v1beta.QueryMetadataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryMetadataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.QueryMetadataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequestOrBuilder.java new file mode 100644 index 000000000000..3eb6236515ff --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataRequestOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface QueryMetadataRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.QueryMetadataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to query
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to query
+   * metadata, in the following format:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * Required. A read-only SQL query to execute against the metadata database.
+   * The query cannot change or mutate the data.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+   * Required. A read-only SQL query to execute against the metadata database.
+   * The query cannot change or mutate the data.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponse.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponse.java new file mode 100644 index 000000000000..0b2ffcefd90c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponse.java @@ -0,0 +1,603 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Response message for
+ * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.QueryMetadataResponse} + */ +public final class QueryMetadataResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.QueryMetadataResponse) + QueryMetadataResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryMetadataResponse.newBuilder() to construct. + private QueryMetadataResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryMetadataResponse() { + resultManifestUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryMetadataResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.QueryMetadataResponse.class, com.google.cloud.metastore.v1beta.QueryMetadataResponse.Builder.class); + } + + public static final int RESULT_MANIFEST_URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resultManifestUri_ = ""; + /** + *
+   * The manifest URI  is link to a JSON instance in Cloud Storage.
+   * This instance manifests immediately along with QueryMetadataResponse. The
+   * content of the URI is not retriable until the long-running operation query
+   * against the metadata finishes.
+   * 
+ * + * string result_manifest_uri = 1; + * @return The resultManifestUri. + */ + @java.lang.Override + public java.lang.String getResultManifestUri() { + java.lang.Object ref = resultManifestUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resultManifestUri_ = s; + return s; + } + } + /** + *
+   * The manifest URI  is link to a JSON instance in Cloud Storage.
+   * This instance manifests immediately along with QueryMetadataResponse. The
+   * content of the URI is not retriable until the long-running operation query
+   * against the metadata finishes.
+   * 
+ * + * string result_manifest_uri = 1; + * @return The bytes for resultManifestUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResultManifestUriBytes() { + java.lang.Object ref = resultManifestUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resultManifestUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resultManifestUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resultManifestUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resultManifestUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resultManifestUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.QueryMetadataResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.QueryMetadataResponse other = (com.google.cloud.metastore.v1beta.QueryMetadataResponse) obj; + + if (!getResultManifestUri() + .equals(other.getResultManifestUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESULT_MANIFEST_URI_FIELD_NUMBER; + hash = (53 * hash) + getResultManifestUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.QueryMetadataResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.QueryMetadataResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.QueryMetadataResponse) + com.google.cloud.metastore.v1beta.QueryMetadataResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.QueryMetadataResponse.class, com.google.cloud.metastore.v1beta.QueryMetadataResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.QueryMetadataResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resultManifestUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.QueryMetadataResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.QueryMetadataResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.QueryMetadataResponse build() { + com.google.cloud.metastore.v1beta.QueryMetadataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.QueryMetadataResponse buildPartial() { + com.google.cloud.metastore.v1beta.QueryMetadataResponse result = new com.google.cloud.metastore.v1beta.QueryMetadataResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.QueryMetadataResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resultManifestUri_ = resultManifestUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.QueryMetadataResponse) { + return mergeFrom((com.google.cloud.metastore.v1beta.QueryMetadataResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.QueryMetadataResponse other) { + if (other == com.google.cloud.metastore.v1beta.QueryMetadataResponse.getDefaultInstance()) return this; + if (!other.getResultManifestUri().isEmpty()) { + resultManifestUri_ = other.resultManifestUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + resultManifestUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object resultManifestUri_ = ""; + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @return The resultManifestUri. + */ + public java.lang.String getResultManifestUri() { + java.lang.Object ref = resultManifestUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resultManifestUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @return The bytes for resultManifestUri. + */ + public com.google.protobuf.ByteString + getResultManifestUriBytes() { + java.lang.Object ref = resultManifestUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resultManifestUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @param value The resultManifestUri to set. + * @return This builder for chaining. + */ + public Builder setResultManifestUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resultManifestUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @return This builder for chaining. + */ + public Builder clearResultManifestUri() { + resultManifestUri_ = getDefaultInstance().getResultManifestUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The manifest URI  is link to a JSON instance in Cloud Storage.
+     * This instance manifests immediately along with QueryMetadataResponse. The
+     * content of the URI is not retriable until the long-running operation query
+     * against the metadata finishes.
+     * 
+ * + * string result_manifest_uri = 1; + * @param value The bytes for resultManifestUri to set. + * @return This builder for chaining. + */ + public Builder setResultManifestUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resultManifestUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.QueryMetadataResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.QueryMetadataResponse) + private static final com.google.cloud.metastore.v1beta.QueryMetadataResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.QueryMetadataResponse(); + } + + public static com.google.cloud.metastore.v1beta.QueryMetadataResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryMetadataResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.QueryMetadataResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponseOrBuilder.java new file mode 100644 index 000000000000..31ef129b33bf --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/QueryMetadataResponseOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface QueryMetadataResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.QueryMetadataResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The manifest URI  is link to a JSON instance in Cloud Storage.
+   * This instance manifests immediately along with QueryMetadataResponse. The
+   * content of the URI is not retriable until the long-running operation query
+   * against the metadata finishes.
+   * 
+ * + * string result_manifest_uri = 1; + * @return The resultManifestUri. + */ + java.lang.String getResultManifestUri(); + /** + *
+   * The manifest URI  is link to a JSON instance in Cloud Storage.
+   * This instance manifests immediately along with QueryMetadataResponse. The
+   * content of the URI is not retriable until the long-running operation query
+   * against the metadata finishes.
+   * 
+ * + * string result_manifest_uri = 1; + * @return The bytes for resultManifestUri. + */ + com.google.protobuf.ByteString + getResultManifestUriBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequest.java new file mode 100644 index 000000000000..2f9042050047 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequest.java @@ -0,0 +1,697 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.RemoveIamPolicyRequest} + */ +public final class RemoveIamPolicyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) + RemoveIamPolicyRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveIamPolicyRequest.newBuilder() to construct. + private RemoveIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveIamPolicyRequest() { + resource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveIamPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.class, com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + /** + *
+   * Required. The relative resource name of the dataplane resource to remove
+   * IAM policy, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+   * or
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the dataplane resource to remove
+   * IAM policy, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+   * or
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASYNCHRONOUS_FIELD_NUMBER = 2; + private boolean asynchronous_ = false; + /** + *
+   * Optional. Removes IAM policy attached to database or table asynchronously
+   * when it is set. The default is false.
+   * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The asynchronous. + */ + @java.lang.Override + public boolean getAsynchronous() { + return asynchronous_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (asynchronous_ != false) { + output.writeBool(2, asynchronous_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (asynchronous_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, asynchronous_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest other = (com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest) obj; + + if (!getResource() + .equals(other.getResource())) return false; + if (getAsynchronous() + != other.getAsynchronous()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + ASYNCHRONOUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAsynchronous()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.RemoveIamPolicyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.class, com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resource_ = ""; + asynchronous_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest build() { + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest buildPartial() { + com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest result = new com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resource_ = resource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.asynchronous_ = asynchronous_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest other) { + if (other == com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getAsynchronous() != false) { + setAsynchronous(other.getAsynchronous()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + asynchronous_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object resource_ = ""; + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the dataplane resource to remove
+     * IAM policy, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+     * or
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean asynchronous_ ; + /** + *
+     * Optional. Removes IAM policy attached to database or table asynchronously
+     * when it is set. The default is false.
+     * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The asynchronous. + */ + @java.lang.Override + public boolean getAsynchronous() { + return asynchronous_; + } + /** + *
+     * Optional. Removes IAM policy attached to database or table asynchronously
+     * when it is set. The default is false.
+     * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The asynchronous to set. + * @return This builder for chaining. + */ + public Builder setAsynchronous(boolean value) { + + asynchronous_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional. Removes IAM policy attached to database or table asynchronously
+     * when it is set. The default is false.
+     * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearAsynchronous() { + bitField0_ = (bitField0_ & ~0x00000002); + asynchronous_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) + private static final com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest(); + } + + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIamPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RemoveIamPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..e23a32226199 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyRequestOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface RemoveIamPolicyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.RemoveIamPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the dataplane resource to remove
+   * IAM policy, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+   * or
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The resource. + */ + java.lang.String getResource(); + /** + *
+   * Required. The relative resource name of the dataplane resource to remove
+   * IAM policy, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
+   * or
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for resource. + */ + com.google.protobuf.ByteString + getResourceBytes(); + + /** + *
+   * Optional. Removes IAM policy attached to database or table asynchronously
+   * when it is set. The default is false.
+   * 
+ * + * bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The asynchronous. + */ + boolean getAsynchronous(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponse.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponse.java new file mode 100644 index 000000000000..f0cab04c2776 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponse.java @@ -0,0 +1,501 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Response message for
+ * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.RemoveIamPolicyResponse} + */ +public final class RemoveIamPolicyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) + RemoveIamPolicyResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveIamPolicyResponse.newBuilder() to construct. + private RemoveIamPolicyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveIamPolicyResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveIamPolicyResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.class, com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.Builder.class); + } + + public static final int SUCCESS_FIELD_NUMBER = 1; + private boolean success_ = false; + /** + *
+   * True if the policy is successfully removed.
+   * 
+ * + * bool success = 1; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (success_ != false) { + output.writeBool(1, success_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (success_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, success_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse other = (com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse) obj; + + if (getSuccess() + != other.getSuccess()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSuccess()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for
+   * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.RemoveIamPolicyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) + com.google.cloud.metastore.v1beta.RemoveIamPolicyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.class, com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + success_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse build() { + com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse buildPartial() { + com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse result = new com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.success_ = success_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse) { + return mergeFrom((com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse other) { + if (other == com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse.getDefaultInstance()) return this; + if (other.getSuccess() != false) { + setSuccess(other.getSuccess()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + success_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean success_ ; + /** + *
+     * True if the policy is successfully removed.
+     * 
+ * + * bool success = 1; + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + /** + *
+     * True if the policy is successfully removed.
+     * 
+ * + * bool success = 1; + * @param value The success to set. + * @return This builder for chaining. + */ + public Builder setSuccess(boolean value) { + + success_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * True if the policy is successfully removed.
+     * 
+ * + * bool success = 1; + * @return This builder for chaining. + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000001); + success_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) + private static final com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse(); + } + + public static com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIamPolicyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RemoveIamPolicyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponseOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponseOrBuilder.java new file mode 100644 index 000000000000..5a4afdd0530f --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RemoveIamPolicyResponseOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface RemoveIamPolicyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.RemoveIamPolicyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * True if the policy is successfully removed.
+   * 
+ * + * bool success = 1; + * @return The success. + */ + boolean getSuccess(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Restore.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Restore.java new file mode 100644 index 000000000000..c010cde2660a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Restore.java @@ -0,0 +1,1791 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * The details of a metadata restore operation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Restore} + */ +public final class Restore extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Restore) + RestoreOrBuilder { +private static final long serialVersionUID = 0L; + // Use Restore.newBuilder() to construct. + private Restore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Restore() { + state_ = 0; + backup_ = ""; + type_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Restore(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Restore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Restore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Restore.class, com.google.cloud.metastore.v1beta.Restore.Builder.class); + } + + /** + *
+   * The current state of the restore.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.Restore.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metadata restore is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metadata restore is running.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The metadata restore completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + *
+     * The metadata restore failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The metadata restore is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metadata restore is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metadata restore is running.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The metadata restore completed successfully.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + *
+     * The metadata restore failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The metadata restore is cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return SUCCEEDED; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.Restore.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Restore.State) + } + + /** + *
+   * The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.Restore.RestoreType} + */ + public enum RestoreType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The restore type is unknown.
+     * 
+ * + * RESTORE_TYPE_UNSPECIFIED = 0; + */ + RESTORE_TYPE_UNSPECIFIED(0), + /** + *
+     * The service's metadata and configuration are restored.
+     * 
+ * + * FULL = 1; + */ + FULL(1), + /** + *
+     * Only the service's metadata is restored.
+     * 
+ * + * METADATA_ONLY = 2; + */ + METADATA_ONLY(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The restore type is unknown.
+     * 
+ * + * RESTORE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESTORE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The service's metadata and configuration are restored.
+     * 
+ * + * FULL = 1; + */ + public static final int FULL_VALUE = 1; + /** + *
+     * Only the service's metadata is restored.
+     * 
+ * + * METADATA_ONLY = 2; + */ + public static final int METADATA_ONLY_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RestoreType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RestoreType forNumber(int value) { + switch (value) { + case 0: return RESTORE_TYPE_UNSPECIFIED; + case 1: return FULL; + case 2: return METADATA_ONLY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + RestoreType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RestoreType findValueByNumber(int number) { + return RestoreType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.Restore.getDescriptor().getEnumTypes().get(1); + } + + private static final RestoreType[] VALUES = values(); + + public static RestoreType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RestoreType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Restore.RestoreType) + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Restore.State getState() { + com.google.cloud.metastore.v1beta.Restore.State result = com.google.cloud.metastore.v1beta.Restore.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.Restore.State.UNRECOGNIZED : result; + } + + public static final int BACKUP_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object backup_ = ""; + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + @java.lang.Override + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } + } + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 5; + private int type_ = 0; + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Restore.RestoreType getType() { + com.google.cloud.metastore.v1beta.Restore.RestoreType result = com.google.cloud.metastore.v1beta.Restore.RestoreType.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1beta.Restore.RestoreType.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1beta.Restore.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, backup_); + } + if (type_ != com.google.cloud.metastore.v1beta.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, details_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (state_ != com.google.cloud.metastore.v1beta.Restore.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, backup_); + } + if (type_ != com.google.cloud.metastore.v1beta.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, details_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.Restore)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.Restore other = (com.google.cloud.metastore.v1beta.Restore) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (!getBackup() + .equals(other.getBackup())) return false; + if (type_ != other.type_) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.Restore parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Restore parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Restore parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Restore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.Restore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The details of a metadata restore operation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Restore} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Restore) + com.google.cloud.metastore.v1beta.RestoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Restore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Restore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Restore.class, com.google.cloud.metastore.v1beta.Restore.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.Restore.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + state_ = 0; + backup_ = ""; + type_ = 0; + details_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Restore_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Restore getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.Restore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Restore build() { + com.google.cloud.metastore.v1beta.Restore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Restore buildPartial() { + com.google.cloud.metastore.v1beta.Restore result = new com.google.cloud.metastore.v1beta.Restore(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.Restore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backup_ = backup_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.details_ = details_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.Restore) { + return mergeFrom((com.google.cloud.metastore.v1beta.Restore)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.Restore other) { + if (other == com.google.cloud.metastore.v1beta.Restore.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getBackup().isEmpty()) { + backup_ = other.backup_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + backup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + type_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Output only. The time when the restore started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Output only. The time when the restore ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Restore.State getState() { + com.google.cloud.metastore.v1beta.Restore.State result = com.google.cloud.metastore.v1beta.Restore.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.Restore.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1beta.Restore.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object backup_ = ""; + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @param value The backup to set. + * @return This builder for chaining. + */ + public Builder setBackup( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backup_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearBackup() { + backup_ = getDefaultInstance().getBackup(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Output only. 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}`.
+     * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @param value The bytes for backup to set. + * @return This builder for chaining. + */ + public Builder setBackupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backup_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Restore.RestoreType getType() { + com.google.cloud.metastore.v1beta.Restore.RestoreType result = com.google.cloud.metastore.v1beta.Restore.RestoreType.forNumber(type_); + return result == null ? com.google.cloud.metastore.v1beta.Restore.RestoreType.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.metastore.v1beta.Restore.RestoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The type of restore.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000010); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + details_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Output only. The restore details containing the revision of the service to
+     * be restored to, in format of JSON.
+     * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Restore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Restore) + private static final com.google.cloud.metastore.v1beta.Restore DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Restore(); + } + + public static com.google.cloud.metastore.v1beta.Restore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Restore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Restore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreOrBuilder.java new file mode 100644 index 000000000000..5993137ae3fd --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreOrBuilder.java @@ -0,0 +1,147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface RestoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Restore) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Output only. The time when the restore started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Output only. The time when the restore ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the restore.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1beta.Restore.State getState(); + + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + java.lang.String getBackup(); + /** + *
+   * Output only. 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}`.
+   * 
+ * + * string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + com.google.protobuf.ByteString + getBackupBytes(); + + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * Output only. The type of restore.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The type. + */ + com.google.cloud.metastore.v1beta.Restore.RestoreType getType(); + + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The details. + */ + java.lang.String getDetails(); + /** + *
+   * Output only. The restore details containing the revision of the service to
+   * be restored to, in format of JSON.
+   * 
+ * + * string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for details. + */ + com.google.protobuf.ByteString + getDetailsBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequest.java new file mode 100644 index 000000000000..c5e2840228dc --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequest.java @@ -0,0 +1,1121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for [DataprocMetastore.Restore][].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.RestoreServiceRequest} + */ +public final class RestoreServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.RestoreServiceRequest) + RestoreServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RestoreServiceRequest.newBuilder() to construct. + private RestoreServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RestoreServiceRequest() { + service_ = ""; + backup_ = ""; + restoreType_ = 0; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RestoreServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.RestoreServiceRequest.class, com.google.cloud.metastore.v1beta.RestoreServiceRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + @java.lang.Override + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } + } + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESTORE_TYPE_FIELD_NUMBER = 3; + private int restoreType_ = 0; + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + @java.lang.Override public int getRestoreTypeValue() { + return restoreType_; + } + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Restore.RestoreType getRestoreType() { + com.google.cloud.metastore.v1beta.Restore.RestoreType result = com.google.cloud.metastore.v1beta.Restore.RestoreType.forNumber(restoreType_); + return result == null ? com.google.cloud.metastore.v1beta.Restore.RestoreType.UNRECOGNIZED : result; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backup_); + } + if (restoreType_ != com.google.cloud.metastore.v1beta.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, restoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backup_); + } + if (restoreType_ != com.google.cloud.metastore.v1beta.Restore.RestoreType.RESTORE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, restoreType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.RestoreServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.RestoreServiceRequest other = (com.google.cloud.metastore.v1beta.RestoreServiceRequest) obj; + + if (!getService() + .equals(other.getService())) return false; + if (!getBackup() + .equals(other.getBackup())) return false; + if (restoreType_ != other.restoreType_) return false; + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + hash = (37 * hash) + RESTORE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + restoreType_; + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.RestoreServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for [DataprocMetastore.Restore][].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.RestoreServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.RestoreServiceRequest) + com.google.cloud.metastore.v1beta.RestoreServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.RestoreServiceRequest.class, com.google.cloud.metastore.v1beta.RestoreServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.RestoreServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + service_ = ""; + backup_ = ""; + restoreType_ = 0; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_RestoreServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RestoreServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.RestoreServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RestoreServiceRequest build() { + com.google.cloud.metastore.v1beta.RestoreServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RestoreServiceRequest buildPartial() { + com.google.cloud.metastore.v1beta.RestoreServiceRequest result = new com.google.cloud.metastore.v1beta.RestoreServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.RestoreServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backup_ = backup_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.restoreType_ = restoreType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.RestoreServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.RestoreServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.RestoreServiceRequest other) { + if (other == com.google.cloud.metastore.v1beta.RestoreServiceRequest.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackup().isEmpty()) { + backup_ = other.backup_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.restoreType_ != 0) { + setRestoreTypeValue(other.getRestoreTypeValue()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + backup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + restoreType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The relative resource name of the metastore service to run
+     * restore, in the following form:
+     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + public java.lang.String getBackup() { + java.lang.Object ref = backup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + public com.google.protobuf.ByteString + getBackupBytes() { + java.lang.Object ref = backup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + backup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The backup to set. + * @return This builder for chaining. + */ + public Builder setBackup( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + backup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearBackup() { + backup_ = getDefaultInstance().getBackup(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * 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}`.
+     * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for backup to set. + * @return This builder for chaining. + */ + public Builder setBackupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + backup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int restoreType_ = 0; + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + @java.lang.Override public int getRestoreTypeValue() { + return restoreType_; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for restoreType to set. + * @return This builder for chaining. + */ + public Builder setRestoreTypeValue(int value) { + restoreType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Restore.RestoreType getRestoreType() { + com.google.cloud.metastore.v1beta.Restore.RestoreType result = com.google.cloud.metastore.v1beta.Restore.RestoreType.forNumber(restoreType_); + return result == null ? com.google.cloud.metastore.v1beta.Restore.RestoreType.UNRECOGNIZED : result; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The restoreType to set. + * @return This builder for chaining. + */ + public Builder setRestoreType(com.google.cloud.metastore.v1beta.Restore.RestoreType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + restoreType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRestoreType() { + bitField0_ = (bitField0_ & ~0x00000004); + restoreType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.RestoreServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.RestoreServiceRequest) + private static final com.google.cloud.metastore.v1beta.RestoreServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.RestoreServiceRequest(); + } + + public static com.google.cloud.metastore.v1beta.RestoreServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.RestoreServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequestOrBuilder.java new file mode 100644 index 000000000000..7cc7dc44d02a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/RestoreServiceRequestOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface RestoreServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.RestoreServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The service. + */ + java.lang.String getService(); + /** + *
+   * Required. The relative resource name of the metastore service to run
+   * restore, in the following form:
+   * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for service. + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The backup. + */ + java.lang.String getBackup(); + /** + *
+   * 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}`.
+   * 
+ * + * string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for backup. + */ + com.google.protobuf.ByteString + getBackupBytes(); + + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for restoreType. + */ + int getRestoreTypeValue(); + /** + *
+   * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
+   * 
+ * + * .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The restoreType. + */ + com.google.cloud.metastore.v1beta.Restore.RestoreType getRestoreType(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ScalingConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ScalingConfig.java new file mode 100644 index 000000000000..ee08cd93f8aa --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ScalingConfig.java @@ -0,0 +1,982 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Represents the scaling configuration of a metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ScalingConfig} + */ +public final class ScalingConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ScalingConfig) + ScalingConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ScalingConfig.newBuilder() to construct. + private ScalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ScalingConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ScalingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ScalingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ScalingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ScalingConfig.class, com.google.cloud.metastore.v1beta.ScalingConfig.Builder.class); + } + + /** + *
+   * Metastore instance sizes.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.ScalingConfig.InstanceSize} + */ + public enum InstanceSize + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified instance size
+     * 
+ * + * INSTANCE_SIZE_UNSPECIFIED = 0; + */ + INSTANCE_SIZE_UNSPECIFIED(0), + /** + *
+     * Extra small instance size, maps to a scaling factor of 0.1.
+     * 
+ * + * EXTRA_SMALL = 1; + */ + EXTRA_SMALL(1), + /** + *
+     * Small instance size, maps to a scaling factor of 0.5.
+     * 
+ * + * SMALL = 2; + */ + SMALL(2), + /** + *
+     * Medium instance size, maps to a scaling factor of 1.0.
+     * 
+ * + * MEDIUM = 3; + */ + MEDIUM(3), + /** + *
+     * Large instance size, maps to a scaling factor of 3.0.
+     * 
+ * + * LARGE = 4; + */ + LARGE(4), + /** + *
+     * Extra large instance size, maps to a scaling factor of 6.0.
+     * 
+ * + * EXTRA_LARGE = 5; + */ + EXTRA_LARGE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified instance size
+     * 
+ * + * INSTANCE_SIZE_UNSPECIFIED = 0; + */ + public static final int INSTANCE_SIZE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Extra small instance size, maps to a scaling factor of 0.1.
+     * 
+ * + * EXTRA_SMALL = 1; + */ + public static final int EXTRA_SMALL_VALUE = 1; + /** + *
+     * Small instance size, maps to a scaling factor of 0.5.
+     * 
+ * + * SMALL = 2; + */ + public static final int SMALL_VALUE = 2; + /** + *
+     * Medium instance size, maps to a scaling factor of 1.0.
+     * 
+ * + * MEDIUM = 3; + */ + public static final int MEDIUM_VALUE = 3; + /** + *
+     * Large instance size, maps to a scaling factor of 3.0.
+     * 
+ * + * LARGE = 4; + */ + public static final int LARGE_VALUE = 4; + /** + *
+     * Extra large instance size, maps to a scaling factor of 6.0.
+     * 
+ * + * EXTRA_LARGE = 5; + */ + public static final int EXTRA_LARGE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InstanceSize valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static InstanceSize forNumber(int value) { + switch (value) { + case 0: return INSTANCE_SIZE_UNSPECIFIED; + case 1: return EXTRA_SMALL; + case 2: return SMALL; + case 3: return MEDIUM; + case 4: return LARGE; + case 5: return EXTRA_LARGE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + InstanceSize> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InstanceSize findValueByNumber(int number) { + return InstanceSize.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.ScalingConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final InstanceSize[] VALUES = values(); + + public static InstanceSize valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private InstanceSize(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.ScalingConfig.InstanceSize) + } + + private int scalingModelCase_ = 0; + private java.lang.Object scalingModel_; + public enum ScalingModelCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSTANCE_SIZE(1), + SCALING_FACTOR(2), + SCALINGMODEL_NOT_SET(0); + private final int value; + private ScalingModelCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ScalingModelCase valueOf(int value) { + return forNumber(value); + } + + public static ScalingModelCase forNumber(int value) { + switch (value) { + case 1: return INSTANCE_SIZE; + case 2: return SCALING_FACTOR; + case 0: return SCALINGMODEL_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ScalingModelCase + getScalingModelCase() { + return ScalingModelCase.forNumber( + scalingModelCase_); + } + + public static final int INSTANCE_SIZE_FIELD_NUMBER = 1; + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + public boolean hasInstanceSize() { + return scalingModelCase_ == 1; + } + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + public int getInstanceSizeValue() { + if (scalingModelCase_ == 1) { + return (java.lang.Integer) scalingModel_; + } + return 0; + } + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + public com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize getInstanceSize() { + if (scalingModelCase_ == 1) { + com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize result = com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize.forNumber( + (java.lang.Integer) scalingModel_); + return result == null ? com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize.UNRECOGNIZED : result; + } + return com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize.INSTANCE_SIZE_UNSPECIFIED; + } + + public static final int SCALING_FACTOR_FIELD_NUMBER = 2; + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + @java.lang.Override + public boolean hasScalingFactor() { + return scalingModelCase_ == 2; + } + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + @java.lang.Override + public float getScalingFactor() { + if (scalingModelCase_ == 2) { + return (java.lang.Float) scalingModel_; + } + return 0F; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (scalingModelCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) scalingModel_)); + } + if (scalingModelCase_ == 2) { + output.writeFloat( + 2, (float)((java.lang.Float) scalingModel_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scalingModelCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, ((java.lang.Integer) scalingModel_)); + } + if (scalingModelCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize( + 2, (float)((java.lang.Float) scalingModel_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.ScalingConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ScalingConfig other = (com.google.cloud.metastore.v1beta.ScalingConfig) obj; + + if (!getScalingModelCase().equals(other.getScalingModelCase())) return false; + switch (scalingModelCase_) { + case 1: + if (getInstanceSizeValue() + != other.getInstanceSizeValue()) return false; + break; + case 2: + if (java.lang.Float.floatToIntBits(getScalingFactor()) + != java.lang.Float.floatToIntBits( + other.getScalingFactor())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (scalingModelCase_) { + case 1: + hash = (37 * hash) + INSTANCE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceSizeValue(); + break; + case 2: + hash = (37 * hash) + SCALING_FACTOR_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScalingFactor()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.ScalingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.ScalingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the scaling configuration of a metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ScalingConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ScalingConfig) + com.google.cloud.metastore.v1beta.ScalingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ScalingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ScalingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ScalingConfig.class, com.google.cloud.metastore.v1beta.ScalingConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ScalingConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scalingModelCase_ = 0; + scalingModel_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_ScalingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ScalingConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ScalingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ScalingConfig build() { + com.google.cloud.metastore.v1beta.ScalingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ScalingConfig buildPartial() { + com.google.cloud.metastore.v1beta.ScalingConfig result = new com.google.cloud.metastore.v1beta.ScalingConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ScalingConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1beta.ScalingConfig result) { + result.scalingModelCase_ = scalingModelCase_; + result.scalingModel_ = this.scalingModel_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.ScalingConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.ScalingConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ScalingConfig other) { + if (other == com.google.cloud.metastore.v1beta.ScalingConfig.getDefaultInstance()) return this; + switch (other.getScalingModelCase()) { + case INSTANCE_SIZE: { + setInstanceSizeValue(other.getInstanceSizeValue()); + break; + } + case SCALING_FACTOR: { + setScalingFactor(other.getScalingFactor()); + break; + } + case SCALINGMODEL_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + scalingModelCase_ = 1; + scalingModel_ = rawValue; + break; + } // case 8 + case 21: { + scalingModel_ = input.readFloat(); + scalingModelCase_ = 2; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int scalingModelCase_ = 0; + private java.lang.Object scalingModel_; + public ScalingModelCase + getScalingModelCase() { + return ScalingModelCase.forNumber( + scalingModelCase_); + } + + public Builder clearScalingModel() { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + @java.lang.Override + public boolean hasInstanceSize() { + return scalingModelCase_ == 1; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + @java.lang.Override + public int getInstanceSizeValue() { + if (scalingModelCase_ == 1) { + return ((java.lang.Integer) scalingModel_).intValue(); + } + return 0; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @param value The enum numeric value on the wire for instanceSize to set. + * @return This builder for chaining. + */ + public Builder setInstanceSizeValue(int value) { + scalingModelCase_ = 1; + scalingModel_ = value; + onChanged(); + return this; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize getInstanceSize() { + if (scalingModelCase_ == 1) { + com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize result = com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize.forNumber( + (java.lang.Integer) scalingModel_); + return result == null ? com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize.UNRECOGNIZED : result; + } + return com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize.INSTANCE_SIZE_UNSPECIFIED; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @param value The instanceSize to set. + * @return This builder for chaining. + */ + public Builder setInstanceSize(com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize value) { + if (value == null) { + throw new NullPointerException(); + } + scalingModelCase_ = 1; + scalingModel_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * An enum of readable instance sizes, with each instance size mapping to a
+     * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return This builder for chaining. + */ + public Builder clearInstanceSize() { + if (scalingModelCase_ == 1) { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + public boolean hasScalingFactor() { + return scalingModelCase_ == 2; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + public float getScalingFactor() { + if (scalingModelCase_ == 2) { + return (java.lang.Float) scalingModel_; + } + return 0F; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @param value The scalingFactor to set. + * @return This builder for chaining. + */ + public Builder setScalingFactor(float value) { + + scalingModelCase_ = 2; + scalingModel_ = value; + onChanged(); + return this; + } + /** + *
+     * Scaling factor, increments of 0.1 for values less than 1.0, and
+     * increments of 1.0 for values greater than 1.0.
+     * 
+ * + * float scaling_factor = 2; + * @return This builder for chaining. + */ + public Builder clearScalingFactor() { + if (scalingModelCase_ == 2) { + scalingModelCase_ = 0; + scalingModel_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.ScalingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ScalingConfig) + private static final com.google.cloud.metastore.v1beta.ScalingConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ScalingConfig(); + } + + public static com.google.cloud.metastore.v1beta.ScalingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ScalingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ScalingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ScalingConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ScalingConfigOrBuilder.java new file mode 100644 index 000000000000..0305e26649ac --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ScalingConfigOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ScalingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ScalingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return Whether the instanceSize field is set. + */ + boolean hasInstanceSize(); + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return The enum numeric value on the wire for instanceSize. + */ + int getInstanceSizeValue(); + /** + *
+   * An enum of readable instance sizes, with each instance size mapping to a
+   * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1; + * @return The instanceSize. + */ + com.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize getInstanceSize(); + + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return Whether the scalingFactor field is set. + */ + boolean hasScalingFactor(); + /** + *
+   * Scaling factor, increments of 0.1 for values less than 1.0, and
+   * increments of 1.0 for values greater than 1.0.
+   * 
+ * + * float scaling_factor = 2; + * @return The scalingFactor. + */ + float getScalingFactor(); + + public com.google.cloud.metastore.v1beta.ScalingConfig.ScalingModelCase getScalingModelCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Secret.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Secret.java new file mode 100644 index 000000000000..b1b3400308d4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Secret.java @@ -0,0 +1,717 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * A securely stored value.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Secret} + */ +public final class Secret extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Secret) + SecretOrBuilder { +private static final long serialVersionUID = 0L; + // Use Secret.newBuilder() to construct. + private Secret(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Secret() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Secret(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Secret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Secret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Secret.class, com.google.cloud.metastore.v1beta.Secret.Builder.class); + } + + private int valueCase_ = 0; + private java.lang.Object value_; + public enum ValueCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_SECRET(2), + VALUE_NOT_SET(0); + private final int value; + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 2: return CLOUD_SECRET; + case 0: return VALUE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public static final int CLOUD_SECRET_FIELD_NUMBER = 2; + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + public boolean hasCloudSecret() { + return valueCase_ == 2; + } + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + public java.lang.String getCloudSecret() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } + } + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + public com.google.protobuf.ByteString + getCloudSecretBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.Secret)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.Secret other = (com.google.cloud.metastore.v1beta.Secret) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (!getCloudSecret() + .equals(other.getCloudSecret())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 2: + hash = (37 * hash) + CLOUD_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getCloudSecret().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.Secret parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Secret parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Secret parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Secret parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.Secret prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A securely stored value.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Secret} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Secret) + com.google.cloud.metastore.v1beta.SecretOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Secret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Secret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Secret.class, com.google.cloud.metastore.v1beta.Secret.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.Secret.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Secret_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Secret getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.Secret.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Secret build() { + com.google.cloud.metastore.v1beta.Secret result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Secret buildPartial() { + com.google.cloud.metastore.v1beta.Secret result = new com.google.cloud.metastore.v1beta.Secret(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.Secret result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1beta.Secret result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.Secret) { + return mergeFrom((com.google.cloud.metastore.v1beta.Secret)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.Secret other) { + if (other == com.google.cloud.metastore.v1beta.Secret.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case CLOUD_SECRET: { + valueCase_ = 2; + value_ = other.value_; + onChanged(); + break; + } + case VALUE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 2; + value_ = s; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int valueCase_ = 0; + private java.lang.Object value_; + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + @java.lang.Override + public boolean hasCloudSecret() { + return valueCase_ == 2; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + @java.lang.Override + public java.lang.String getCloudSecret() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCloudSecretBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @param value The cloudSecret to set. + * @return This builder for chaining. + */ + public Builder setCloudSecret( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @return This builder for chaining. + */ + public Builder clearCloudSecret() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The relative resource name of a Secret Manager secret version, in the
+     * following form:
+     * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+     * 
+ * + * string cloud_secret = 2; + * @param value The bytes for cloudSecret to set. + * @return This builder for chaining. + */ + public Builder setCloudSecretBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Secret) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Secret) + private static final com.google.cloud.metastore.v1beta.Secret DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Secret(); + } + + public static com.google.cloud.metastore.v1beta.Secret getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Secret parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Secret getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/SecretOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/SecretOrBuilder.java new file mode 100644 index 000000000000..e9f1c9e5aada --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/SecretOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface SecretOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Secret) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return Whether the cloudSecret field is set. + */ + boolean hasCloudSecret(); + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The cloudSecret. + */ + java.lang.String getCloudSecret(); + /** + *
+   * The relative resource name of a Secret Manager secret version, in the
+   * following form:
+   * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
+   * 
+ * + * string cloud_secret = 2; + * @return The bytes for cloudSecret. + */ + com.google.protobuf.ByteString + getCloudSecretBytes(); + + public com.google.cloud.metastore.v1beta.Secret.ValueCase getValueCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Service.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Service.java new file mode 100644 index 000000000000..12ba36973532 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/Service.java @@ -0,0 +1,5519 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * A managed metastore service that serves metadata queries.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Service} + */ +public final class Service extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.Service) + ServiceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Service() { + name_ = ""; + network_ = ""; + endpointUri_ = ""; + state_ = 0; + stateMessage_ = ""; + artifactGcsUri_ = ""; + tier_ = 0; + uid_ = ""; + releaseChannel_ = 0; + databaseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Service(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Service_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Service.class, com.google.cloud.metastore.v1beta.Service.Builder.class); + } + + /** + *
+   * The current state of the metastore service.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.Service.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The state of the metastore service is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The metastore service is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + *
+     * The metastore service is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + *
+     * The metastore service is entering suspension. Its query-serving
+     * availability may cease unexpectedly.
+     * 
+ * + * SUSPENDING = 3; + */ + SUSPENDING(3), + /** + *
+     * The metastore service is suspended and unable to serve queries.
+     * 
+ * + * SUSPENDED = 4; + */ + SUSPENDED(4), + /** + *
+     * The metastore service is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 5; + */ + UPDATING(5), + /** + *
+     * The metastore service is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + DELETING(6), + /** + *
+     * The metastore service has encountered an error and cannot be used. The
+     * metastore service should be deleted.
+     * 
+ * + * ERROR = 7; + */ + ERROR(7), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The state of the metastore service is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The metastore service is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + *
+     * The metastore service is running and ready to serve queries.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + *
+     * The metastore service is entering suspension. Its query-serving
+     * availability may cease unexpectedly.
+     * 
+ * + * SUSPENDING = 3; + */ + public static final int SUSPENDING_VALUE = 3; + /** + *
+     * The metastore service is suspended and unable to serve queries.
+     * 
+ * + * SUSPENDED = 4; + */ + public static final int SUSPENDED_VALUE = 4; + /** + *
+     * The metastore service is being updated. It remains usable but cannot
+     * accept additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 5; + */ + public static final int UPDATING_VALUE = 5; + /** + *
+     * The metastore service is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + public static final int DELETING_VALUE = 6; + /** + *
+     * The metastore service has encountered an error and cannot be used. The
+     * metastore service should be deleted.
+     * 
+ * + * ERROR = 7; + */ + public static final int ERROR_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATING; + case 2: return ACTIVE; + case 3: return SUSPENDING; + case 4: return SUSPENDED; + case 5: return UPDATING; + case 6: return DELETING; + case 7: return ERROR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.Service.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Service.State) + } + + /** + *
+   * Available service tiers.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.Service.Tier} + */ + public enum Tier + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The tier is not set.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + TIER_UNSPECIFIED(0), + /** + *
+     * The developer tier provides limited scalability and no fault tolerance.
+     * Good for low-cost proof-of-concept.
+     * 
+ * + * DEVELOPER = 1; + */ + DEVELOPER(1), + /** + *
+     * The enterprise tier provides multi-zone high availability, and sufficient
+     * scalability for enterprise-level Dataproc Metastore workloads.
+     * 
+ * + * ENTERPRISE = 3; + */ + ENTERPRISE(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The tier is not set.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + public static final int TIER_UNSPECIFIED_VALUE = 0; + /** + *
+     * The developer tier provides limited scalability and no fault tolerance.
+     * Good for low-cost proof-of-concept.
+     * 
+ * + * DEVELOPER = 1; + */ + public static final int DEVELOPER_VALUE = 1; + /** + *
+     * The enterprise tier provides multi-zone high availability, and sufficient
+     * scalability for enterprise-level Dataproc Metastore workloads.
+     * 
+ * + * ENTERPRISE = 3; + */ + public static final int ENTERPRISE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Tier valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Tier forNumber(int value) { + switch (value) { + case 0: return TIER_UNSPECIFIED; + case 1: return DEVELOPER; + case 3: return ENTERPRISE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Tier> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Tier findValueByNumber(int number) { + return Tier.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.Service.getDescriptor().getEnumTypes().get(1); + } + + private static final Tier[] VALUES = values(); + + public static Tier valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Tier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Service.Tier) + } + + /** + *
+   * Release channels bundle features of varying levels of stability. Newer
+   * features may be introduced initially into less stable release channels and
+   * can be automatically promoted into more stable release channels.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.Service.ReleaseChannel} + */ + public enum ReleaseChannel + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Release channel is not specified.
+     * 
+ * + * RELEASE_CHANNEL_UNSPECIFIED = 0; + */ + RELEASE_CHANNEL_UNSPECIFIED(0), + /** + *
+     * The `CANARY` release channel contains the newest features, which may be
+     * unstable and subject to unresolved issues with no known workarounds.
+     * Services using the `CANARY` release channel are not subject to any SLAs.
+     * 
+ * + * CANARY = 1; + */ + CANARY(1), + /** + *
+     * The `STABLE` release channel contains features that are considered stable
+     * and have been validated for production use.
+     * 
+ * + * STABLE = 2; + */ + STABLE(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Release channel is not specified.
+     * 
+ * + * RELEASE_CHANNEL_UNSPECIFIED = 0; + */ + public static final int RELEASE_CHANNEL_UNSPECIFIED_VALUE = 0; + /** + *
+     * The `CANARY` release channel contains the newest features, which may be
+     * unstable and subject to unresolved issues with no known workarounds.
+     * Services using the `CANARY` release channel are not subject to any SLAs.
+     * 
+ * + * CANARY = 1; + */ + public static final int CANARY_VALUE = 1; + /** + *
+     * The `STABLE` release channel contains features that are considered stable
+     * and have been validated for production use.
+     * 
+ * + * STABLE = 2; + */ + public static final int STABLE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReleaseChannel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ReleaseChannel forNumber(int value) { + switch (value) { + case 0: return RELEASE_CHANNEL_UNSPECIFIED; + case 1: return CANARY; + case 2: return STABLE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ReleaseChannel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReleaseChannel findValueByNumber(int number) { + return ReleaseChannel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.Service.getDescriptor().getEnumTypes().get(2); + } + + private static final ReleaseChannel[] VALUES = values(); + + public static ReleaseChannel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ReleaseChannel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Service.ReleaseChannel) + } + + /** + *
+   * The backend database type for the metastore service.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1beta.Service.DatabaseType} + */ + public enum DatabaseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The DATABASE_TYPE is not set.
+     * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + DATABASE_TYPE_UNSPECIFIED(0), + /** + *
+     * MySQL is used to persist the metastore data.
+     * 
+ * + * MYSQL = 1; + */ + MYSQL(1), + /** + *
+     * Spanner is used to persist the metastore data.
+     * 
+ * + * SPANNER = 2; + */ + SPANNER(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The DATABASE_TYPE is not set.
+     * 
+ * + * DATABASE_TYPE_UNSPECIFIED = 0; + */ + public static final int DATABASE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * MySQL is used to persist the metastore data.
+     * 
+ * + * MYSQL = 1; + */ + public static final int MYSQL_VALUE = 1; + /** + *
+     * Spanner is used to persist the metastore data.
+     * 
+ * + * SPANNER = 2; + */ + public static final int SPANNER_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DatabaseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DatabaseType forNumber(int value) { + switch (value) { + case 0: return DATABASE_TYPE_UNSPECIFIED; + case 1: return MYSQL; + case 2: return SPANNER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DatabaseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DatabaseType findValueByNumber(int number) { + return DatabaseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.Service.getDescriptor().getEnumTypes().get(3); + } + + private static final DatabaseType[] VALUES = values(); + + public static DatabaseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DatabaseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.Service.DatabaseType) + } + + private int metastoreConfigCase_ = 0; + private java.lang.Object metastoreConfig_; + public enum MetastoreConfigCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HIVE_METASTORE_CONFIG(5), + METASTORECONFIG_NOT_SET(0); + private final int value; + private MetastoreConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetastoreConfigCase valueOf(int value) { + return forNumber(value); + } + + public static MetastoreConfigCase forNumber(int value) { + switch (value) { + case 5: return HIVE_METASTORE_CONFIG; + case 0: return METASTORECONFIG_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public MetastoreConfigCase + getMetastoreConfigCase() { + return MetastoreConfigCase.forNumber( + metastoreConfigCase_); + } + + public static final int HIVE_METASTORE_CONFIG_FIELD_NUMBER = 5; + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + @java.lang.Override + public boolean hasHiveMetastoreConfig() { + return metastoreConfigCase_ == 5; + } + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfig getHiveMetastoreConfig() { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); + } + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder() { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Service_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_URI_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointUri_ = ""; + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + @java.lang.Override + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } + } + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 9; + private int port_ = 0; + /** + *
+   * The TCP port at which the metastore service is reached. Default: 9083.
+   * 
+ * + * int32 port = 9; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Service.State getState() { + com.google.cloud.metastore.v1beta.Service.State result = com.google.cloud.metastore.v1beta.Service.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.Service.State.UNRECOGNIZED : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object stateMessage_ = ""; + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } + } + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_GCS_URI_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object artifactGcsUri_ = ""; + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + @java.lang.Override + public java.lang.String getArtifactGcsUri() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactGcsUri_ = s; + return s; + } + } + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArtifactGcsUriBytes() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIER_FIELD_NUMBER = 13; + private int tier_ = 0; + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + @java.lang.Override public int getTierValue() { + return tier_; + } + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @return The tier. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Service.Tier getTier() { + com.google.cloud.metastore.v1beta.Service.Tier result = com.google.cloud.metastore.v1beta.Service.Tier.forNumber(tier_); + return result == null ? com.google.cloud.metastore.v1beta.Service.Tier.UNRECOGNIZED : result; + } + + public static final int METADATA_INTEGRATION_FIELD_NUMBER = 14; + private com.google.cloud.metastore.v1beta.MetadataIntegration metadataIntegration_; + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + * @return Whether the metadataIntegration field is set. + */ + @java.lang.Override + public boolean hasMetadataIntegration() { + return metadataIntegration_ != null; + } + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + * @return The metadataIntegration. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataIntegration getMetadataIntegration() { + return metadataIntegration_ == null ? com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance() : metadataIntegration_; + } + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder getMetadataIntegrationOrBuilder() { + return metadataIntegration_ == null ? com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance() : metadataIntegration_; + } + + public static final int MAINTENANCE_WINDOW_FIELD_NUMBER = 15; + private com.google.cloud.metastore.v1beta.MaintenanceWindow maintenanceWindow_; + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + @java.lang.Override + public boolean hasMaintenanceWindow() { + return maintenanceWindow_ != null; + } + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder() { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + + public static final int UID_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER = 17; + private com.google.cloud.metastore.v1beta.MetadataManagementActivity metadataManagementActivity_; + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + @java.lang.Override + public boolean hasMetadataManagementActivity() { + return metadataManagementActivity_ != null; + } + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataManagementActivity getMetadataManagementActivity() { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder() { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + + public static final int RELEASE_CHANNEL_FIELD_NUMBER = 19; + private int releaseChannel_ = 0; + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + @java.lang.Override public int getReleaseChannelValue() { + return releaseChannel_; + } + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Service.ReleaseChannel getReleaseChannel() { + com.google.cloud.metastore.v1beta.Service.ReleaseChannel result = com.google.cloud.metastore.v1beta.Service.ReleaseChannel.forNumber(releaseChannel_); + return result == null ? com.google.cloud.metastore.v1beta.Service.ReleaseChannel.UNRECOGNIZED : result; + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 20; + private com.google.cloud.metastore.v1beta.EncryptionConfig encryptionConfig_; + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 21; + private com.google.cloud.metastore.v1beta.NetworkConfig networkConfig_; + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig() { + return networkConfig_ == null ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() : networkConfig_; + } + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return networkConfig_ == null ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() : networkConfig_; + } + + public static final int DATABASE_TYPE_FIELD_NUMBER = 22; + private int databaseType_ = 0; + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.Service.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1beta.Service.DatabaseType result = com.google.cloud.metastore.v1beta.Service.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1beta.Service.DatabaseType.UNRECOGNIZED : result; + } + + public static final int TELEMETRY_CONFIG_FIELD_NUMBER = 23; + private com.google.cloud.metastore.v1beta.TelemetryConfig telemetryConfig_; + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + @java.lang.Override + public boolean hasTelemetryConfig() { + return telemetryConfig_ != null; + } + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.TelemetryConfig getTelemetryConfig() { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + + public static final int SCALING_CONFIG_FIELD_NUMBER = 24; + private com.google.cloud.metastore.v1beta.ScalingConfig scalingConfig_; + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + @java.lang.Override + public boolean hasScalingConfig() { + return scalingConfig_ != null; + } + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.ScalingConfig getScalingConfig() { + return scalingConfig_ == null ? com.google.cloud.metastore.v1beta.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.ScalingConfigOrBuilder getScalingConfigOrBuilder() { + return scalingConfig_ == null ? com.google.cloud.metastore.v1beta.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 4); + if (metastoreConfigCase_ == 5) { + output.writeMessage(5, (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpointUri_); + } + if (port_ != 0) { + output.writeInt32(9, port_); + } + if (state_ != com.google.cloud.metastore.v1beta.Service.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, artifactGcsUri_); + } + if (tier_ != com.google.cloud.metastore.v1beta.Service.Tier.TIER_UNSPECIFIED.getNumber()) { + output.writeEnum(13, tier_); + } + if (metadataIntegration_ != null) { + output.writeMessage(14, getMetadataIntegration()); + } + if (maintenanceWindow_ != null) { + output.writeMessage(15, getMaintenanceWindow()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, uid_); + } + if (metadataManagementActivity_ != null) { + output.writeMessage(17, getMetadataManagementActivity()); + } + if (releaseChannel_ != com.google.cloud.metastore.v1beta.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED.getNumber()) { + output.writeEnum(19, releaseChannel_); + } + if (encryptionConfig_ != null) { + output.writeMessage(20, getEncryptionConfig()); + } + if (networkConfig_ != null) { + output.writeMessage(21, getNetworkConfig()); + } + if (databaseType_ != com.google.cloud.metastore.v1beta.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(22, databaseType_); + } + if (telemetryConfig_ != null) { + output.writeMessage(23, getTelemetryConfig()); + } + if (scalingConfig_ != null) { + output.writeMessage(24, getScalingConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labels__); + } + if (metastoreConfigCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, network_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpointUri_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, port_); + } + if (state_ != com.google.cloud.metastore.v1beta.Service.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, stateMessage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactGcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, artifactGcsUri_); + } + if (tier_ != com.google.cloud.metastore.v1beta.Service.Tier.TIER_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, tier_); + } + if (metadataIntegration_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getMetadataIntegration()); + } + if (maintenanceWindow_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getMaintenanceWindow()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, uid_); + } + if (metadataManagementActivity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getMetadataManagementActivity()); + } + if (releaseChannel_ != com.google.cloud.metastore.v1beta.Service.ReleaseChannel.RELEASE_CHANNEL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(19, releaseChannel_); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getEncryptionConfig()); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getNetworkConfig()); + } + if (databaseType_ != com.google.cloud.metastore.v1beta.Service.DatabaseType.DATABASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(22, databaseType_); + } + if (telemetryConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getTelemetryConfig()); + } + if (scalingConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getScalingConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.Service)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.Service other = (com.google.cloud.metastore.v1beta.Service) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getNetwork() + .equals(other.getNetwork())) return false; + if (!getEndpointUri() + .equals(other.getEndpointUri())) return false; + if (getPort() + != other.getPort()) return false; + if (state_ != other.state_) return false; + if (!getStateMessage() + .equals(other.getStateMessage())) return false; + if (!getArtifactGcsUri() + .equals(other.getArtifactGcsUri())) return false; + if (tier_ != other.tier_) return false; + if (hasMetadataIntegration() != other.hasMetadataIntegration()) return false; + if (hasMetadataIntegration()) { + if (!getMetadataIntegration() + .equals(other.getMetadataIntegration())) return false; + } + if (hasMaintenanceWindow() != other.hasMaintenanceWindow()) return false; + if (hasMaintenanceWindow()) { + if (!getMaintenanceWindow() + .equals(other.getMaintenanceWindow())) return false; + } + if (!getUid() + .equals(other.getUid())) return false; + if (hasMetadataManagementActivity() != other.hasMetadataManagementActivity()) return false; + if (hasMetadataManagementActivity()) { + if (!getMetadataManagementActivity() + .equals(other.getMetadataManagementActivity())) return false; + } + if (releaseChannel_ != other.releaseChannel_) return false; + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig() + .equals(other.getEncryptionConfig())) return false; + } + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig() + .equals(other.getNetworkConfig())) return false; + } + if (databaseType_ != other.databaseType_) return false; + if (hasTelemetryConfig() != other.hasTelemetryConfig()) return false; + if (hasTelemetryConfig()) { + if (!getTelemetryConfig() + .equals(other.getTelemetryConfig())) return false; + } + if (hasScalingConfig() != other.hasScalingConfig()) return false; + if (hasScalingConfig()) { + if (!getScalingConfig() + .equals(other.getScalingConfig())) return false; + } + if (!getMetastoreConfigCase().equals(other.getMetastoreConfigCase())) return false; + switch (metastoreConfigCase_) { + case 5: + if (!getHiveMetastoreConfig() + .equals(other.getHiveMetastoreConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + ENDPOINT_URI_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUri().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (37 * hash) + ARTIFACT_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactGcsUri().hashCode(); + hash = (37 * hash) + TIER_FIELD_NUMBER; + hash = (53 * hash) + tier_; + if (hasMetadataIntegration()) { + hash = (37 * hash) + METADATA_INTEGRATION_FIELD_NUMBER; + hash = (53 * hash) + getMetadataIntegration().hashCode(); + } + if (hasMaintenanceWindow()) { + hash = (37 * hash) + MAINTENANCE_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getMaintenanceWindow().hashCode(); + } + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasMetadataManagementActivity()) { + hash = (37 * hash) + METADATA_MANAGEMENT_ACTIVITY_FIELD_NUMBER; + hash = (53 * hash) + getMetadataManagementActivity().hashCode(); + } + hash = (37 * hash) + RELEASE_CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + releaseChannel_; + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + hash = (37 * hash) + DATABASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + databaseType_; + if (hasTelemetryConfig()) { + hash = (37 * hash) + TELEMETRY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTelemetryConfig().hashCode(); + } + if (hasScalingConfig()) { + hash = (37 * hash) + SCALING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getScalingConfig().hashCode(); + } + switch (metastoreConfigCase_) { + case 5: + hash = (37 * hash) + HIVE_METASTORE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getHiveMetastoreConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.Service parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Service parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Service parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.Service parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.Service prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A managed metastore service that serves metadata queries.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.Service} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.Service) + com.google.cloud.metastore.v1beta.ServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Service_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Service_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.Service.class, com.google.cloud.metastore.v1beta.Service.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.Service.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (hiveMetastoreConfigBuilder_ != null) { + hiveMetastoreConfigBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + network_ = ""; + endpointUri_ = ""; + port_ = 0; + state_ = 0; + stateMessage_ = ""; + artifactGcsUri_ = ""; + tier_ = 0; + metadataIntegration_ = null; + if (metadataIntegrationBuilder_ != null) { + metadataIntegrationBuilder_.dispose(); + metadataIntegrationBuilder_ = null; + } + maintenanceWindow_ = null; + if (maintenanceWindowBuilder_ != null) { + maintenanceWindowBuilder_.dispose(); + maintenanceWindowBuilder_ = null; + } + uid_ = ""; + metadataManagementActivity_ = null; + if (metadataManagementActivityBuilder_ != null) { + metadataManagementActivityBuilder_.dispose(); + metadataManagementActivityBuilder_ = null; + } + releaseChannel_ = 0; + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + databaseType_ = 0; + telemetryConfig_ = null; + if (telemetryConfigBuilder_ != null) { + telemetryConfigBuilder_.dispose(); + telemetryConfigBuilder_ = null; + } + scalingConfig_ = null; + if (scalingConfigBuilder_ != null) { + scalingConfigBuilder_.dispose(); + scalingConfigBuilder_ = null; + } + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_Service_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.Service.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service build() { + com.google.cloud.metastore.v1beta.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service buildPartial() { + com.google.cloud.metastore.v1beta.Service result = new com.google.cloud.metastore.v1beta.Service(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.Service result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endpointUri_ = endpointUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.port_ = port_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.stateMessage_ = stateMessage_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.artifactGcsUri_ = artifactGcsUri_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.tier_ = tier_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.metadataIntegration_ = metadataIntegrationBuilder_ == null + ? metadataIntegration_ + : metadataIntegrationBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.maintenanceWindow_ = maintenanceWindowBuilder_ == null + ? maintenanceWindow_ + : maintenanceWindowBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.metadataManagementActivity_ = metadataManagementActivityBuilder_ == null + ? metadataManagementActivity_ + : metadataManagementActivityBuilder_.build(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.releaseChannel_ = releaseChannel_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.encryptionConfig_ = encryptionConfigBuilder_ == null + ? encryptionConfig_ + : encryptionConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.networkConfig_ = networkConfigBuilder_ == null + ? networkConfig_ + : networkConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.databaseType_ = databaseType_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.telemetryConfig_ = telemetryConfigBuilder_ == null + ? telemetryConfig_ + : telemetryConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.scalingConfig_ = scalingConfigBuilder_ == null + ? scalingConfig_ + : scalingConfigBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.metastore.v1beta.Service result) { + result.metastoreConfigCase_ = metastoreConfigCase_; + result.metastoreConfig_ = this.metastoreConfig_; + if (metastoreConfigCase_ == 5 && + hiveMetastoreConfigBuilder_ != null) { + result.metastoreConfig_ = hiveMetastoreConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.Service) { + return mergeFrom((com.google.cloud.metastore.v1beta.Service)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.Service other) { + if (other == com.google.cloud.metastore.v1beta.Service.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getEndpointUri().isEmpty()) { + endpointUri_ = other.endpointUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getArtifactGcsUri().isEmpty()) { + artifactGcsUri_ = other.artifactGcsUri_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.tier_ != 0) { + setTierValue(other.getTierValue()); + } + if (other.hasMetadataIntegration()) { + mergeMetadataIntegration(other.getMetadataIntegration()); + } + if (other.hasMaintenanceWindow()) { + mergeMaintenanceWindow(other.getMaintenanceWindow()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (other.hasMetadataManagementActivity()) { + mergeMetadataManagementActivity(other.getMetadataManagementActivity()); + } + if (other.releaseChannel_ != 0) { + setReleaseChannelValue(other.getReleaseChannelValue()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + if (other.databaseType_ != 0) { + setDatabaseTypeValue(other.getDatabaseTypeValue()); + } + if (other.hasTelemetryConfig()) { + mergeTelemetryConfig(other.getTelemetryConfig()); + } + if (other.hasScalingConfig()) { + mergeScalingConfig(other.getScalingConfig()); + } + switch (other.getMetastoreConfigCase()) { + case HIVE_METASTORE_CONFIG: { + mergeHiveMetastoreConfig(other.getHiveMetastoreConfig()); + break; + } + case METASTORECONFIG_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: { + input.readMessage( + getHiveMetastoreConfigFieldBuilder().getBuilder(), + extensionRegistry); + metastoreConfigCase_ = 5; + break; + } // case 42 + case 58: { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: { + endpointUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 72: { + port_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 90: { + stateMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: { + artifactGcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 104: { + tier_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 104 + case 114: { + input.readMessage( + getMetadataIntegrationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 + case 122: { + input.readMessage( + getMaintenanceWindowFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 130: { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 130 + case 138: { + input.readMessage( + getMetadataManagementActivityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 138 + case 152: { + releaseChannel_ = input.readEnum(); + bitField0_ |= 0x00010000; + break; + } // case 152 + case 162: { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 162 + case 170: { + input.readMessage( + getNetworkConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 170 + case 176: { + databaseType_ = input.readEnum(); + bitField0_ |= 0x00080000; + break; + } // case 176 + case 186: { + input.readMessage( + getTelemetryConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 186 + case 194: { + input.readMessage( + getScalingConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 194 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int metastoreConfigCase_ = 0; + private java.lang.Object metastoreConfig_; + public MetastoreConfigCase + getMetastoreConfigCase() { + return MetastoreConfigCase.forNumber( + metastoreConfigCase_); + } + + public Builder clearMetastoreConfig() { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.HiveMetastoreConfig, com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder> hiveMetastoreConfigBuilder_; + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + @java.lang.Override + public boolean hasHiveMetastoreConfig() { + return metastoreConfigCase_ == 5; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfig getHiveMetastoreConfig() { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); + } else { + if (metastoreConfigCase_ == 5) { + return hiveMetastoreConfigBuilder_.getMessage(); + } + return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); + } + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder setHiveMetastoreConfig(com.google.cloud.metastore.v1beta.HiveMetastoreConfig value) { + if (hiveMetastoreConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metastoreConfig_ = value; + onChanged(); + } else { + hiveMetastoreConfigBuilder_.setMessage(value); + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder setHiveMetastoreConfig( + com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder builderForValue) { + if (hiveMetastoreConfigBuilder_ == null) { + metastoreConfig_ = builderForValue.build(); + onChanged(); + } else { + hiveMetastoreConfigBuilder_.setMessage(builderForValue.build()); + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder mergeHiveMetastoreConfig(com.google.cloud.metastore.v1beta.HiveMetastoreConfig value) { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5 && + metastoreConfig_ != com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance()) { + metastoreConfig_ = com.google.cloud.metastore.v1beta.HiveMetastoreConfig.newBuilder((com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_) + .mergeFrom(value).buildPartial(); + } else { + metastoreConfig_ = value; + } + onChanged(); + } else { + if (metastoreConfigCase_ == 5) { + hiveMetastoreConfigBuilder_.mergeFrom(value); + } else { + hiveMetastoreConfigBuilder_.setMessage(value); + } + } + metastoreConfigCase_ = 5; + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + public Builder clearHiveMetastoreConfig() { + if (hiveMetastoreConfigBuilder_ == null) { + if (metastoreConfigCase_ == 5) { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + onChanged(); + } + } else { + if (metastoreConfigCase_ == 5) { + metastoreConfigCase_ = 0; + metastoreConfig_ = null; + } + hiveMetastoreConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + public com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder getHiveMetastoreConfigBuilder() { + return getHiveMetastoreConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder() { + if ((metastoreConfigCase_ == 5) && (hiveMetastoreConfigBuilder_ != null)) { + return hiveMetastoreConfigBuilder_.getMessageOrBuilder(); + } else { + if (metastoreConfigCase_ == 5) { + return (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_; + } + return com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); + } + } + /** + *
+     * Configuration information specific to running Hive metastore
+     * software as the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.HiveMetastoreConfig, com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder> + getHiveMetastoreConfigFieldBuilder() { + if (hiveMetastoreConfigBuilder_ == null) { + if (!(metastoreConfigCase_ == 5)) { + metastoreConfig_ = com.google.cloud.metastore.v1beta.HiveMetastoreConfig.getDefaultInstance(); + } + hiveMetastoreConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.HiveMetastoreConfig, com.google.cloud.metastore.v1beta.HiveMetastoreConfig.Builder, com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder>( + (com.google.cloud.metastore.v1beta.HiveMetastoreConfig) metastoreConfig_, + getParentForChildren(), + isClean()); + metastoreConfig_ = null; + } + metastoreConfigCase_ = 5; + onChanged(); + return hiveMetastoreConfigBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the metastore service, in the
+     * following format:
+     * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time when the metastore service was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The time when the metastore service was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * User-defined labels for the metastore service.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object network_ = ""; + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + public com.google.protobuf.ByteString + getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Immutable. The relative resource name of the VPC network on which the
+     * instance can be accessed. It is specified in the following form:
+     * `projects/{project_number}/global/networks/{network_id}`.
+     * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object endpointUri_ = ""; + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + public java.lang.String getEndpointUri() { + java.lang.Object ref = endpointUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + public com.google.protobuf.ByteString + getEndpointUriBytes() { + java.lang.Object ref = endpointUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearEndpointUri() { + endpointUri_ = getDefaultInstance().getEndpointUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Output only. The URI of the endpoint used to access the metastore service.
+     * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for endpointUri to set. + * @return This builder for chaining. + */ + public Builder setEndpointUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int port_ ; + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The TCP port at which the metastore service is reached. Default: 9083.
+     * 
+ * + * int32 port = 9; + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000080); + port_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service.State getState() { + com.google.cloud.metastore.v1beta.Service.State result = com.google.cloud.metastore.v1beta.Service.State.forNumber(state_); + return result == null ? com.google.cloud.metastore.v1beta.Service.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.metastore.v1beta.Service.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The current state of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString + getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + stateMessage_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + stateMessage_ = getDefaultInstance().getStateMessage(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * Output only. Additional information about the current state of the
+     * metastore service, if available.
+     * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + stateMessage_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object artifactGcsUri_ = ""; + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + public java.lang.String getArtifactGcsUri() { + java.lang.Object ref = artifactGcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactGcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + public com.google.protobuf.ByteString + getArtifactGcsUriBytes() { + java.lang.Object ref = artifactGcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artifactGcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The artifactGcsUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactGcsUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + artifactGcsUri_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearArtifactGcsUri() { + artifactGcsUri_ = getDefaultInstance().getArtifactGcsUri(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+     * where artifacts related to the metastore service are stored.
+     * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for artifactGcsUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactGcsUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + artifactGcsUri_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private int tier_ = 0; + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + @java.lang.Override public int getTierValue() { + return tier_; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @param value The enum numeric value on the wire for tier to set. + * @return This builder for chaining. + */ + public Builder setTierValue(int value) { + tier_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @return The tier. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service.Tier getTier() { + com.google.cloud.metastore.v1beta.Service.Tier result = com.google.cloud.metastore.v1beta.Service.Tier.forNumber(tier_); + return result == null ? com.google.cloud.metastore.v1beta.Service.Tier.UNRECOGNIZED : result; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @param value The tier to set. + * @return This builder for chaining. + */ + public Builder setTier(com.google.cloud.metastore.v1beta.Service.Tier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + tier_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The tier of the service.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @return This builder for chaining. + */ + public Builder clearTier() { + bitField0_ = (bitField0_ & ~0x00000800); + tier_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.MetadataIntegration metadataIntegration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataIntegration, com.google.cloud.metastore.v1beta.MetadataIntegration.Builder, com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder> metadataIntegrationBuilder_; + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + * @return Whether the metadataIntegration field is set. + */ + public boolean hasMetadataIntegration() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + * @return The metadataIntegration. + */ + public com.google.cloud.metastore.v1beta.MetadataIntegration getMetadataIntegration() { + if (metadataIntegrationBuilder_ == null) { + return metadataIntegration_ == null ? com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance() : metadataIntegration_; + } else { + return metadataIntegrationBuilder_.getMessage(); + } + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + public Builder setMetadataIntegration(com.google.cloud.metastore.v1beta.MetadataIntegration value) { + if (metadataIntegrationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataIntegration_ = value; + } else { + metadataIntegrationBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + public Builder setMetadataIntegration( + com.google.cloud.metastore.v1beta.MetadataIntegration.Builder builderForValue) { + if (metadataIntegrationBuilder_ == null) { + metadataIntegration_ = builderForValue.build(); + } else { + metadataIntegrationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + public Builder mergeMetadataIntegration(com.google.cloud.metastore.v1beta.MetadataIntegration value) { + if (metadataIntegrationBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) && + metadataIntegration_ != null && + metadataIntegration_ != com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance()) { + getMetadataIntegrationBuilder().mergeFrom(value); + } else { + metadataIntegration_ = value; + } + } else { + metadataIntegrationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + public Builder clearMetadataIntegration() { + bitField0_ = (bitField0_ & ~0x00001000); + metadataIntegration_ = null; + if (metadataIntegrationBuilder_ != null) { + metadataIntegrationBuilder_.dispose(); + metadataIntegrationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + public com.google.cloud.metastore.v1beta.MetadataIntegration.Builder getMetadataIntegrationBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getMetadataIntegrationFieldBuilder().getBuilder(); + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + public com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder getMetadataIntegrationOrBuilder() { + if (metadataIntegrationBuilder_ != null) { + return metadataIntegrationBuilder_.getMessageOrBuilder(); + } else { + return metadataIntegration_ == null ? + com.google.cloud.metastore.v1beta.MetadataIntegration.getDefaultInstance() : metadataIntegration_; + } + } + /** + *
+     * The setting that defines how metastore metadata should be integrated with
+     * external services and systems.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataIntegration, com.google.cloud.metastore.v1beta.MetadataIntegration.Builder, com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder> + getMetadataIntegrationFieldBuilder() { + if (metadataIntegrationBuilder_ == null) { + metadataIntegrationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataIntegration, com.google.cloud.metastore.v1beta.MetadataIntegration.Builder, com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder>( + getMetadataIntegration(), + getParentForChildren(), + isClean()); + metadataIntegration_ = null; + } + return metadataIntegrationBuilder_; + } + + private com.google.cloud.metastore.v1beta.MaintenanceWindow maintenanceWindow_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MaintenanceWindow, com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder, com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder> maintenanceWindowBuilder_; + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + public boolean hasMaintenanceWindow() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + public com.google.cloud.metastore.v1beta.MaintenanceWindow getMaintenanceWindow() { + if (maintenanceWindowBuilder_ == null) { + return maintenanceWindow_ == null ? com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } else { + return maintenanceWindowBuilder_.getMessage(); + } + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + public Builder setMaintenanceWindow(com.google.cloud.metastore.v1beta.MaintenanceWindow value) { + if (maintenanceWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maintenanceWindow_ = value; + } else { + maintenanceWindowBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + public Builder setMaintenanceWindow( + com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder builderForValue) { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindow_ = builderForValue.build(); + } else { + maintenanceWindowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + public Builder mergeMaintenanceWindow(com.google.cloud.metastore.v1beta.MaintenanceWindow value) { + if (maintenanceWindowBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + maintenanceWindow_ != null && + maintenanceWindow_ != com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance()) { + getMaintenanceWindowBuilder().mergeFrom(value); + } else { + maintenanceWindow_ = value; + } + } else { + maintenanceWindowBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + public Builder clearMaintenanceWindow() { + bitField0_ = (bitField0_ & ~0x00002000); + maintenanceWindow_ = null; + if (maintenanceWindowBuilder_ != null) { + maintenanceWindowBuilder_.dispose(); + maintenanceWindowBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + public com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder getMaintenanceWindowBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getMaintenanceWindowFieldBuilder().getBuilder(); + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + public com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder() { + if (maintenanceWindowBuilder_ != null) { + return maintenanceWindowBuilder_.getMessageOrBuilder(); + } else { + return maintenanceWindow_ == null ? + com.google.cloud.metastore.v1beta.MaintenanceWindow.getDefaultInstance() : maintenanceWindow_; + } + } + /** + *
+     * The one hour maintenance window of the metastore service. This specifies
+     * when the service can be restarted for maintenance purposes in UTC time.
+     * Maintenance window is not needed for services with the SPANNER
+     * database type.
+     * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MaintenanceWindow, com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder, com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder> + getMaintenanceWindowFieldBuilder() { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MaintenanceWindow, com.google.cloud.metastore.v1beta.MaintenanceWindow.Builder, com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder>( + getMaintenanceWindow(), + getParentForChildren(), + isClean()); + maintenanceWindow_ = null; + } + return maintenanceWindowBuilder_; + } + + private java.lang.Object uid_ = ""; + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString + getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uid_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + *
+     * Output only. The globally unique resource identifier of the metastore
+     * service.
+     * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.MetadataManagementActivity metadataManagementActivity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataManagementActivity, com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder> metadataManagementActivityBuilder_; + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + public boolean hasMetadataManagementActivity() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + public com.google.cloud.metastore.v1beta.MetadataManagementActivity getMetadataManagementActivity() { + if (metadataManagementActivityBuilder_ == null) { + return metadataManagementActivity_ == null ? com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } else { + return metadataManagementActivityBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataManagementActivity(com.google.cloud.metastore.v1beta.MetadataManagementActivity value) { + if (metadataManagementActivityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataManagementActivity_ = value; + } else { + metadataManagementActivityBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setMetadataManagementActivity( + com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder builderForValue) { + if (metadataManagementActivityBuilder_ == null) { + metadataManagementActivity_ = builderForValue.build(); + } else { + metadataManagementActivityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeMetadataManagementActivity(com.google.cloud.metastore.v1beta.MetadataManagementActivity value) { + if (metadataManagementActivityBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) && + metadataManagementActivity_ != null && + metadataManagementActivity_ != com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance()) { + getMetadataManagementActivityBuilder().mergeFrom(value); + } else { + metadataManagementActivity_ = value; + } + } else { + metadataManagementActivityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearMetadataManagementActivity() { + bitField0_ = (bitField0_ & ~0x00008000); + metadataManagementActivity_ = null; + if (metadataManagementActivityBuilder_ != null) { + metadataManagementActivityBuilder_.dispose(); + metadataManagementActivityBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder getMetadataManagementActivityBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getMetadataManagementActivityFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder() { + if (metadataManagementActivityBuilder_ != null) { + return metadataManagementActivityBuilder_.getMessageOrBuilder(); + } else { + return metadataManagementActivity_ == null ? + com.google.cloud.metastore.v1beta.MetadataManagementActivity.getDefaultInstance() : metadataManagementActivity_; + } + } + /** + *
+     * Output only. The metadata management activities of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataManagementActivity, com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder> + getMetadataManagementActivityFieldBuilder() { + if (metadataManagementActivityBuilder_ == null) { + metadataManagementActivityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataManagementActivity, com.google.cloud.metastore.v1beta.MetadataManagementActivity.Builder, com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder>( + getMetadataManagementActivity(), + getParentForChildren(), + isClean()); + metadataManagementActivity_ = null; + } + return metadataManagementActivityBuilder_; + } + + private int releaseChannel_ = 0; + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + @java.lang.Override public int getReleaseChannelValue() { + return releaseChannel_; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The enum numeric value on the wire for releaseChannel to set. + * @return This builder for chaining. + */ + public Builder setReleaseChannelValue(int value) { + releaseChannel_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service.ReleaseChannel getReleaseChannel() { + com.google.cloud.metastore.v1beta.Service.ReleaseChannel result = com.google.cloud.metastore.v1beta.Service.ReleaseChannel.forNumber(releaseChannel_); + return result == null ? com.google.cloud.metastore.v1beta.Service.ReleaseChannel.UNRECOGNIZED : result; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The releaseChannel to set. + * @return This builder for chaining. + */ + public Builder setReleaseChannel(com.google.cloud.metastore.v1beta.Service.ReleaseChannel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + releaseChannel_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The release channel of the service.
+     * If unspecified, defaults to `STABLE`.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearReleaseChannel() { + bitField0_ = (bitField0_ & ~0x00010000); + releaseChannel_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.EncryptionConfig, com.google.cloud.metastore.v1beta.EncryptionConfig.Builder, com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder> encryptionConfigBuilder_; + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + public com.google.cloud.metastore.v1beta.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null ? com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setEncryptionConfig(com.google.cloud.metastore.v1beta.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder setEncryptionConfig( + com.google.cloud.metastore.v1beta.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder mergeEncryptionConfig(com.google.cloud.metastore.v1beta.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + encryptionConfig_ != null && + encryptionConfig_ != com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00020000); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1beta.EncryptionConfig.Builder getEncryptionConfigBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + public com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null ? + com.google.cloud.metastore.v1beta.EncryptionConfig.getDefaultInstance() : encryptionConfig_; + } + } + /** + *
+     * Immutable. Information used to configure the Dataproc Metastore service to
+     * encrypt customer data at rest. Cannot be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.EncryptionConfig, com.google.cloud.metastore.v1beta.EncryptionConfig.Builder, com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.EncryptionConfig, com.google.cloud.metastore.v1beta.EncryptionConfig.Builder, com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder>( + getEncryptionConfig(), + getParentForChildren(), + isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private com.google.cloud.metastore.v1beta.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig, com.google.cloud.metastore.v1beta.NetworkConfig.Builder, com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder> networkConfigBuilder_; + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + public com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null ? com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + public Builder setNetworkConfig(com.google.cloud.metastore.v1beta.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + } else { + networkConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + public Builder setNetworkConfig( + com.google.cloud.metastore.v1beta.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + public Builder mergeNetworkConfig(com.google.cloud.metastore.v1beta.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) && + networkConfig_ != null && + networkConfig_ != com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance()) { + getNetworkConfigBuilder().mergeFrom(value); + } else { + networkConfig_ = value; + } + } else { + networkConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x00040000); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + public com.google.cloud.metastore.v1beta.NetworkConfig.Builder getNetworkConfigBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + public com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null ? + com.google.cloud.metastore.v1beta.NetworkConfig.getDefaultInstance() : networkConfig_; + } + } + /** + *
+     * The configuration specifying the network settings for the
+     * Dataproc Metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig, com.google.cloud.metastore.v1beta.NetworkConfig.Builder, com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.NetworkConfig, com.google.cloud.metastore.v1beta.NetworkConfig.Builder, com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder>( + getNetworkConfig(), + getParentForChildren(), + isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + + private int databaseType_ = 0; + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + @java.lang.Override public int getDatabaseTypeValue() { + return databaseType_; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The enum numeric value on the wire for databaseType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseTypeValue(int value) { + databaseType_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service.DatabaseType getDatabaseType() { + com.google.cloud.metastore.v1beta.Service.DatabaseType result = com.google.cloud.metastore.v1beta.Service.DatabaseType.forNumber(databaseType_); + return result == null ? com.google.cloud.metastore.v1beta.Service.DatabaseType.UNRECOGNIZED : result; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The databaseType to set. + * @return This builder for chaining. + */ + public Builder setDatabaseType(com.google.cloud.metastore.v1beta.Service.DatabaseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00080000; + databaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The database type that the Metastore service stores its data.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearDatabaseType() { + bitField0_ = (bitField0_ & ~0x00080000); + databaseType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.metastore.v1beta.TelemetryConfig telemetryConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.TelemetryConfig, com.google.cloud.metastore.v1beta.TelemetryConfig.Builder, com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder> telemetryConfigBuilder_; + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + public boolean hasTelemetryConfig() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + public com.google.cloud.metastore.v1beta.TelemetryConfig getTelemetryConfig() { + if (telemetryConfigBuilder_ == null) { + return telemetryConfig_ == null ? com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } else { + return telemetryConfigBuilder_.getMessage(); + } + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + public Builder setTelemetryConfig(com.google.cloud.metastore.v1beta.TelemetryConfig value) { + if (telemetryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + telemetryConfig_ = value; + } else { + telemetryConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + public Builder setTelemetryConfig( + com.google.cloud.metastore.v1beta.TelemetryConfig.Builder builderForValue) { + if (telemetryConfigBuilder_ == null) { + telemetryConfig_ = builderForValue.build(); + } else { + telemetryConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + public Builder mergeTelemetryConfig(com.google.cloud.metastore.v1beta.TelemetryConfig value) { + if (telemetryConfigBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) && + telemetryConfig_ != null && + telemetryConfig_ != com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance()) { + getTelemetryConfigBuilder().mergeFrom(value); + } else { + telemetryConfig_ = value; + } + } else { + telemetryConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + public Builder clearTelemetryConfig() { + bitField0_ = (bitField0_ & ~0x00100000); + telemetryConfig_ = null; + if (telemetryConfigBuilder_ != null) { + telemetryConfigBuilder_.dispose(); + telemetryConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + public com.google.cloud.metastore.v1beta.TelemetryConfig.Builder getTelemetryConfigBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getTelemetryConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + public com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder() { + if (telemetryConfigBuilder_ != null) { + return telemetryConfigBuilder_.getMessageOrBuilder(); + } else { + return telemetryConfig_ == null ? + com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance() : telemetryConfig_; + } + } + /** + *
+     * The configuration specifying telemetry settings for the Dataproc Metastore
+     * service. If unspecified defaults to `JSON`.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.TelemetryConfig, com.google.cloud.metastore.v1beta.TelemetryConfig.Builder, com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder> + getTelemetryConfigFieldBuilder() { + if (telemetryConfigBuilder_ == null) { + telemetryConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.TelemetryConfig, com.google.cloud.metastore.v1beta.TelemetryConfig.Builder, com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder>( + getTelemetryConfig(), + getParentForChildren(), + isClean()); + telemetryConfig_ = null; + } + return telemetryConfigBuilder_; + } + + private com.google.cloud.metastore.v1beta.ScalingConfig scalingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.ScalingConfig, com.google.cloud.metastore.v1beta.ScalingConfig.Builder, com.google.cloud.metastore.v1beta.ScalingConfigOrBuilder> scalingConfigBuilder_; + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + public boolean hasScalingConfig() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + public com.google.cloud.metastore.v1beta.ScalingConfig getScalingConfig() { + if (scalingConfigBuilder_ == null) { + return scalingConfig_ == null ? com.google.cloud.metastore.v1beta.ScalingConfig.getDefaultInstance() : scalingConfig_; + } else { + return scalingConfigBuilder_.getMessage(); + } + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + public Builder setScalingConfig(com.google.cloud.metastore.v1beta.ScalingConfig value) { + if (scalingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scalingConfig_ = value; + } else { + scalingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + public Builder setScalingConfig( + com.google.cloud.metastore.v1beta.ScalingConfig.Builder builderForValue) { + if (scalingConfigBuilder_ == null) { + scalingConfig_ = builderForValue.build(); + } else { + scalingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + public Builder mergeScalingConfig(com.google.cloud.metastore.v1beta.ScalingConfig value) { + if (scalingConfigBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) && + scalingConfig_ != null && + scalingConfig_ != com.google.cloud.metastore.v1beta.ScalingConfig.getDefaultInstance()) { + getScalingConfigBuilder().mergeFrom(value); + } else { + scalingConfig_ = value; + } + } else { + scalingConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + public Builder clearScalingConfig() { + bitField0_ = (bitField0_ & ~0x00200000); + scalingConfig_ = null; + if (scalingConfigBuilder_ != null) { + scalingConfigBuilder_.dispose(); + scalingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + public com.google.cloud.metastore.v1beta.ScalingConfig.Builder getScalingConfigBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getScalingConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + public com.google.cloud.metastore.v1beta.ScalingConfigOrBuilder getScalingConfigOrBuilder() { + if (scalingConfigBuilder_ != null) { + return scalingConfigBuilder_.getMessageOrBuilder(); + } else { + return scalingConfig_ == null ? + com.google.cloud.metastore.v1beta.ScalingConfig.getDefaultInstance() : scalingConfig_; + } + } + /** + *
+     * Scaling configuration of the metastore service.
+     * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.ScalingConfig, com.google.cloud.metastore.v1beta.ScalingConfig.Builder, com.google.cloud.metastore.v1beta.ScalingConfigOrBuilder> + getScalingConfigFieldBuilder() { + if (scalingConfigBuilder_ == null) { + scalingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.ScalingConfig, com.google.cloud.metastore.v1beta.ScalingConfig.Builder, com.google.cloud.metastore.v1beta.ScalingConfigOrBuilder>( + getScalingConfig(), + getParentForChildren(), + isClean()); + scalingConfig_ = null; + } + return scalingConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.Service) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.Service) + private static final com.google.cloud.metastore.v1beta.Service DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.Service(); + } + + public static com.google.cloud.metastore.v1beta.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Service parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceName.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceName.java similarity index 100% rename from java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceName.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceName.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceOrBuilder.java new file mode 100644 index 000000000000..b1287c2744a4 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ServiceOrBuilder.java @@ -0,0 +1,581 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ServiceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.Service) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + * @return Whether the hiveMetastoreConfig field is set. + */ + boolean hasHiveMetastoreConfig(); + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + * @return The hiveMetastoreConfig. + */ + com.google.cloud.metastore.v1beta.HiveMetastoreConfig getHiveMetastoreConfig(); + /** + *
+   * Configuration information specific to running Hive metastore
+   * software as the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5; + */ + com.google.cloud.metastore.v1beta.HiveMetastoreConfigOrBuilder getHiveMetastoreConfigOrBuilder(); + + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Immutable. The relative resource name of the metastore service, in the
+   * following format:
+   * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time when the metastore service was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The time when the metastore service was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * User-defined labels for the metastore service.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The network. + */ + java.lang.String getNetwork(); + /** + *
+   * Immutable. The relative resource name of the VPC network on which the
+   * instance can be accessed. It is specified in the following form:
+   * `projects/{project_number}/global/networks/{network_id}`.
+   * 
+ * + * string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * @return The bytes for network. + */ + com.google.protobuf.ByteString + getNetworkBytes(); + + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The endpointUri. + */ + java.lang.String getEndpointUri(); + /** + *
+   * Output only. The URI of the endpoint used to access the metastore service.
+   * 
+ * + * string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for endpointUri. + */ + com.google.protobuf.ByteString + getEndpointUriBytes(); + + /** + *
+   * The TCP port at which the metastore service is reached. Default: 9083.
+   * 
+ * + * int32 port = 9; + * @return The port. + */ + int getPort(); + + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Output only. The current state of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The state. + */ + com.google.cloud.metastore.v1beta.Service.State getState(); + + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + *
+   * Output only. Additional information about the current state of the
+   * metastore service, if available.
+   * 
+ * + * string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString + getStateMessageBytes(); + + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The artifactGcsUri. + */ + java.lang.String getArtifactGcsUri(); + /** + *
+   * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
+   * where artifacts related to the metastore service are stored.
+   * 
+ * + * string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for artifactGcsUri. + */ + com.google.protobuf.ByteString + getArtifactGcsUriBytes(); + + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @return The enum numeric value on the wire for tier. + */ + int getTierValue(); + /** + *
+   * The tier of the service.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.Tier tier = 13; + * @return The tier. + */ + com.google.cloud.metastore.v1beta.Service.Tier getTier(); + + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + * @return Whether the metadataIntegration field is set. + */ + boolean hasMetadataIntegration(); + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + * @return The metadataIntegration. + */ + com.google.cloud.metastore.v1beta.MetadataIntegration getMetadataIntegration(); + /** + *
+   * The setting that defines how metastore metadata should be integrated with
+   * external services and systems.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14; + */ + com.google.cloud.metastore.v1beta.MetadataIntegrationOrBuilder getMetadataIntegrationOrBuilder(); + + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + * @return Whether the maintenanceWindow field is set. + */ + boolean hasMaintenanceWindow(); + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + * @return The maintenanceWindow. + */ + com.google.cloud.metastore.v1beta.MaintenanceWindow getMaintenanceWindow(); + /** + *
+   * The one hour maintenance window of the metastore service. This specifies
+   * when the service can be restarted for maintenance purposes in UTC time.
+   * Maintenance window is not needed for services with the SPANNER
+   * database type.
+   * 
+ * + * .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15; + */ + com.google.cloud.metastore.v1beta.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder(); + + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The uid. + */ + java.lang.String getUid(); + /** + *
+   * Output only. The globally unique resource identifier of the metastore
+   * service.
+   * 
+ * + * string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for uid. + */ + com.google.protobuf.ByteString + getUidBytes(); + + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the metadataManagementActivity field is set. + */ + boolean hasMetadataManagementActivity(); + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The metadataManagementActivity. + */ + com.google.cloud.metastore.v1beta.MetadataManagementActivity getMetadataManagementActivity(); + /** + *
+   * Output only. The metadata management activities of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.cloud.metastore.v1beta.MetadataManagementActivityOrBuilder getMetadataManagementActivityOrBuilder(); + + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for releaseChannel. + */ + int getReleaseChannelValue(); + /** + *
+   * Immutable. The release channel of the service.
+   * If unspecified, defaults to `STABLE`.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The releaseChannel. + */ + com.google.cloud.metastore.v1beta.Service.ReleaseChannel getReleaseChannel(); + + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The encryptionConfig. + */ + com.google.cloud.metastore.v1beta.EncryptionConfig getEncryptionConfig(); + /** + *
+   * Immutable. Information used to configure the Dataproc Metastore service to
+   * encrypt customer data at rest. Cannot be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE]; + */ + com.google.cloud.metastore.v1beta.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); + + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + * @return The networkConfig. + */ + com.google.cloud.metastore.v1beta.NetworkConfig getNetworkConfig(); + /** + *
+   * The configuration specifying the network settings for the
+   * Dataproc Metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.NetworkConfig network_config = 21; + */ + com.google.cloud.metastore.v1beta.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); + + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The enum numeric value on the wire for databaseType. + */ + int getDatabaseTypeValue(); + /** + *
+   * Immutable. The database type that the Metastore service stores its data.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The databaseType. + */ + com.google.cloud.metastore.v1beta.Service.DatabaseType getDatabaseType(); + + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + * @return Whether the telemetryConfig field is set. + */ + boolean hasTelemetryConfig(); + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + * @return The telemetryConfig. + */ + com.google.cloud.metastore.v1beta.TelemetryConfig getTelemetryConfig(); + /** + *
+   * The configuration specifying telemetry settings for the Dataproc Metastore
+   * service. If unspecified defaults to `JSON`.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23; + */ + com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder getTelemetryConfigOrBuilder(); + + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + * @return Whether the scalingConfig field is set. + */ + boolean hasScalingConfig(); + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + * @return The scalingConfig. + */ + com.google.cloud.metastore.v1beta.ScalingConfig getScalingConfig(); + /** + *
+   * Scaling configuration of the metastore service.
+   * 
+ * + * .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24; + */ + com.google.cloud.metastore.v1beta.ScalingConfigOrBuilder getScalingConfigOrBuilder(); + + public com.google.cloud.metastore.v1beta.Service.MetastoreConfigCase getMetastoreConfigCase(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfig.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfig.java new file mode 100644 index 000000000000..b05742aa21b7 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfig.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Telemetry Configuration for the Dataproc Metastore service.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.TelemetryConfig} + */ +public final class TelemetryConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.TelemetryConfig) + TelemetryConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use TelemetryConfig.newBuilder() to construct. + private TelemetryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TelemetryConfig() { + logFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TelemetryConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_TelemetryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_TelemetryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.TelemetryConfig.class, com.google.cloud.metastore.v1beta.TelemetryConfig.Builder.class); + } + + /** + * Protobuf enum {@code google.cloud.metastore.v1beta.TelemetryConfig.LogFormat} + */ + public enum LogFormat + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The LOG_FORMAT is not set.
+     * 
+ * + * LOG_FORMAT_UNSPECIFIED = 0; + */ + LOG_FORMAT_UNSPECIFIED(0), + /** + *
+     * Logging output uses the legacy `textPayload` format.
+     * 
+ * + * LEGACY = 1; + */ + LEGACY(1), + /** + *
+     * Logging output uses the `jsonPayload` format.
+     * 
+ * + * JSON = 2; + */ + JSON(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The LOG_FORMAT is not set.
+     * 
+ * + * LOG_FORMAT_UNSPECIFIED = 0; + */ + public static final int LOG_FORMAT_UNSPECIFIED_VALUE = 0; + /** + *
+     * Logging output uses the legacy `textPayload` format.
+     * 
+ * + * LEGACY = 1; + */ + public static final int LEGACY_VALUE = 1; + /** + *
+     * Logging output uses the `jsonPayload` format.
+     * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LogFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LogFormat forNumber(int value) { + switch (value) { + case 0: return LOG_FORMAT_UNSPECIFIED; + case 1: return LEGACY; + case 2: return JSON; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LogFormat> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LogFormat findValueByNumber(int number) { + return LogFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.TelemetryConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final LogFormat[] VALUES = values(); + + public static LogFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LogFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.metastore.v1beta.TelemetryConfig.LogFormat) + } + + public static final int LOG_FORMAT_FIELD_NUMBER = 1; + private int logFormat_ = 0; + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + @java.lang.Override public int getLogFormatValue() { + return logFormat_; + } + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + @java.lang.Override public com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat getLogFormat() { + com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat result = com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.forNumber(logFormat_); + return result == null ? com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (logFormat_ != com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED.getNumber()) { + output.writeEnum(1, logFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (logFormat_ != com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.LOG_FORMAT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, logFormat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.TelemetryConfig)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.TelemetryConfig other = (com.google.cloud.metastore.v1beta.TelemetryConfig) obj; + + if (logFormat_ != other.logFormat_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOG_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + logFormat_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.TelemetryConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.TelemetryConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Telemetry Configuration for the Dataproc Metastore service.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.TelemetryConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.TelemetryConfig) + com.google.cloud.metastore.v1beta.TelemetryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_TelemetryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_TelemetryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.TelemetryConfig.class, com.google.cloud.metastore.v1beta.TelemetryConfig.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.TelemetryConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + logFormat_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_TelemetryConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.TelemetryConfig getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.TelemetryConfig build() { + com.google.cloud.metastore.v1beta.TelemetryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.TelemetryConfig buildPartial() { + com.google.cloud.metastore.v1beta.TelemetryConfig result = new com.google.cloud.metastore.v1beta.TelemetryConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.TelemetryConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.logFormat_ = logFormat_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.TelemetryConfig) { + return mergeFrom((com.google.cloud.metastore.v1beta.TelemetryConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.TelemetryConfig other) { + if (other == com.google.cloud.metastore.v1beta.TelemetryConfig.getDefaultInstance()) return this; + if (other.logFormat_ != 0) { + setLogFormatValue(other.getLogFormatValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + logFormat_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int logFormat_ = 0; + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + @java.lang.Override public int getLogFormatValue() { + return logFormat_; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @param value The enum numeric value on the wire for logFormat to set. + * @return This builder for chaining. + */ + public Builder setLogFormatValue(int value) { + logFormat_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat getLogFormat() { + com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat result = com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.forNumber(logFormat_); + return result == null ? com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat.UNRECOGNIZED : result; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @param value The logFormat to set. + * @return This builder for chaining. + */ + public Builder setLogFormat(com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + logFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The output format of the Dataproc Metastore service's logs.
+     * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @return This builder for chaining. + */ + public Builder clearLogFormat() { + bitField0_ = (bitField0_ & ~0x00000001); + logFormat_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.TelemetryConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.TelemetryConfig) + private static final com.google.cloud.metastore.v1beta.TelemetryConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.TelemetryConfig(); + } + + public static com.google.cloud.metastore.v1beta.TelemetryConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TelemetryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.TelemetryConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfigOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfigOrBuilder.java new file mode 100644 index 000000000000..f6a83ead5901 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/TelemetryConfigOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface TelemetryConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.TelemetryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @return The enum numeric value on the wire for logFormat. + */ + int getLogFormatValue(); + /** + *
+   * The output format of the Dataproc Metastore service's logs.
+   * 
+ * + * .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1; + * @return The logFormat. + */ + com.google.cloud.metastore.v1beta.TelemetryConfig.LogFormat getLogFormat(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequest.java new file mode 100644 index 000000000000..6ca37bfa5cea --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequest.java @@ -0,0 +1,1173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for UpdateFederation.
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.UpdateFederationRequest} + */ +public final class UpdateFederationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.UpdateFederationRequest) + UpdateFederationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateFederationRequest.newBuilder() to construct. + private UpdateFederationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateFederationRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateFederationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.UpdateFederationRequest.class, com.google.cloud.metastore.v1beta.UpdateFederationRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int FEDERATION_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1beta.Federation federation_; + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + @java.lang.Override + public boolean hasFederation() { + return federation_ != null; + } + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Federation getFederation() { + return federation_ == null ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() : federation_; + } + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder() { + return federation_ == null ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() : federation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (federation_ != null) { + output.writeMessage(2, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (federation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFederation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.UpdateFederationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.UpdateFederationRequest other = (com.google.cloud.metastore.v1beta.UpdateFederationRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasFederation() != other.hasFederation()) return false; + if (hasFederation()) { + if (!getFederation() + .equals(other.getFederation())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasFederation()) { + hash = (37 * hash) + FEDERATION_FIELD_NUMBER; + hash = (53 * hash) + getFederation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.UpdateFederationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateFederation.
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.UpdateFederationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.UpdateFederationRequest) + com.google.cloud.metastore.v1beta.UpdateFederationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.UpdateFederationRequest.class, com.google.cloud.metastore.v1beta.UpdateFederationRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.UpdateFederationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreFederationProto.internal_static_google_cloud_metastore_v1beta_UpdateFederationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateFederationRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.UpdateFederationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateFederationRequest build() { + com.google.cloud.metastore.v1beta.UpdateFederationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateFederationRequest buildPartial() { + com.google.cloud.metastore.v1beta.UpdateFederationRequest result = new com.google.cloud.metastore.v1beta.UpdateFederationRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.UpdateFederationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.federation_ = federationBuilder_ == null + ? federation_ + : federationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.UpdateFederationRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.UpdateFederationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.UpdateFederationRequest other) { + if (other == com.google.cloud.metastore.v1beta.UpdateFederationRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasFederation()) { + mergeFederation(other.getFederation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getFederationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1beta.Federation federation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder> federationBuilder_; + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + public boolean hasFederation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + public com.google.cloud.metastore.v1beta.Federation getFederation() { + if (federationBuilder_ == null) { + return federation_ == null ? com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() : federation_; + } else { + return federationBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation(com.google.cloud.metastore.v1beta.Federation value) { + if (federationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + federation_ = value; + } else { + federationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFederation( + com.google.cloud.metastore.v1beta.Federation.Builder builderForValue) { + if (federationBuilder_ == null) { + federation_ = builderForValue.build(); + } else { + federationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFederation(com.google.cloud.metastore.v1beta.Federation value) { + if (federationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + federation_ != null && + federation_ != com.google.cloud.metastore.v1beta.Federation.getDefaultInstance()) { + getFederationBuilder().mergeFrom(value); + } else { + federation_ = value; + } + } else { + federationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFederation() { + bitField0_ = (bitField0_ & ~0x00000002); + federation_ = null; + if (federationBuilder_ != null) { + federationBuilder_.dispose(); + federationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.Federation.Builder getFederationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFederationFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder() { + if (federationBuilder_ != null) { + return federationBuilder_.getMessageOrBuilder(); + } else { + return federation_ == null ? + com.google.cloud.metastore.v1beta.Federation.getDefaultInstance() : federation_; + } + } + /** + *
+     * Required. The metastore federation to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore federation's `name` field is used to identify the
+     * metastore service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder> + getFederationFieldBuilder() { + if (federationBuilder_ == null) { + federationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Federation, com.google.cloud.metastore.v1beta.Federation.Builder, com.google.cloud.metastore.v1beta.FederationOrBuilder>( + getFederation(), + getParentForChildren(), + isClean()); + federation_ = null; + } + return federationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.UpdateFederationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.UpdateFederationRequest) + private static final com.google.cloud.metastore.v1beta.UpdateFederationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.UpdateFederationRequest(); + } + + public static com.google.cloud.metastore.v1beta.UpdateFederationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFederationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateFederationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequestOrBuilder.java new file mode 100644 index 000000000000..67f4e8bc1dac --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateFederationRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore_federation.proto + +package com.google.cloud.metastore.v1beta; + +public interface UpdateFederationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.UpdateFederationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the federation field is set. + */ + boolean hasFederation(); + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The federation. + */ + com.google.cloud.metastore.v1beta.Federation getFederation(); + /** + *
+   * Required. The metastore federation to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore federation's `name` field is used to identify the
+   * metastore service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1beta.FederationOrBuilder getFederationOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequest.java new file mode 100644 index 000000000000..b30e6e32814e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImport].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.UpdateMetadataImportRequest} + */ +public final class UpdateMetadataImportRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) + UpdateMetadataImportRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateMetadataImportRequest.newBuilder() to construct. + private UpdateMetadataImportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateMetadataImportRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateMetadataImportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.class, com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int METADATA_IMPORT_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1beta.MetadataImport metadataImport_; + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + @java.lang.Override + public boolean hasMetadataImport() { + return metadataImport_ != null; + } + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport() { + return metadataImport_ == null ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() : metadataImport_; + } + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder() { + return metadataImport_ == null ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() : metadataImport_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (metadataImport_ != null) { + output.writeMessage(2, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (metadataImport_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMetadataImport()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest other = (com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasMetadataImport() != other.hasMetadataImport()) return false; + if (hasMetadataImport()) { + if (!getMetadataImport() + .equals(other.getMetadataImport())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasMetadataImport()) { + hash = (37 * hash) + METADATA_IMPORT_FIELD_NUMBER; + hash = (53 * hash) + getMetadataImport().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImport].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.UpdateMetadataImportRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.class, com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateMetadataImportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest build() { + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest buildPartial() { + com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest result = new com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataImport_ = metadataImportBuilder_ == null + ? metadataImport_ + : metadataImportBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest other) { + if (other == com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasMetadataImport()) { + mergeMetadataImport(other.getMetadataImport()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getMetadataImportFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1beta.MetadataImport metadataImport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> metadataImportBuilder_; + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + public boolean hasMetadataImport() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + public com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport() { + if (metadataImportBuilder_ == null) { + return metadataImport_ == null ? com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() : metadataImport_; + } else { + return metadataImportBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport(com.google.cloud.metastore.v1beta.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadataImport_ = value; + } else { + metadataImportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setMetadataImport( + com.google.cloud.metastore.v1beta.MetadataImport.Builder builderForValue) { + if (metadataImportBuilder_ == null) { + metadataImport_ = builderForValue.build(); + } else { + metadataImportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeMetadataImport(com.google.cloud.metastore.v1beta.MetadataImport value) { + if (metadataImportBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadataImport_ != null && + metadataImport_ != com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance()) { + getMetadataImportBuilder().mergeFrom(value); + } else { + metadataImport_ = value; + } + } else { + metadataImportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearMetadataImport() { + bitField0_ = (bitField0_ & ~0x00000002); + metadataImport_ = null; + if (metadataImportBuilder_ != null) { + metadataImportBuilder_.dispose(); + metadataImportBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.MetadataImport.Builder getMetadataImportBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataImportFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder() { + if (metadataImportBuilder_ != null) { + return metadataImportBuilder_.getMessageOrBuilder(); + } else { + return metadataImport_ == null ? + com.google.cloud.metastore.v1beta.MetadataImport.getDefaultInstance() : metadataImport_; + } + } + /** + *
+     * Required. The metadata import to update. The server only merges fields
+     * in the import if they are specified in `update_mask`.
+     * The metadata import's `name` field is used to identify the metastore
+     * import to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder> + getMetadataImportFieldBuilder() { + if (metadataImportBuilder_ == null) { + metadataImportBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.MetadataImport, com.google.cloud.metastore.v1beta.MetadataImport.Builder, com.google.cloud.metastore.v1beta.MetadataImportOrBuilder>( + getMetadataImport(), + getParentForChildren(), + isClean()); + metadataImport_ = null; + } + return metadataImportBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) + private static final com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest(); + } + + public static com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMetadataImportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateMetadataImportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequestOrBuilder.java new file mode 100644 index 000000000000..3b1bb6bb4bb3 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateMetadataImportRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface UpdateMetadataImportRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.UpdateMetadataImportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the metadataImport field is set. + */ + boolean hasMetadataImport(); + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The metadataImport. + */ + com.google.cloud.metastore.v1beta.MetadataImport getMetadataImport(); + /** + *
+   * Required. The metadata import to update. The server only merges fields
+   * in the import if they are specified in `update_mask`.
+   * The metadata import's `name` field is used to identify the metastore
+   * import to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1beta.MetadataImportOrBuilder getMetadataImportOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequest.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequest.java new file mode 100644 index 000000000000..c8d9efe5308e --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + *
+ * Request message for
+ * [DataprocMetastore.UpdateService][google.cloud.metastore.v1beta.DataprocMetastore.UpdateService].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.UpdateServiceRequest} + */ +public final class UpdateServiceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.UpdateServiceRequest) + UpdateServiceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateServiceRequest.newBuilder() to construct. + private UpdateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateServiceRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.UpdateServiceRequest.class, com.google.cloud.metastore.v1beta.UpdateServiceRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SERVICE_FIELD_NUMBER = 2; + private com.google.cloud.metastore.v1beta.Service service_; + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.Service getService() { + return service_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : service_; + } + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder() { + return service_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : service_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (service_ != null) { + output.writeMessage(2, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUpdateMask()); + } + if (service_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.metastore.v1beta.UpdateServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.UpdateServiceRequest other = (com.google.cloud.metastore.v1beta.UpdateServiceRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService() + .equals(other.getService())) return false; + } + if (!getRequestId() + .equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.metastore.v1beta.UpdateServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for
+   * [DataprocMetastore.UpdateService][google.cloud.metastore.v1beta.DataprocMetastore.UpdateService].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.UpdateServiceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.UpdateServiceRequest) + com.google.cloud.metastore.v1beta.UpdateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.UpdateServiceRequest.class, com.google.cloud.metastore.v1beta.UpdateServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.UpdateServiceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.metastore.v1beta.MetastoreProto.internal_static_google_cloud_metastore_v1beta_UpdateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateServiceRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.UpdateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateServiceRequest build() { + com.google.cloud.metastore.v1beta.UpdateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateServiceRequest buildPartial() { + com.google.cloud.metastore.v1beta.UpdateServiceRequest result = new com.google.cloud.metastore.v1beta.UpdateServiceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.UpdateServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null + ? updateMask_ + : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.service_ = serviceBuilder_ == null + ? service_ + : serviceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.metastore.v1beta.UpdateServiceRequest) { + return mergeFrom((com.google.cloud.metastore.v1beta.UpdateServiceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.UpdateServiceRequest other) { + if (other == com.google.cloud.metastore.v1beta.UpdateServiceRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasService()) { + mergeService(other.getService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUpdateMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getServiceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updateMask_ != null && + updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.metastore.v1beta.Service service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder> serviceBuilder_; + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + public boolean hasService() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + public com.google.cloud.metastore.v1beta.Service getService() { + if (serviceBuilder_ == null) { + return service_ == null ? com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService(com.google.cloud.metastore.v1beta.Service value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + } else { + serviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setService( + com.google.cloud.metastore.v1beta.Service.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeService(com.google.cloud.metastore.v1beta.Service value) { + if (serviceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + service_ != null && + service_ != com.google.cloud.metastore.v1beta.Service.getDefaultInstance()) { + getServiceBuilder().mergeFrom(value); + } else { + service_ = value; + } + } else { + serviceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000002); + service_ = null; + if (serviceBuilder_ != null) { + serviceBuilder_.dispose(); + serviceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.Service.Builder getServiceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null ? + com.google.cloud.metastore.v1beta.Service.getDefaultInstance() : service_; + } + } + /** + *
+     * Required. The metastore service to update. The server only merges fields
+     * in the service if they are specified in `update_mask`.
+     * The metastore service's `name` field is used to identify the metastore
+     * service to be updated.
+     * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.metastore.v1beta.Service, com.google.cloud.metastore.v1beta.Service.Builder, com.google.cloud.metastore.v1beta.ServiceOrBuilder>( + getService(), + getParentForChildren(), + isClean()); + service_ = null; + } + return serviceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString + getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Optional. A request ID. Specify a unique request ID to allow the server to
+     * ignore the request if it has completed. The server will ignore subsequent
+     * requests that provide a duplicate request ID for at least 60 minutes after
+     * the first request.
+     * For example, if an initial request times out, followed by another request
+     * with the same request ID, the server ignores the second request to prevent
+     * the creation of duplicate commitments.
+     * The request ID must be a valid
+     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.metastore.v1beta.UpdateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.UpdateServiceRequest) + private static final com.google.cloud.metastore.v1beta.UpdateServiceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.UpdateServiceRequest(); + } + + public static com.google.cloud.metastore.v1beta.UpdateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.UpdateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequestOrBuilder.java b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequestOrBuilder.java new file mode 100644 index 000000000000..7874e39d4243 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/UpdateServiceRequestOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface UpdateServiceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.UpdateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * 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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the service field is set. + */ + boolean hasService(); + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The service. + */ + com.google.cloud.metastore.v1beta.Service getService(); + /** + *
+   * Required. The metastore service to update. The server only merges fields
+   * in the service if they are specified in `update_mask`.
+   * The metastore service's `name` field is used to identify the metastore
+   * service to be updated.
+   * 
+ * + * .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.metastore.v1beta.ServiceOrBuilder getServiceOrBuilder(); + + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + *
+   * Optional. A request ID. Specify a unique request ID to allow the server to
+   * ignore the request if it has completed. The server will ignore subsequent
+   * requests that provide a duplicate request ID for at least 60 minutes after
+   * the first request.
+   * For example, if an initial request times out, followed by another request
+   * with the same request ID, the server ignores the second request to prevent
+   * the creation of duplicate commitments.
+   * The request ID must be a valid
+   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
+   * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString + getRequestIdBytes(); +} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore.proto b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore.proto new file mode 100644 index 000000000000..b7c73b4f2b10 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore.proto @@ -0,0 +1,1671 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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. + +syntax = "proto3"; + +package google.cloud.metastore.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/dayofweek.proto"; + +option go_package = "cloud.google.com/go/metastore/apiv1beta/metastorepb;metastorepb"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreProto"; +option java_package = "com.google.cloud.metastore.v1beta"; +option php_namespace = "Google\\Cloud\\Metastore\\V1beta"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Subnetwork" + pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" +}; +option (google.api.resource_definition) = { + type: "dataplex.googleapis.com/Lake" + pattern: "projects/{project}/locations/{location}/lakes/{lake}" +}; + +// 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: +// +// * The service works with a collection of Google Cloud projects, named: +// `/projects/*` +// * Each project has a collection of available locations, named: `/locations/*` +// (a location must refer to a Google Cloud `region`) +// * Each location has a collection of services, named: `/services/*` +// * Dataproc Metastore services are resources with names of the form: +// +// `/projects/{project_number}/locations/{location_id}/services/{service_id}`. +service DataprocMetastore { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists services in a project and location. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/services" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single service. + rpc GetService(GetServiceRequest) returns (Service) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/services/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore service in a project and location. + rpc CreateService(CreateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/services" + body: "service" + }; + option (google.api.method_signature) = "parent,service,service_id"; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Updates the parameters of a single service. + rpc UpdateService(UpdateServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{service.name=projects/*/locations/*/services/*}" + body: "service" + }; + option (google.api.method_signature) = "service,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Service" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Deletes a single service. + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/services/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Lists imports in a service. + rpc ListMetadataImports(ListMetadataImportsRequest) + returns (ListMetadataImportsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single import. + rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/services/*/metadataImports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new MetadataImport in a given project and location. + rpc CreateMetadataImport(CreateMetadataImportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports" + body: "metadata_import" + }; + option (google.api.method_signature) = + "parent,metadata_import,metadata_import_id"; + option (google.longrunning.operation_info) = { + response_type: "MetadataImport" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Updates a single import. + // Only the description field of MetadataImport is supported to be updated. + rpc UpdateMetadataImport(UpdateMetadataImportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}" + body: "metadata_import" + }; + option (google.api.method_signature) = "metadata_import,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MetadataImport" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Exports metadata from a service. + rpc ExportMetadata(ExportMetadataRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{service=projects/*/locations/*/services/*}:exportMetadata" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MetadataExport" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Restores a service from a backup. + rpc RestoreService(RestoreServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{service=projects/*/locations/*/services/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "service,backup"; + option (google.longrunning.operation_info) = { + response_type: "Restore" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Lists backups in a service. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/services/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/services/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new backup in a given project and location. + rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/services/*}/backups" + body: "backup" + }; + option (google.api.method_signature) = "parent,backup,backup_id"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Deletes a single backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/services/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Removes the attached IAM policies for a resource + rpc RemoveIamPolicy(RemoveIamPolicyRequest) + returns (RemoveIamPolicyResponse) { + option (google.api.http) = { + post: "/v1beta/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy" + body: "*" + }; + } + + // Query DPMS metadata. + rpc QueryMetadata(QueryMetadataRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{service=projects/*/locations/*/services/*}:queryMetadata" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "QueryMetadataResponse" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Move a table to another database. + rpc MoveTableToDatabase(MoveTableToDatabaseRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{service=projects/*/locations/*/services/*}:moveTableToDatabase" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MoveTableToDatabaseResponse" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Alter metadata resource location. The metadata resource can be a database, + // table, or partition. This functionality only updates the parent directory + // for the respective metadata resource and does not transfer any existing + // data to the new location. + rpc AlterMetadataResourceLocation(AlterMetadataResourceLocationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{service=projects/*/locations/*/services/*}:alterLocation" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "AlterMetadataResourceLocationResponse" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } +} + +// A managed metastore service that serves metadata queries. +message Service { + option (google.api.resource) = { + type: "metastore.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/services/{service}" + }; + + // The current state of the metastore service. + enum State { + // The state of the metastore service is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore service is in the process of being created. + CREATING = 1; + + // The metastore service is running and ready to serve queries. + ACTIVE = 2; + + // The metastore service is entering suspension. Its query-serving + // availability may cease unexpectedly. + SUSPENDING = 3; + + // The metastore service is suspended and unable to serve queries. + SUSPENDED = 4; + + // The metastore service is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 5; + + // The metastore service is undergoing deletion. It cannot be used. + DELETING = 6; + + // The metastore service has encountered an error and cannot be used. The + // metastore service should be deleted. + ERROR = 7; + } + + // Available service tiers. + enum Tier { + // The tier is not set. + TIER_UNSPECIFIED = 0; + + // The developer tier provides limited scalability and no fault tolerance. + // Good for low-cost proof-of-concept. + DEVELOPER = 1; + + // The enterprise tier provides multi-zone high availability, and sufficient + // scalability for enterprise-level Dataproc Metastore workloads. + ENTERPRISE = 3; + } + + // Release channels bundle features of varying levels of stability. Newer + // features may be introduced initially into less stable release channels and + // can be automatically promoted into more stable release channels. + enum ReleaseChannel { + // Release channel is not specified. + RELEASE_CHANNEL_UNSPECIFIED = 0; + + // The `CANARY` release channel contains the newest features, which may be + // unstable and subject to unresolved issues with no known workarounds. + // Services using the `CANARY` release channel are not subject to any SLAs. + CANARY = 1; + + // The `STABLE` release channel contains features that are considered stable + // and have been validated for production use. + STABLE = 2; + } + + // The backend database type for the metastore service. + enum DatabaseType { + // The DATABASE_TYPE is not set. + DATABASE_TYPE_UNSPECIFIED = 0; + + // MySQL is used to persist the metastore data. + MYSQL = 1; + + // Spanner is used to persist the metastore data. + SPANNER = 2; + } + + // Configuration properties specific to the underlying metastore service + // technology (the software that serves metastore queries). + oneof metastore_config { + // Configuration information specific to running Hive metastore + // software as the metastore service. + HiveMetastoreConfig hive_metastore_config = 5; + } + + // Immutable. The relative resource name of the metastore service, in the + // following format: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore service was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore service was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore service. + map labels = 4; + + // Immutable. The relative resource name of the VPC network on which the + // instance can be accessed. It is specified in the following form: + // + // `projects/{project_number}/global/networks/{network_id}`. + string network = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Output only. The URI of the endpoint used to access the metastore service. + string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The TCP port at which the metastore service is reached. Default: 9083. + int32 port = 9; + + // Output only. The current state of the metastore service. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the + // metastore service, if available. + string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A Cloud Storage URI (starting with `gs://`) that specifies + // where artifacts related to the metastore service are stored. + string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The tier of the service. + Tier tier = 13; + + // The setting that defines how metastore metadata should be integrated with + // external services and systems. + MetadataIntegration metadata_integration = 14; + + // The one hour maintenance window of the metastore service. This specifies + // when the service can be restarted for maintenance purposes in UTC time. + // Maintenance window is not needed for services with the SPANNER + // database type. + MaintenanceWindow maintenance_window = 15; + + // Output only. The globally unique resource identifier of the metastore + // service. + string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The metadata management activities of the metastore service. + MetadataManagementActivity metadata_management_activity = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The release channel of the service. + // If unspecified, defaults to `STABLE`. + ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Information used to configure the Dataproc Metastore service to + // encrypt customer data at rest. Cannot be updated. + EncryptionConfig encryption_config = 20 + [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying the network settings for the + // Dataproc Metastore service. + NetworkConfig network_config = 21; + + // Immutable. The database type that the Metastore service stores its data. + DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE]; + + // The configuration specifying telemetry settings for the Dataproc Metastore + // service. If unspecified defaults to `JSON`. + TelemetryConfig telemetry_config = 23; + + // Scaling configuration of the metastore service. + ScalingConfig scaling_config = 24; +} + +// Specifies how metastore metadata should be integrated with external services. +message MetadataIntegration { + // The integration config for the Data Catalog service. + DataCatalogConfig data_catalog_config = 1; + + // The integration config for the Dataplex service. + DataplexConfig dataplex_config = 2; +} + +// Specifies how metastore metadata should be integrated with the Data Catalog +// service. +message DataCatalogConfig { + // Defines whether the metastore metadata should be synced to Data Catalog. + // The default value is to disable syncing metastore metadata to Data Catalog. + bool enabled = 2; +} + +// Specifies how metastore metadata should be integrated with the Dataplex +// service. +message DataplexConfig { + // A reference to the Lake resources that this metastore service is attached + // to. The key is the lake resource name. Example: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + map lake_resources = 1; +} + +// Represents a Lake resource +message Lake { + // The Lake resource name. + // Example: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}` + string name = 1 [ + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; +} + +// Maintenance window. This specifies when Dataproc Metastore +// may perform system maintenance operation to the service. +message MaintenanceWindow { + // The hour of day (0-23) when the window starts. + google.protobuf.Int32Value hour_of_day = 1; + + // The day of week, when the window starts. + google.type.DayOfWeek day_of_week = 2; +} + +// Specifies configuration information specific to running Hive metastore +// software as the metastore service. +message HiveMetastoreConfig { + // Protocols available for serving the metastore service endpoint. + enum EndpointProtocol { + // The protocol is not set. + ENDPOINT_PROTOCOL_UNSPECIFIED = 0; + + // Use the legacy Apache Thrift protocol for the metastore service endpoint. + THRIFT = 1; + + // Use the modernized gRPC protocol for the metastore service endpoint. + GRPC = 2; + } + + // Immutable. The Hive metastore schema version. + string version = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // A mapping of Hive metastore configuration key-value pairs to apply to the + // Hive metastore (configured in `hive-site.xml`). The mappings + // override system defaults (some keys cannot be overridden). These + // overrides are also applied to auxiliary versions and can be further + // customized in the auxiliary version's `AuxiliaryVersionConfig`. + map config_overrides = 2; + + // Information used to configure the Hive metastore service as a service + // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService` + // method and specify this field's path + // (`hive_metastore_config.kerberos_config`) in the request's `update_mask` + // while omitting this field from the request's `service`. + KerberosConfig kerberos_config = 3; + + // The protocol to use for the metastore service endpoint. If unspecified, + // defaults to `THRIFT`. + EndpointProtocol endpoint_protocol = 4; + + // A mapping of Hive metastore version to the auxiliary version + // configuration. When specified, a secondary Hive metastore service is + // created along with the primary service. All auxiliary versions must be less + // than the service's primary version. The key is the auxiliary service name + // and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This + // means that the first character must be a lowercase letter, and all the + // following characters must be hyphens, lowercase letters, or digits, except + // the last character, which cannot be a hyphen. + map auxiliary_versions = 5; +} + +// Configuration information for a Kerberos principal. +message KerberosConfig { + // A Kerberos keytab file that can be used to authenticate a service principal + // with a Kerberos Key Distribution Center (KDC). + Secret keytab = 1; + + // A Kerberos principal that exists in the both the keytab the KDC + // to authenticate as. A typical principal is of the form + // `primary/instance@REALM`, but there is no exact format. + string principal = 2; + + // A Cloud Storage URI that specifies the path to a + // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`, + // although the file does not need to be named krb5.conf explicitly. + string krb5_config_gcs_uri = 3; +} + +// A securely stored value. +message Secret { + oneof value { + // The relative resource name of a Secret Manager secret version, in the + // following form: + // + // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`. + string cloud_secret = 2; + } +} + +// Encryption settings for the service. +message EncryptionConfig { + // The fully qualified customer provided Cloud KMS key name to use for + // customer data encryption, in the following form: + // + // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`. + string kms_key = 1; +} + +// Configuration information for the auxiliary service versions. +message AuxiliaryVersionConfig { + // The Hive metastore version of the auxiliary service. It must be less + // than the primary Hive metastore service's version. + string version = 1; + + // A mapping of Hive metastore configuration key-value pairs to apply to the + // auxiliary Hive metastore (configured in `hive-site.xml`) in addition to + // the primary version's overrides. If keys are present in both the auxiliary + // version's overrides and the primary version's overrides, the value from + // the auxiliary version's overrides takes precedence. + map config_overrides = 2; + + // Output only. The network configuration contains the endpoint URI(s) of the + // auxiliary Hive metastore service. + NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Network configuration for the Dataproc Metastore service. +message NetworkConfig { + // Contains information of the customer's network configurations. + message Consumer { + oneof vpc_resource { + // Immutable. The subnetwork of the customer project from which an IP + // address is reserved and used as the Dataproc Metastore service's + // endpoint. It is accessible to hosts in the subnet and to all + // hosts in a subnet in the same region and same network. There must + // be at least one IP address available in the subnet's primary range. The + // subnet is specified in the following form: + // + // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}` + string subnetwork = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Subnetwork" + } + ]; + } + + // Output only. The URI of the endpoint used to access the metastore + // service. + string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Immutable. The consumer-side network configuration for the Dataproc + // Metastore instance. + repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Enables custom routes to be imported and exported for the Dataproc + // Metastore service's peered VPC network. + bool custom_routes_enabled = 2; +} + +// Telemetry Configuration for the Dataproc Metastore service. +message TelemetryConfig { + enum LogFormat { + // The LOG_FORMAT is not set. + LOG_FORMAT_UNSPECIFIED = 0; + + // Logging output uses the legacy `textPayload` format. + LEGACY = 1; + + // Logging output uses the `jsonPayload` format. + JSON = 2; + } + + // The output format of the Dataproc Metastore service's logs. + LogFormat log_format = 1; +} + +// The metadata management activities of the metastore service. +message MetadataManagementActivity { + // Output only. The latest metadata exports of the metastore service. + repeated MetadataExport metadata_exports = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The latest restores of the metastore service. + repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A metastore resource that imports metadata. +message MetadataImport { + option (google.api.resource) = { + type: "metastore.googleapis.com/MetadataImport" + pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}" + }; + + // A specification of the location of and metadata about a database dump from + // a relational database management system. + message DatabaseDump { + // The type of the database. + enum DatabaseType { + // The type of the source database is unknown. + DATABASE_TYPE_UNSPECIFIED = 0; + + // The type of the source database is MySQL. + MYSQL = 1; + } + + // The type of the database. + DatabaseType database_type = 1 [deprecated = true]; + + // A Cloud Storage object or folder URI that specifies the source from which + // to import metadata. It must begin with `gs://`. + string gcs_uri = 2; + + // The name of the source database. + string source_database = 3 [deprecated = true]; + + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. + DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // The current state of the metadata import. + enum State { + // The state of the metadata import is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata import is running. + RUNNING = 1; + + // The metadata import completed successfully. + SUCCEEDED = 2; + + // The metadata import is being updated. + UPDATING = 3; + + // The metadata import failed, and attempted metadata changes were rolled + // back. + FAILED = 4; + } + + // The metadata to be imported. + oneof metadata { + // Immutable. A database dump from a pre-existing metastore's database. + DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Immutable. The relative resource name of the metadata import, of the form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The description of the metadata import. + string description = 2; + + // Output only. The time when the metadata import was started. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metadata import was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metadata import finished. + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the metadata import. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a metadata export operation. +message MetadataExport { + // The current state of the metadata export. + enum State { + // The state of the metadata export is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata export is running. + RUNNING = 1; + + // The metadata export completed successfully. + SUCCEEDED = 2; + + // The metadata export failed. + FAILED = 3; + + // The metadata export is cancelled. + CANCELLED = 4; + } + + oneof destination { + // Output only. A Cloud Storage URI of a folder that metadata are exported + // to, in the form of + // `gs:////`, where + // `` is automatically generated. + string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The time when the export started. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the export ended. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the export. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the database dump. + DatabaseDumpSpec.Type database_dump_type = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a backup resource. +message Backup { + option (google.api.resource) = { + type: "metastore.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/services/{service}/backups/{backup}" + }; + + // The current state of the backup. + enum State { + // The state of the backup is unknown. + STATE_UNSPECIFIED = 0; + + // The backup is being created. + CREATING = 1; + + // The backup is being deleted. + DELETING = 2; + + // The backup is active and ready to use. + ACTIVE = 3; + + // The backup failed. + FAILED = 4; + + // The backup is being restored. + RESTORING = 5; + } + + // Immutable. The relative resource name of the backup, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the backup was started. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the backup finished creating. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the backup. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revision of the service at the time of backup. + Service service_revision = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The description of the backup. + string description = 6; + + // Output only. Services that are restoring from the backup. + repeated string restoring_services = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The details of a metadata restore operation. +message Restore { + // The current state of the restore. + enum State { + // The state of the metadata restore is unknown. + STATE_UNSPECIFIED = 0; + + // The metadata restore is running. + RUNNING = 1; + + // The metadata restore completed successfully. + SUCCEEDED = 2; + + // The metadata restore failed. + FAILED = 3; + + // The metadata restore is cancelled. + CANCELLED = 4; + } + + // The type of restore. If unspecified, defaults to `METADATA_ONLY`. + enum RestoreType { + // The restore type is unknown. + RESTORE_TYPE_UNSPECIFIED = 0; + + // The service's metadata and configuration are restored. + FULL = 1; + + // Only the service's metadata is restored. + METADATA_ONLY = 2; + } + + // Output only. The time when the restore started. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the restore ended. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the restore. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. 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}`. + string backup = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Output only. The type of restore. + RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The restore details containing the revision of the service to + // be restored to, in format of JSON. + string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents the scaling configuration of a metastore service. +message ScalingConfig { + // Metastore instance sizes. + enum InstanceSize { + // Unspecified instance size + INSTANCE_SIZE_UNSPECIFIED = 0; + + // Extra small instance size, maps to a scaling factor of 0.1. + EXTRA_SMALL = 1; + + // Small instance size, maps to a scaling factor of 0.5. + SMALL = 2; + + // Medium instance size, maps to a scaling factor of 1.0. + MEDIUM = 3; + + // Large instance size, maps to a scaling factor of 3.0. + LARGE = 4; + + // Extra large instance size, maps to a scaling factor of 6.0. + EXTRA_LARGE = 5; + } + + // Represents either a predetermined instance size or a numeric + // scaling factor. + oneof scaling_model { + // An enum of readable instance sizes, with each instance size mapping to a + // float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) + InstanceSize instance_size = 1; + + // Scaling factor, increments of 0.1 for values less than 1.0, and + // increments of 1.0 for values greater than 1.0. + float scaling_factor = 2; + } +} + +// Request message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]. +message ListServicesRequest { + // Required. The relative resource name of the location of metastore services + // to list, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. The maximum number of services to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]. +message ListServicesResponse { + // The services in the specified location. + repeated Service services = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetService][google.cloud.metastore.v1beta.DataprocMetastore.GetService]. +message GetServiceRequest { + // Required. The relative resource name of the metastore service to retrieve, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateService][google.cloud.metastore.v1beta.DataprocMetastore.CreateService]. +message CreateServiceRequest { + // 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}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Service" + } + ]; + + // 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. + string service_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Service service = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.UpdateService][google.cloud.metastore.v1beta.DataprocMetastore.UpdateService]. +message UpdateServiceRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore service to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore service's `name` field is used to identify the metastore + // service to be updated. + Service service = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.DeleteService][google.cloud.metastore.v1beta.DataprocMetastore.DeleteService]. +message DeleteServiceRequest { + // Required. The relative resource name of the metastore service to delete, in + // the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports]. +message ListMetadataImportsRequest { + // Required. The relative resource name of the service whose metadata imports + // to list, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/MetadataImport" + } + ]; + + // Optional. The maximum number of imports to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 imports are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports]. +message ListMetadataImportsResponse { + // The imports in the specified service. + repeated MetadataImport metadata_imports = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImport]. +message GetMetadataImportRequest { + // Required. The relative resource name of the metadata import to retrieve, in + // the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/MetadataImport" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImport]. +message CreateMetadataImportRequest { + // Required. The relative resource name of the service in which to create a + // metastore import, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/MetadataImport" + } + ]; + + // 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. + string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImport]. +message UpdateMetadataImportRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metadata import to update. The server only merges fields + // in the import if they are specified in `update_mask`. + // + // The metadata import's `name` field is used to identify the metastore + // import to be updated. + MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]. +message ListBackupsRequest { + // Required. The relative resource name of the service whose backups to + // list, in the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. The maximum number of backups to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 backups are + // returned. The maximum value is 1000; values above 1000 are changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups] + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups] + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]. +message ListBackupsResponse { + // The backups of the specified service. + repeated Backup backups = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [DataprocMetastore.GetBackup][google.cloud.metastore.v1beta.DataprocMetastore.GetBackup]. +message GetBackupRequest { + // Required. The relative resource name of the backup to retrieve, in the + // following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; +} + +// Request message for +// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1beta.DataprocMetastore.CreateBackup]. +message CreateBackupRequest { + // Required. The relative resource name of the service in which to create a + // backup of the following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Backup" + } + ]; + + // 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. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackup]. +message DeleteBackupRequest { + // Required. The relative resource name of the backup to delete, in the + // following form: + // + // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadata]. +message ExportMetadataRequest { + // Required. Destination that metadata is exported to. + oneof destination { + // A Cloud Storage URI of a folder, in the format + // `gs:///`. A sub-folder + // `` containing exported files will be created below it. + string destination_gcs_folder = 2; + } + + // Required. The relative resource name of the metastore service to run + // export, in the following form: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. + DatabaseDumpSpec.Type database_dump_type = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [DataprocMetastore.Restore][]. +message RestoreServiceRequest { + // Required. The relative resource name of the metastore service to run + // restore, in the following form: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // 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}`. + string backup = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Backup" + } + ]; + + // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. + Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the caller has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata about the service in a location. +message LocationMetadata { + // A specification of a supported version of the Hive Metastore software. + message HiveMetastoreVersion { + // The semantic version of the Hive Metastore software. + string version = 1; + + // Whether `version` will be chosen by the server if a metastore service is + // created with a `HiveMetastoreConfig` that omits the `version`. + bool is_default = 2; + } + + // The versions of Hive Metastore that can be used when creating a new + // metastore service in this location. The server guarantees that exactly one + // `HiveMetastoreVersion` in the list will set `is_default`. + repeated HiveMetastoreVersion supported_hive_metastore_versions = 1; +} + +// The specification of database dump to import from or export to. +message DatabaseDumpSpec { + // The type of the database dump. + enum Type { + // The type of the database dump is unknown. + TYPE_UNSPECIFIED = 0; + + // Database dump is a MySQL dump file. + MYSQL = 1; + + // Database dump contains Avro files. + AVRO = 2; + } +} + +// Request message for +// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy]. +message RemoveIamPolicyRequest { + // Required. The relative resource name of the dataplane resource to remove + // IAM policy, in the following form: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}` + // or + // `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`. + string resource = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // Optional. Removes IAM policy attached to database or table asynchronously + // when it is set. The default is false. + bool asynchronous = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy]. +message RemoveIamPolicyResponse { + // True if the policy is successfully removed. + bool success = 1; +} + +// Request message for +// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata]. +message QueryMetadataRequest { + // Required. The relative resource name of the metastore service to query + // metadata, in the following format: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Required. A read-only SQL query to execute against the metadata database. + // The query cannot change or mutate the data. + string query = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata]. +message QueryMetadataResponse { + // The manifest URI is link to a JSON instance in Cloud Storage. + // This instance manifests immediately along with QueryMetadataResponse. The + // content of the URI is not retriable until the long-running operation query + // against the metadata finishes. + string result_manifest_uri = 1; +} + +// Request message for +// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase]. +message MoveTableToDatabaseRequest { + // Required. The relative resource name of the metastore service to mutate + // metadata, in the following format: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Required. The name of the table to be moved. + string table_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the database where the table resides. + string db_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the database where the table should be moved. + string destination_db_name = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase]. +message MoveTableToDatabaseResponse {} + +// Request message for +// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation]. +message AlterMetadataResourceLocationRequest { + // Required. The relative resource name of the metastore service to mutate + // metadata, in the following format: + // + // `projects/{project_id}/locations/{location_id}/services/{service_id}`. + string service = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Service" + } + ]; + + // Required. The relative metadata resource name in the following format. + // + // `databases/{database_id}` + // or + // `databases/{database_id}/tables/{table_id}` + // or + // `databases/{database_id}/tables/{table_id}/partitions/{partition_id}` + string resource_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new location URI for the metadata resource. + string location_uri = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation]. +message AlterMetadataResourceLocationResponse {} diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore_federation.proto b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore_federation.proto new file mode 100644 index 000000000000..26bc70e7c4bb --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/proto-google-cloud-dataproc-metastore-v1beta/src/main/proto/google/cloud/metastore/v1beta/metastore_federation.proto @@ -0,0 +1,377 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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. + +syntax = "proto3"; + +package google.cloud.metastore.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/metastore/v1beta/metastore.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/metastore/apiv1beta/metastorepb;metastorepb"; +option java_multiple_files = true; +option java_outer_classname = "MetastoreFederationProto"; +option java_package = "com.google.cloud.metastore.v1beta"; + +// Configures and manages metastore federation services. +// Dataproc Metastore Federation Service allows federating a collection of +// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc +// Metastores. The Federation Service exposes a gRPC URL through which metadata +// from the backend metastores are served at query time. +// +// The Dataproc Metastore Federation API defines the following resource model: +// * The service works with a collection of Google Cloud projects. +// * Each project has a collection of available locations. +// * Each location has a collection of federations. +// * Dataproc Metastore Federations are resources with names of the +// form: +// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. +service DataprocMetastoreFederation { + option (google.api.default_host) = "metastore.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists federations in a project and location. + rpc ListFederations(ListFederationsRequest) + returns (ListFederationsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/federations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a single federation. + rpc GetFederation(GetFederationRequest) returns (Federation) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a metastore federation in a project and location. + rpc CreateFederation(CreateFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/federations" + body: "federation" + }; + option (google.api.method_signature) = "parent,federation,federation_id"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Updates the fields of a federation. + rpc UpdateFederation(UpdateFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{federation.name=projects/*/locations/*/federations/*}" + body: "federation" + }; + option (google.api.method_signature) = "federation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Federation" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } + + // Deletes a single federation. + rpc DeleteFederation(DeleteFederationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/federations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.metastore.v1beta.OperationMetadata" + }; + } +} + +// Represents a federation of multiple backend metastores. +message Federation { + option (google.api.resource) = { + type: "metastore.googleapis.com/Federation" + pattern: "projects/{project}/locations/{location}/federations/{federation}" + }; + + // The current state of the federation. + enum State { + // The state of the metastore federation is unknown. + STATE_UNSPECIFIED = 0; + + // The metastore federation is in the process of being created. + CREATING = 1; + + // The metastore federation is running and ready to serve queries. + ACTIVE = 2; + + // The metastore federation is being updated. It remains usable but cannot + // accept additional update requests or be deleted at this time. + UPDATING = 3; + + // The metastore federation is undergoing deletion. It cannot be used. + DELETING = 4; + + // The metastore federation has encountered an error and cannot be used. The + // metastore federation should be deleted. + ERROR = 5; + } + + // Immutable. The relative resource name of the federation, of the + // form: + // projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time when the metastore federation was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metastore federation was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels for the metastore federation. + map labels = 4; + + // Immutable. The Apache Hive metastore version of the federation. All backend + // metastore versions must be compatible with the federation version. + string version = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // A map from `BackendMetastore` rank to `BackendMetastore`s from which the + // federation service serves metadata at query time. The map key represents + // the order in which `BackendMetastore`s should be evaluated to resolve + // database names at query time and should be greater than or equal to zero. A + // `BackendMetastore` with a lower number will be evaluated before a + // `BackendMetastore` with a higher number. + map backend_metastores = 6; + + // Output only. The federation endpoint. + string endpoint_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the federation. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the + // metastore federation, if available. + string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The globally unique resource identifier of the metastore + // federation. + string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a backend metastore for the federation. +message BackendMetastore { + // The type of the backend metastore. + enum MetastoreType { + // The metastore type is not set. + METASTORE_TYPE_UNSPECIFIED = 0; + + // The backend metastore is Dataplex. + DATAPLEX = 1; + + // The backend metastore is BigQuery. + BIGQUERY = 2; + + // The backend metastore is Dataproc Metastore. + DATAPROC_METASTORE = 3; + } + + // The relative resource name of the metastore that is being federated. + // The formats of the relative resource names for the currently supported + // metastores are listed below: + // + // * BigQuery + // * `projects/{project_id}` + // * Dataproc Metastore + // * `projects/{project_id}/locations/{location}/services/{service_id}` + string name = 1; + + // The type of the backend metastore. + MetastoreType metastore_type = 2; +} + +// Request message for ListFederations. +message ListFederationsRequest { + // Required. The relative resource name of the location of metastore + // federations to list, in the following form: + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. The maximum number of federations to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListFederationServices + // call. Provide this token to retrieve the subsequent page. + // + // To retrieve the first page, supply an empty page token. + // + // When paginating, other parameters provided to + // ListFederationServices must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to list results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify the ordering of results as described in [Sorting + // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + // If not specified, the results will be sorted in the default order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListFederations +message ListFederationsResponse { + // The services in the specified location. + repeated Federation federations = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for GetFederation. +message GetFederationRequest { + // Required. The relative resource name of the metastore federation to + // retrieve, in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; +} + +// Request message for CreateFederation. +message CreateFederationRequest { + // Required. The relative resource name of the location in which to create a + // federation service, in the following form: + // + // `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "metastore.googleapis.com/Federation" + } + ]; + + // 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. + string federation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for UpdateFederation. +message UpdateFederationRequest { + // 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. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The metastore federation to update. The server only merges fields + // in the service if they are specified in `update_mask`. + // + // The metastore federation's `name` field is used to identify the + // metastore service to be updated. + Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeleteFederation. +message DeleteFederationRequest { + // Required. The relative resource name of the metastore federation to delete, + // in the following form: + // + // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "metastore.googleapis.com/Federation" + } + ]; + + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. + // + // For example, if an initial request times out, followed by another request + // with the same request ID, the server ignores the second request to prevent + // the creation of duplicate commitments. + // + // The request ID must be a valid + // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) + // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetCredentialsProvider.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetCredentialsProvider1.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetEndpoint.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetEndpoint.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/create/SyncCreateSetEndpoint.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/AsyncCreateBackup.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/AsyncCreateBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/AsyncCreateBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/AsyncCreateBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/AsyncCreateBackupLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackup.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackupServicenameBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createbackup/SyncCreateBackupStringBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/AsyncCreateMetadataImportLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportServicenameMetadataimportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createmetadataimport/SyncCreateMetadataImportStringMetadataimportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/AsyncCreateService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/AsyncCreateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/AsyncCreateService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/AsyncCreateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/AsyncCreateServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/AsyncCreateServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/AsyncCreateServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/AsyncCreateServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateServiceLocationnameServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/createservice/SyncCreateServiceStringServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/AsyncDeleteBackup.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/AsyncDeleteBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/AsyncDeleteBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/AsyncDeleteBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/AsyncDeleteBackupLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackup.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackupBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deletebackup/SyncDeleteBackupString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/AsyncDeleteService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/AsyncDeleteService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/AsyncDeleteService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/AsyncDeleteService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/AsyncDeleteServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteServiceServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/deleteservice/SyncDeleteServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/AsyncExportMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/AsyncExportMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/AsyncExportMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/AsyncExportMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/AsyncExportMetadataLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/SyncExportMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/SyncExportMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/SyncExportMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/exportmetadata/SyncExportMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/AsyncGetBackup.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/AsyncGetBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/AsyncGetBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/AsyncGetBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackup.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackup.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackup.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackup.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackupBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackupBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackupBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackupBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackupString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackupString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackupString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getbackup/SyncGetBackupString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..1d347c3c3ae5 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = dataprocMetastoreClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_GetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..238ef4a5be4c --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_GetIamPolicy_sync] +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreClient.getIamPolicy(request); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_GetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..a28072b3b8b2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + dataprocMetastoreClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_GetLocation_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getlocation/SyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..715f55fb94a2 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataprocMetastoreClient.getLocation(request); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_GetLocation_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/AsyncGetMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImportMetadataimportname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getmetadataimport/SyncGetMetadataImportString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/AsyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/AsyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/AsyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/AsyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetServiceServicename.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetServiceServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetServiceServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetServiceServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetServiceString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetServiceString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetServiceString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/getservice/SyncGetServiceString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/AsyncListBackups.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/AsyncListBackups.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/AsyncListBackups.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/AsyncListBackups.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/AsyncListBackupsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/AsyncListBackupsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/AsyncListBackupsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/AsyncListBackupsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackups.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackups.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackups.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackups.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackupsServicename.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackupsServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackupsServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackupsServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackupsString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackupsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackupsString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listbackups/SyncListBackupsString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/AsyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..10390f544fea --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataprocMetastoreClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_ListLocations_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..d143cb042712 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataprocMetastoreClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_ListLocations_Paged_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/SyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..a45524094469 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : dataprocMetastoreClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_ListLocations_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/AsyncListMetadataImports.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/AsyncListMetadataImportsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImports.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImportsServicename.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listmetadataimports/SyncListMetadataImportsString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/AsyncListServices.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/AsyncListServices.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/AsyncListServices.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/AsyncListServices.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/AsyncListServicesPaged.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/AsyncListServicesPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/AsyncListServicesPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/AsyncListServicesPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServices.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServices.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServices.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServices.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServicesLocationname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServicesLocationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServicesLocationname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServicesLocationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServicesString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServicesString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServicesString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/listservices/SyncListServicesString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/AsyncQueryMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/AsyncQueryMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/AsyncQueryMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/AsyncQueryMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/SyncQueryMetadata.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/SyncQueryMetadata.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/SyncQueryMetadata.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/querymetadata/SyncQueryMetadata.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/removeiampolicy/AsyncRemoveIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/removeiampolicy/AsyncRemoveIamPolicy.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/removeiampolicy/AsyncRemoveIamPolicy.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/removeiampolicy/AsyncRemoveIamPolicy.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/removeiampolicy/SyncRemoveIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/removeiampolicy/SyncRemoveIamPolicy.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/removeiampolicy/SyncRemoveIamPolicy.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/removeiampolicy/SyncRemoveIamPolicy.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/AsyncRestoreService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/AsyncRestoreService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/AsyncRestoreService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/AsyncRestoreService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/AsyncRestoreServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceServicenameString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceStringBackupname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/restoreservice/SyncRestoreServiceStringString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..6a4113479e48 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = dataprocMetastoreClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_SetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..99ced463bfc9 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_SetIamPolicy_sync] +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreClient.setIamPolicy(request); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_SetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..dc049069a53b --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + dataprocMetastoreClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_TestIamPermissions_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..847dae054674 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,49 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastore_TestIamPermissions_sync] +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = dataprocMetastoreClient.testIamPermissions(request); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastore_TestIamPermissions_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/AsyncUpdateMetadataImportLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImport.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updatemetadataimport/SyncUpdateMetadataImportMetadataimportFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/AsyncUpdateService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/AsyncUpdateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/AsyncUpdateService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/AsyncUpdateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/AsyncUpdateServiceLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/SyncUpdateService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/SyncUpdateService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/SyncUpdateService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/SyncUpdateService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastore/updateservice/SyncUpdateServiceServiceFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetCredentialsProvider1.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/create/SyncCreateSetEndpoint.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/AsyncCreateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/AsyncCreateFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederationLocationnameFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/createfederation/SyncCreateFederationStringFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/AsyncDeleteFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/AsyncDeleteFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederationFederationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/deletefederation/SyncDeleteFederationString.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/AsyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/AsyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/AsyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/AsyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederationFederationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederationString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederationString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederationString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getfederation/SyncGetFederationString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..af78b5de3d7a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_GetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..fa9aec970190 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_GetIamPolicy_sync] +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreFederationClient.getIamPolicy(request); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_GetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getlocation/AsyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..130b3a9eee17 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + dataprocMetastoreFederationClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_GetLocation_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getlocation/SyncGetLocation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..63114e7fde94 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataprocMetastoreFederationClient.getLocation(request); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_GetLocation_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/AsyncListFederations.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/AsyncListFederations.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/AsyncListFederations.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/AsyncListFederations.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/AsyncListFederationsPaged.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederations.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederations.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederations.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederations.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederationsLocationname.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederationsString.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederationsString.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederationsString.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listfederations/SyncListFederationsString.java diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/AsyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..2f79ea073226 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_ListLocations_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..f571093cfbb0 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataprocMetastoreFederationClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_ListLocations_Paged_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/SyncListLocations.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..7dd9e4b34304 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/listlocations/SyncListLocations.java @@ -0,0 +1,52 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : + dataprocMetastoreFederationClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_ListLocations_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..d001df917611 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_SetIamPolicy_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..7079f6bd276a --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_SetIamPolicy_sync] +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = dataprocMetastoreFederationClient.setIamPolicy(request); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_SetIamPolicy_sync] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..f7cc6d4e66ca --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,54 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + dataprocMetastoreFederationClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_TestIamPermissions_async] diff --git a/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..08e0e921b6b1 --- /dev/null +++ b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * 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.v1beta.samples; + +// [START metastore_v1beta_generated_DataprocMetastoreFederation_TestIamPermissions_sync] +import com.google.cloud.metastore.v1beta.BackupName; +import com.google.cloud.metastore.v1beta.DataprocMetastoreFederationClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying 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()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + dataprocMetastoreFederationClient.testIamPermissions(request); + } + } +} +// [END metastore_v1beta_generated_DataprocMetastoreFederation_TestIamPermissions_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/AsyncUpdateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/AsyncUpdateFederationLRO.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/SyncUpdateFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederation/updatefederation/SyncUpdateFederationFederationFieldmask.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastorefederationsettings/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastoresettings/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastoresettings/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastoresettings/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/dataprocmetastoresettings/getservice/SyncGetService.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/stub/dataprocmetastorefederationstubsettings/getfederation/SyncGetFederation.java diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java b/owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java similarity index 100% rename from java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1beta/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java rename to owl-bot-staging/java-dataproc-metastore/v1beta/samples/snippets/generated/com/google/cloud/metastore/v1beta/stub/dataprocmetastorestubsettings/getservice/SyncGetService.java